Reputation: 375
So I am using vscode with conda (for a django project), and trying to activate my virtual environment named "venv". And it goes from:
(base) C:\Users\User\Desktop\pfa-master\pfa-master\venv\Scripts> .\activate
to something like this:
(venv) (base) C:\Users\User\Desktop\pfa-master\pfa-master\venv\Scripts>
And if I try to find out Python version, it shows error like this:
(venv) (base) C:\Users\User\Desktop\pfa-master\pfa-master>which python
'which' is not recognized as an internal or external command,
operable program or batch file.
Note: I have Python in environment variables for anaconda.
What am I doing wrong?
Upvotes: 13
Views: 18898
Reputation: 81
You have two virtual environments active.
conda and virtualenv are both package manager and environment management system :
If you want to use (venv) only, you need to deactivate conda : conda deactivate
If you want to use (base) only, you need to delete the venv directory from your repository :
sudo rm -rf venv
. Command differs because you are using Windows.
Upvotes: 7
Reputation: 11
first you can use activate
to activate venv, and then use conda deactivate
to deactivate (base).
Upvotes: 1
Reputation: 121
You need to deactivate Conda. In terminal, conda deactivate
should get rid of (base). When you want to reactivate Conda, conda activate
.
Upvotes: 12
Reputation: 108
if you have anaconda in your environmental PATH, try activate venv
. Also, try restarting VScode sometimes it glitches.
Upvotes: 0
Reputation: 493
Use the command python -V
to find the installed python version and pip -V
to get the current pip version.
Upvotes: 0