-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Error when loading source jedi: Failed to start server" when using virtualenv at Windows #170
Comments
Please test #171. |
hi @Shougo , after some testing, I found even the path for python program is different in Windows, and below is the modifications that was tested working (starting line 475): if 'VIRTUAL_ENV' in os.environ:
if os.name == 'nt':
prog = os.path.join(self.env['VIRTUAL_ENV'], 'Scripts', 'python')
else:
prog = os.path.join(self.env['VIRTUAL_ENV'], 'bin', 'python')
elif python_path:
prog = python_path
else:
prog = 'python'
self.cmd = [prog, '-u', os.path.normpath(__file__),
'--desc-length', str(desc_len)] Complete file at: https://gist.github.com/thiamteck/9e9a0eac1aa27c021af8f4d395cfd1a9 Thank you. |
JFI: upgrading Jedi would help here, too - it has better virtualenv support itself. For jedi-vim I've started working on commands to dynamically select a specific version. |
hi @blueyed , I am already using Jedi 0.12.0, will also give jedi-vim a try. |
@blueyed I know. So I have merged the changes.
When starts for deoplete-jedi... |
@thiamteck |
Problem summary
Code completion work well on python files without virtualenv, but when virtualenv activated, deoplete hit error on noevim startup as below;
The problem shall be due to the path it pointed to is contains front slash which is interpreted as command option in Windows.
Expected
Code completion shall still work with virtualenv
Environment Information
Provide a minimal init.vim with less than 50 lines (required)
Steps to reproduce the issue after starting Neovim (required)
env\Scripts\activate
nvim test.py
Screen shot (if possible)
The text was updated successfully, but these errors were encountered: