How to use PowerShell terminal when switched to conda environment without adding conda to system path? #17900
Unanswered
Eric-Atlantis
asked this question in
Q&A
Replies: 1 comment 2 replies
-
You can set the But I think in this specific instance it won't help since We are also looking into how to simulate what |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I wonder if there is a suitable way to use the PowerShell terminal under a Miniconda virtual environment without adding conda to the system path.
It seems that the Python extension will try to execute the
conda activate base
command after the interpreter is switched toPython 3.9.5 64-bit ('base': conda)
and the PowerShell terminal is called byCtrl+~
. But this default action will not work and cause an error since conda is not added to the system path. I noticed that Command Prompt could work properly and Miniconda provided a link named "Anaconda Powershell Prompt (Miniconda3)". The Command Prompt usesC:/ProgramData/Miniconda3/Scripts/activate
andconda activate base
commands. The reasons why I did not add conda to the system path include that this is not recommended by Miniconda and that I have Python 3.8 environment outside.I have found a related question on StackOverflow. Is there any advice on this question? Many thanks for your help.
Environment Data
VS Code version: 1.61.2
Extension version: v2021.10.1365161279
OS and version: Windows 10 20H2
Python version: Python 3.8 and Miniconda py39_4.10.3
Type of virtual environment used: N/A, venv(probably replaced by Miniconda3 in the future), Miniconda3
Beta Was this translation helpful? Give feedback.
All reactions