-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Jedi-vim not use Conda environment #907
Comments
I did a check. From this commit onward (2a43448) jedi doesn't use my activated conda-env as executable any more. Prior to this commit, jedi-vim use my activated conda-env as executable, but if no conda-env is activated (using root conda env), jedi-vim does not recognize the root conda-env. |
Apparently Jedi only check environment in $VIRTUAL_ENV, so my solution for now is: |
Is |
The environment var of conda is not well documented, but it appears to be the case here.
This project use |
Just wanted to confirm that this solution worked for me too, for getting Jedi to use my active conda environment. I added to my .vimrc: let $VIRTUAL_ENV = $CONDA_PREFIX But it seems like this should be handled by jedi |
If it helps you guys, I'm happy to discuss a pull request in Jedi that does this. It's probably pretty easy to do. Essentially it's another if. Here's an example, @roxma did this already for a Jedi fork: https://github.com/ncm2/ncm2-jedi/pull/20/files (@roxma or @shanest it would be nice if you guys could test this on Jedi master and PR this). |
Thanks; I'll take a look at this and make a PR soon! |
Would be great if this could be fixed. |
Does pull request 1440 work for you? That fixed this issue for me :) |
Sorry I don't use conda anymore. |
Thank you very much, it fixed my issue. |
I don't think it works any longer. I added verbose JediDebugInfo Jedi-vim debug informationjedi-vim version
Global PythonUsing Python version 3 to access Jedi. Settings
:version
|
Issue
Jedi-vim knows python in my conda env, but not use it. Instead it just use the base conda environment.
However it does use python in environment created by venv module.
Previously it worked OK for all env created with venv or conda, I'm currently on the latest version of jedi-vim.
Steps to reproduce
I create a new environment with
conda create -n pytorch python=3.7
and installed pytorch.Jedi knows about the environment but does not use it, so I can not autocomplete it with deoplete.
Output of “:verbose JediDebugInfo”
Create env with
venv
If I create a new environment using
python -m venv myenv
, jedi recognize and use the environment:The text was updated successfully, but these errors were encountered: