conda run is not supported for conda version 4.7.12 #6522
Unanswered
danieltuzes
asked this question in
Q&A
Replies: 1 comment
-
I am not completely sure how VS Code decides the default shell, I think maybe it looks at the I am not very familiar with Conda so I am not able to say much more unfortunately. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I get the error in title after trying to discover tests for my python project.
I use conda to manage environments, and have code-server installed. I start code-server from a conda environment itself, and my bash is set up to initialize conda too, i.e. when i open a new ssh terminal to the server, or via code-server in the GUI, (base) is already activated. However, I am not sure what shell is used by code-server.
If I run the command
conda activate abcd && echo 'e8b39361-0157-4923-60e1-22d70d46dee6' && python ~/.local/share/code-server/extensions/ms-python.python-2022.10.1/pythonFiles/printEnvVariables.py˛
from my terminal, I get the variables.I use code-server v4.9.1, code 1.73.1, and extensions pylance 2022.12.21 and python 2022.10.1.
See the python output log below.
[ERROR 2023-10-9 15:2:58.558]: conda run is not supported for conda version 4.7.12
[ERROR 2023-10-9 15:2:59.112]: getActivatedEnvironmentVariables [Error: Command failed: conda activate abcd && echo 'e8b39361-0157-4923-60e1-22d70d46dee6' && python /home/dt58527/.local/share/code-server/extensions/ms-python.python-2022.10.1/pythonFiles/printEnvVariables.py
CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>
Currently supported shells are:
See 'conda init --help' for more information and options.
IMPORTANT: You may need to close and restart your shell after running 'conda init'.
at ChildProcess.exithandler (node:child_process:402:12)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1100:16)
at Process.ChildProcess.handle.onexit (node:internal/childprocess:304:5)] {
code: 1,
killed: false,
signal: null,
cmd: "conda activate abcd && echo 'e8b39361-0157-4923-60e1-22d70d46dee6' && python /home/dt58527/.local/share/code-server/extensions/ms-python.python-2022.10.1/pythonFiles/printEnvVariables.py"
}
Beta Was this translation helpful? Give feedback.
All reactions