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
{{ message }}
Repository navigation
Subprocess for 'conda run [' ......']' command failed. #9507
vscode 1.41.1
Latest version of ms-python.python 2020.1.57204
python 3.7.5, Mac OSX Catalina
I am running miniconda and have selected my env Python 3.7.5 64-bit ('octant':conda)
(which is displayed in lower left of window)
The run button outputs the following
source /Users/paulyoung/miniconda3/bin/activate
conda activate octant
➜ DataPrep source /Users/paulyoung/miniconda3/bin/activate
conda activate octant
conda run -n octant python /Users/paulyoung/MyData/Code/DataPrep/Prepare_Dataset.py
(base) ➜ DataPrep conda activate octant
(octant) ➜ DataPrep conda run -n octant python /Users/paulyoung/MyData/Code/DataPrep/Prepare_Dataset.py
ERROR conda.cli.main_run:execute(30): Subprocess for 'conda run ['python', '/Users/paulyoung/MyData/Code/DataPrep/Prepare_Dataset.py']' command failed. (See above for error)
Traceback (most recent call last):
File "/Users/paulyoung/MyData/Code/DataPrep/Prepare_Dataset.py", line 1, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
However from within the terminal I can run the file with python Prepare_Dataset.py with no issues (the terminal has a prompt showing me that I am within my virtualenv)
BTW have run conda list at the terminal
and numpy is in the environment
Activity
ghost added
triage-neededNeeds assignment to the proper sub-team
Hi, I just had a similar problem. I solved it by downgrading to the previous version of ms-python.python. (2019.11.50794)
I'm not knowledgeable enough about why this worked, I just found the connection in time of when my programs stopped working and the time of the extension update.
EDIT: they seem to be on to something here.
Had the same problem. The Januar Update seems to have broken the integration with conda. I wasn't able to select other environments than the conda base interpreter which was possible before. So if you need a quick fix just downgrade the Python extension and go back to the November 2019 Version. Solved all issues for me.
We started using conda run in the latest release, however due to problems with this command (as you noticed) we're removing its use in the extension for now (#9490), aiming for a hotfix release next week.
The fix is now merged in master, so if you're interested in trying it out before the release you are welcome to download our Insiders build (Settings -> "python.insidersChannel": "daily").
You can set "python.terminal.activateEnvironment" to false in your user settings and restart your termial to work around the problem temporarily. conda run command works well in the default base environment, but conda run -n ENV_NAME will crash if you have activated the ENV_NAME environment already.
Activity
Kallsup commentedon Jan 10, 2020
Hi, I just had a similar problem. I solved it by downgrading to the previous version of ms-python.python. (2019.11.50794)
I'm not knowledgeable enough about why this worked, I just found the connection in time of when my programs stopped working and the time of the extension update.
EDIT: they seem to be on to something here.
dev-mbusch commentedon Jan 10, 2020
Had the same problem. The Januar Update seems to have broken the integration with conda. I wasn't able to select other environments than the conda base interpreter which was possible before. So if you need a quick fix just downgrade the Python extension and go back to the November 2019 Version. Solved all issues for me.
kimadeline commentedon Jan 10, 2020
Hi everyone 👋
We started using
conda runin the latest release, however due to problems with this command (as you noticed) we're removing its use in the extension for now (#9490), aiming for a hotfix release next week.The fix is now merged in
master, so if you're interested in trying it out before the release you are welcome to download our Insiders build (Settings ->"python.insidersChannel": "daily").Thank you for your patience!
HyphonGuo commentedon Jan 11, 2020
You can set
"python.terminal.activateEnvironment"tofalsein your user settings and restart your termial to work around the problem temporarily.conda runcommand works well in the defaultbaseenvironment, butconda run -n ENV_NAMEwill crash if you have activated theENV_NAMEenvironment already.kimadeline commentedon Jan 14, 2020
Closing since the
conda runwork has been reverted in the latest release (2020.1.58038)