pythonic-emacs / anaconda-mode

Code navigation, documentation lookup and completion for Python.
GNU General Public License v3.0
707 stars 87 forks source link

makes virtual_environment in jedi setup code be expanduser'd #375

Closed jgrey4296 closed 4 years ago

jgrey4296 commented 4 years ago

When python-shell-virtualenv-root is set to a user directory (say "~/anaconda"), the line 170 of anaconda-mode.el: virtual_environment = jedi.create_environment(virtual_environment, safe=False) Errors out as follows:

`Traceback (most recent call last): File "", line 84, in File "/Users/jgrey/.emacs.d/.cache/anaconda-mode/0.1.13/jedi-0.13.2-py3.5.egg/jedi/api/environment.py", line 304, in create_environment return Environment(_get_executable_path(path, safe=safe))

File "/Users/jgrey/.emacs.d/.cache/anaconda-mode/0.1.13/jedi-0.13.2-py3.5.egg/jedi/api/environment.py", line 317, in _get_executable_path raise InvalidPythonEnvironment("%s seems to be missing." % python) jedi.api.environment.InvalidPythonEnvironment: ~/anaconda/bin/python seems to be missing.`

This pull request fixes that by calling expanduser on the virtual_environment path.

dakra commented 4 years ago

I merged it. I changed the commit message to imperative form but forgot to push to your branch so GitHub didn't pick up it's this PR, so I'll close manually. Thanks.