-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Extension doesn't activate conda environment #6918
Comments
Thanks for reporting this issue. |
I have the same (or a very similar) issue. Environment data
Expected behaviourVS Code picks up the Conda environment specified in my Actual behaviourVS Code only picks up the base Conda environment:
Steps to reproduce:
conda create -n my_env python pylint pyface
#%%
import pyface
LogsOutput for cell
Output for
|
I found https://github.com/microsoft/vscode-python/issues/3123 to be the culprit. My workaround is to move up my project to be the first folder in my multi-root workspace |
@cristi-neagu, does that workaround help you? |
Hello, I apologise for not responding to this earlier. Limited time and all that. I shall respond tomorrow with the requested template. @ericsnowcurrently Unfortunately no, since it's not a multi-root workspace. It's just one folder. Like i said in my initial post, i don't think this is something caused by VS Code or by the Python extension. Something broke somewhere in my setup, it's just that i don't even know where to start. In any case, i shall post that template tomorrow. Thank you. |
Looks like the original issues isn't data science specific. Removing the label. |
Duplicate of #7696 |
Hello,
It used to be the case that when i ran a script in debug within a conda environment, the first time it would fail with the error
ImportError: DLL load failed: The specified module could not be found.
Right after the debugger would end, the console would runconda activate
to activate the environment, and running the script again would function correctly.But that isn't happening any longer. A few days ago i updated conda (using the prompt), and something went wrong and Anaconda shortcuts disappeared from the Start Menu. I reinstalled conda in the exact same location, and it is working fine. Jupyter Notebook launches correctly, runs ok, no problems. But now VS Code doesn't activate the environment any longer. It does see the environments and i can select them. It does seem to use the selected environment, as it complains about pylint not being installed if i switch to an environment with no pylint.
I tried adding the conda folder to the path. This actually worked for 1 session of using VS Code, and now it doesn't work any longer, with me not changing absolutely anything. I tried initializing
cmd.exe
for use with conda, so now i can typeconda activate
in the Python debug terminal and it does activate the terminal and the script can run. But VS Code is still not doing it automatically.Also, when i installed conda, i did select the option that makes it visible to VS Code. I forget the actual wording, but it was on the same screen as the "add to path" option.
At this point i don't even know if this is a conda issue, a VS Code issue, or a Python extension issue. Any ideas are welcome.
Thank you.
The text was updated successfully, but these errors were encountered: