-
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
"Run Python File in Terminal" command fails due to using "conda run" #9433
Comments
I can't reproduce this with conda 4.7.12:
We can test to see if this is a bug specific to conda 4.8.1 and/or conda 4.8.0. |
I'm having the same issue on both conda 4.8.0 and 4.8.1. With import sys
print(sys.path) base ❯ conda run -n env_name python script.py
['/Users/pcosta/miniconda3/envs/env_name/lib/python37.zip', '/Users/pcosta/miniconda3/envs/env_name/lib/python3.7', '/Users/pcosta/miniconda3/envs/env_name/lib/python3.7/lib-dynload', '/Users/pcosta/miniconda3/envs/env_name/lib/python3.7/site-packages']
base ❯ conda activate env_name
env_name ❯ python script.py
['/Users/pcosta/miniconda3/envs/env_name/lib/python37.zip', '/Users/pcosta/miniconda3/envs/env_name/lib/python3.7', '/Users/pcosta/miniconda3/envs/env_name/lib/python3.7/lib-dynload', '/Users/pcosta/miniconda3/envs/env_name/lib/python3.7/site-packages']
env_name ❯ conda run -n env_name python script.py
['/Users/pcosta/miniconda3/lib/python37.zip', '/Users/pcosta/miniconda3/lib/python3.7', '/Users/pcosta/miniconda3/lib/python3.7/lib-dynload', '/Users/pcosta/miniconda3/lib/python3.7/site-packages'] It seems that running Since VS Code activates the environment beforehand, then runs |
Hello, I am having issue with
|
@giahung24 if you set |
Thank you! It worked. |
We are turning off |
Thanks for the update @karthiknadig! |
Environment data
Version: 1.41.1 (user setup)
Commit: 26076a4de974ead31f97692a0d32f90d735645c0
Date: 2019-12-18T14:58:56.166Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.18363
I'm using Conda environments, conda version 4.8.0
Expected behaviour
When I invoke the "Run Python File in Terminal" command it should call "python.exe" in the activated environment.
Actual behaviour
The command uses the experimental feature "conda run --name=environment". This feature doesn't work yet on my machine. It always invokes the base environment rather than the selected project environment.
Steps to reproduce:
import sys
print(sys.version)
It will print the python version of the base environment.
The text was updated successfully, but these errors were encountered: