ImportError: No module named site VIM and Enthought canopy

Moj picture Moj · Oct 27, 2013 · Viewed 8.7k times · Source

I was using vim and python perfectly fine till I upgrade to Maverick. Now I have a similar issue as here. When I remove remove canopy path from bash_profile and use default python path , vim works fine, otherwise I am getting the above error. You can also see me report on jedi-vim here

UPDATE: Also it seems my default python path is no longer in /Library/Frameworks/Python.framework/Versions/2.7/bin

$ which python
/usr/bin/python

Answer

Moj picture Moj · Oct 27, 2013

For anyone encountering this issue I resolved the problem by putting these lines into .profile:

export PYTHONDIR=/Library/Frameworks/Python.framework/Versions/2.7/bin
export PYTHONPATH=$PYTHONPATH:/Library/Frameworks/Python.framework/Versions/2.7/bin
export PYTHONPATH=$PYTHONPATH:/Users/mj/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
export PYTHONPATH=$PYTHONPATH:/Applications/Canopy.app/appdata/canopy-1.0.1.1189.macosx-x86_64/Canopy.app/Contents/lib/python2.7/site-packages

Now it works fine. In this way I can manage my python module with canopy and use default python. NOTE: I don't feel this is the best solution but at least solved my problem after 8h.