Conda virtual environment doesn't work #17491

Closed
opened 2026-01-31 05:44:09 +00:00 by claunia · 5 comments
Owner

Originally created by @nirajkale on GitHub (May 16, 2022).

Windows Terminal version

1.13.10983.0

Windows build number

10.0.19044.0

Other Software

Software: conda 4.10.3
I am trying to activate conda environment on Windows terminal using below command:
conda activate env_name
but it doesn't work nor it gives any error.

Steps to reproduce

install conda & try to activate any existing env (I created it using command prompt)
& then try activating it on terminal.

Expected Behavior

conda

It should activate that env & show it as a prefix

Actual Behavior

Nothing happens

Originally created by @nirajkale on GitHub (May 16, 2022). ### Windows Terminal version 1.13.10983.0 ### Windows build number 10.0.19044.0 ### Other Software Software: conda 4.10.3 I am trying to activate conda environment on Windows terminal using below command: conda activate env_name but it doesn't work nor it gives any error. ### Steps to reproduce install conda & try to activate any existing env (I created it using command prompt) & then try activating it on terminal. ### Expected Behavior ![conda](https://user-images.githubusercontent.com/40765055/168591829-e3e3be48-2197-48a6-ad2a-c555c348bfb6.PNG) It should activate that env & show it as a prefix ### Actual Behavior Nothing happens
claunia added the Needs-TriageIssue-BugNeeds-Tag-FixNeeds-Attention labels 2026-01-31 05:44:09 +00:00
Author
Owner

@nirajkale commented on GitHub (May 16, 2022):

FYI, I also tried creating a new env from within the new terminal & couldn't activate that also!

@nirajkale commented on GitHub (May 16, 2022): FYI, I also tried creating a new env from within the new terminal & couldn't activate that also!
Author
Owner

@zadjii-msft commented on GitHub (May 16, 2022):

Does conda activate --verbose tf23 log anything? (or similar - I couldn't find the conda docs for activate but I assumed it was just --verbose)

Are you using Command Prompt in the Terminal, or PowerShell/? I wouldn't expect different shells to make a difference here, but I wanted to be sure.

@zadjii-msft commented on GitHub (May 16, 2022): Does `conda activate --verbose tf23` log anything? (or similar - I couldn't find the `conda` docs for `activate` but I assumed it was just `--verbose`) Are you using Command Prompt in the Terminal, or PowerShell/? I wouldn't expect different shells to make a difference here, but I wanted to be sure.
Author
Owner

@elsaco commented on GitHub (May 16, 2022):

@nirajkale run conda activate powershell first then restart your shell session.

Sample output:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

Loading personal and system profiles took 841ms.
(base) PS C:\Users\tux> conda env list
# conda environments:
#
base                  *  C:\Users\tux\miniconda3
elsaco                   C:\Users\tux\miniconda3\envs\elsaco

(base) PS C:\Users\tux> conda activate elsaco
(elsaco) PS C:\Users\tux> conda env list
# conda environments:
#
base                     C:\Users\tux\miniconda3
elsaco                *  C:\Users\tux\miniconda3\envs\elsaco

(elsaco) PS C:\Users\tux>

This issue was reported many times, like https://github.com/conda/conda/issues/8428

@elsaco commented on GitHub (May 16, 2022): @nirajkale run `conda activate powershell` first then restart your shell session. Sample output: ``` Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. Try the new cross-platform PowerShell https://aka.ms/pscore6 Loading personal and system profiles took 841ms. (base) PS C:\Users\tux> conda env list # conda environments: # base * C:\Users\tux\miniconda3 elsaco C:\Users\tux\miniconda3\envs\elsaco (base) PS C:\Users\tux> conda activate elsaco (elsaco) PS C:\Users\tux> conda env list # conda environments: # base C:\Users\tux\miniconda3 elsaco * C:\Users\tux\miniconda3\envs\elsaco (elsaco) PS C:\Users\tux> ``` This issue was reported many times, like https://github.com/conda/conda/issues/8428
Author
Owner

@ghost commented on GitHub (May 20, 2022):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (May 20, 2022): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@nirajkale commented on GitHub (May 23, 2022):

I think you meant
conda init powershell ?
But yes, after doing this, I'm able to use the terminal with conda.
Thanks a lot :-)

@nirajkale commented on GitHub (May 23, 2022): I think you meant `conda init powershell ` ? But yes, after doing this, I'm able to use the terminal with conda. Thanks a lot :-)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17491