davidhalter / jedi-vim

Using the jedi autocompletion library for VIM.
MIT License
5.28k stars 370 forks source link

"'jedi' has no attribute __version__" on system with multiple versions of Python #560

Closed foxbunny closed 8 years ago

foxbunny commented 8 years ago

After installing jedi-vim from master branch (@a0c326, using pathogen bundle), the following message is shown when opening python files:

Could not load jedi python module: module 'jedi' has no attribute '__version__'

The system (Arch Linux) has two versions of Python (2.7 and 3.x, where 3.x is default). Jedi library was installed for Python 2.7 only. The error goes away if jedi library is installed under Python 3. As an aside, rope-vim has no trouble using the version of the library installed only for 2.7.

davidhalter commented 8 years ago

Probably VIM on arch comes with Python 3. Just install Jedi with Python 3. Or use the git submodule --recursive stuff to initialize the submodule.

davidhalter commented 8 years ago

Don't know hot to help you more than the above. Let me know if you still have questions.

blueyed commented 8 years ago

After all, this error seems to appear if the jedi folder is empty / not checked out. On Arch Linux you can install python-jedi and it will be used (even though there is an empty jedi folder in jedi-vim). In general I recommend using the jedi-vim repository from GitHub and to make sure the submodule is checked out there. See #602.

hemna commented 7 years ago

I'm still getting this error on ubuntu 16.10 with both python 2.7 and python 3 installed.

I have a complete jedi-vim checkout from git in my ~/.vim/bundle dir.

blueyed commented 7 years ago

@hemna Please check :JediDebugInfo and consider creating a new issue, if it does not help to solve it.

UltiRequiem commented 3 years ago

:(