If Conda isn't calling the correct Python version after you have activated an environment, it's often due to misconfiguration or environment path issues. Here's why it happens and how to fix it:
Common Causes and Fixes
Below are the most frequent reasons why Conda doesn't switch to the correct Python version and how you can resolve each one quickly.
1. The Environment Was Created Without Specifying Python Version
If you created the environment without setting a Python version, Conda defaults to whatever is available.
Fix: Create the environment with the version you need:
conda create -n myenv python=3.10
Or update the Python version in an existing environment:
conda activate myenvconda install python=3.10
2. Shell Is Using System Python Instead of Conda's
Sometimes, the shell (especially in terminals like zsh, fish, or PowerShell) may continue using the system Python even after activation.
Fix: Ensure you're activating with the correct syntax:
conda activate myenv
Check which Python is being used:
which python # On Linux/macOSwhere python # On Windows
It should point to something like:
.../anaconda3/envs/myenv/bin/python
3. Environment Path Is Not Set Properly (Especially on Windows)
Conda may not correctly modify PATH due to permissions or shell config issues.
Fix: Run:
conda init
Then restart your shell. This sets up proper environment activation hooks.Also, verify that conda and your environment paths are in the system PATH.
Also Read: Using Python For Finance in 2025
4. Conflict With pyenv or Other Python Managers
If you’re using
pyenv, virtualenv, or other tools, they might override the Python binary Conda tries to use.
Fix: Temporarily disable or adjust your shell's path so Conda gets priority. Check .bashrc, .zshrc, or .profile for conflicts.
5. Conda Base Environment Takes Over
In some setups, Conda's base environment is auto-activated and may override new environments.
Fix: Disable auto-activation of base:
conda config --set auto_activate_base false
Then manually activate the correct environment.
Tip
After activating your environment, always verify the Python version:
python --version
If it doesn’t match, check
$PATH or
where/which python to debug what’s being used.