Removing Conda
Conda is a package and environment manager that is popular in the data science world. When it is installed, it modifies your shell configuration (~/.bashrc on Linux, the PowerShell profile on Windows) to add its own paths near the top. This means that commands like python and pip can point to Conda’s own copies even when you have a virtual environment activated.
If you run which pip (Linux) or where pip (Windows) and see a path containing miniconda or anaconda, Conda is interfering. This page explains how to check and, if needed, remove it.
Do I Need to Remove Conda?
Not necessarily. If you can activate a .venv and confirm that python and pip point inside it, everything is fine. The problem only occurs when Conda’s paths take precedence.
Check your current state:
which python # should be .venv/bin/python after activating .venv
which pip # should be .venv/bin/pip
where python # should be .venv\Scripts\python.exe
where pip # should be .venv\Scripts\pip.exe
If both point inside .venv, you do not need to do anything.
Remove Conda’s Shell Integration
The least invasive option is to remove the conda init block from your shell configuration without deleting Conda itself. This stops Conda from activating automatically on shell startup.
Conda provides a command to undo its own conda init:
conda init --reverse --all
Then reload your shell:
source ~/.bashrc # or ~/.zshrc if you use zsh
conda init --reverse --all
Close and reopen PowerShell after running this.
After this step, conda itself is still installed but will no longer intercept your shell paths.
Remove Conda Entirely
If you no longer need Conda at all, you can delete it completely.
conda init --reverse --all
rm -rf ~/miniconda3 # adjust the path if yours differs
Then reload your shell:
source ~/.bashrc
Run the Miniconda or Anaconda uninstaller from Add or Remove Programs in Windows Settings. Then remove any remaining Conda entries from your PATH environment variable.
Verify
Open a new terminal (do not reuse an existing one – the old session still has the old PATH) and check:
which python
which pip
where python
where pip
Neither path should contain miniconda or anaconda. If you have a .venv activated, both should point inside it.