2

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
Community
  • 1
  • 1
Moj
  • 6,137
  • 2
  • 24
  • 36
  • Mavericks has a lot of issues I hear. – Games Brainiac Oct 27 '13 at 12:30
  • If it works without canopy and doesn't with canopy the problem seems to be on canopy's side and you should report to enthought... or give us more information if you really want some help. – romainl Oct 27 '13 at 12:37
  • @romainl I have already reported it to them. What kind of info do you need. You can find all my vim setting on jedi-vim link – Moj Oct 27 '13 at 12:42

2 Answers2

4

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.

Moj
  • 6,137
  • 2
  • 24
  • 36
0

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
....
Siva Cn
  • 929
  • 4
  • 10