Skip to content Skip to sidebar Skip to footer

Importerror: No Module Named Site Vim And Enthought Canopy

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

Solution 1:

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.

Solution 2:

please check existence of site directory under

/usr/local/lib/python2.7/

Hint: python version below 2.7 does not have the jedi-vim support, so better disable jedi-vim and try

If the problem still persisting remove your existing python and try re-installing it

even though your default python is /usr/bin/python you can specify at the start of your file

`#! /usr/bin/python2.7`

$ ls /usr/bin/py
python3   python3.3   python   python2   python2.7
....

Post a Comment for "Importerror: No Module Named Site Vim And Enthought Canopy"