You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python version & distribution: Python 3.6, Miniconda
Type of virtual environment used: conda
Actual behaviour
I have a few python files in c:\temp\foo and I create a local conda environment in c:\temp\foo\myenv with
C:\temp\foo>conda create -p myenv python=3.6
Note that this environment is stored in c:\temp\foo\myenv, not globally.
I can successfully select this environment in VS Code (lower left corner) - it says "Python 3.6.9 64-bit ('myenv': conda)".. fine.
But when I open a python file and select "Python: Run Python File in Terminal" a terminal opens and prints the following error when activating the environment:
C:\temp\foo>activate myenv
Could not find conda environment: myenv
You can list all discoverable environments with `conda info --envs`.
C:\temp\foo>C:/temp/foo/myenv/python.exe c:/temp/foo/test.py
hey
C:\temp\foo>
Expected behaviour
Instead of activate myenv the right thing to run would be activate .\myenv or activate c:\temp\foo\myenv.
The text was updated successfully, but these errors were encountered:
We are moving to using conda run which runs an executable from within a conda environment without activating it. It won't need activate, so this would be fixing all these issues. Closing this in favor of #7425
Environment data
Actual behaviour
I have a few python files in c:\temp\foo and I create a local conda environment in c:\temp\foo\myenv with
C:\temp\foo>conda create -p myenv python=3.6
Note that this environment is stored in
c:\temp\foo\myenv
, not globally.I can successfully select this environment in VS Code (lower left corner) - it says "Python 3.6.9 64-bit ('myenv': conda)".. fine.
But when I open a python file and select "Python: Run Python File in Terminal" a terminal opens and prints the following error when activating the environment:
Expected behaviour
Instead of
activate myenv
the right thing to run would beactivate .\myenv
oractivate c:\temp\foo\myenv
.The text was updated successfully, but these errors were encountered: