Change the Python Version in Anaconda

This article introduces various methods to change the Python version in Anaconda.
Once you change the Python version on the Anaconda command prompt, you can use the following command to display the current version of Python.
Use the conda install Command on the Anaconda Command Prompt
Use the conda install command on the Anaconda command prompt to change the Python version. Follow this example below.
Here’s another example.
Use the Latest Anaconda Installer
Use the latest Anaconda installer to update the Python version. It is a graphical installer.
You will find the newer versions of Python here.
You will find the older versions of Python here.
Use the conda create Command on the Anaconda Command Prompt
If you’d like to install the new version of Python in a particular environment, you could use the conda create command.
Managing Python
Conda treats Python the same as any other package, so it is easy to manage and update multiple installations.
Conda supports Python 3.8, 3.9, 3.10, and 3.11.
Viewing a list of available Python versions
To list the versions of Python that are available to install, in your terminal window or an Anaconda Prompt, run:
This lists all packages whose names contain the text python .
To list only the packages whose full name is exactly python , add the —full-name option. In your terminal window or an Anaconda Prompt, run:
Installing a different version of Python
To install a different version of Python without overwriting the current version, create a new environment and install the second Python version into it:
Create the new environment:
To create the new environment for Python 3.9, in your terminal window or an Anaconda Prompt, run:
Replace py39 with the name of the environment you want to create. anaconda is the metapackage that includes all of the Python packages comprising the Anaconda distribution. python=3.9 is the package and version you want to install in this new environment. This could be any package, such as numpy=1.19 , or multiple packages .
Verify that the new environment is your current environment .
To verify that the current environment uses the new Python version, in your terminal window or an Anaconda Prompt, run:
Installing PyPy
To use the PyPy builds you can do the following:
Using a different version of Python
To switch to an environment that has different version of Python, activate the environment .
Updating or upgrading Python
Use the terminal or an Anaconda Prompt for the following steps.
If you are in an environment with Python version 3.4.2, the following command updates Python to the latest version in the 3.4 branch:
The following command upgrades Python to another branch—3.8—by installing that version of Python. It is not recommended, rather it is preferable to create a new environment. The resolver has to work very hard to determine exactly which packages to upgrade. But it is possible, and the command is:
Changing the Python Version in Conda
The latest version of Anaconda comes with Python 3.8. But sometimes you need to use an earlier release. With Anaconda, the preferred way to use a previous version of Python is to create a separate conda environment for each project.
For example, to create a fresh conda environment called my-cool-project with Python 3.7 and its own pip, run the following:
If you want a different version, like Python 3.6, just swap in python=3.6 . From there you can activate the my-cool-project environment and then pip install or conda install whatever you need. For example:
Then, to return to the base environment, just run:
If possible, use the above approach to manage different versions of Python on your machine. However, if you really need to, you can change the base version of Python with a one-liner:
If you confirm that you want to proceed, conda will replace all the version 3.8 packages (including the Python interpreter) in your environment with the corresponding 3.7 versions.
How to Easily Update Python & Anaconda in Windows
This post is more for my own purposes but if you’re reading this I hope it helps I’m a very basic Python user and I’ve battled a bit on how to keep Python updated; I use Anaconda plus have various packages installed via pip. Below is the process I use to keep Anaconda and Pip installed packages updated in Microsoft Windows.
Note: the below process will resolve any ‘Consider using the —user option or check the permissions’ error that you may receive.
Time needed: 15 minutes.
Follow the instructions below to update Python Anaconda and pip packages in Windows.
-
Open Anaconda Powershell Prompt
Search Windows for ‘Anaconda Powershell Prompt’ and click ‘run as Administrator’.

Enter the following code into the prompt and click enter on your keyboard:
conda update —all
Wait for the updates to complete.
Enter
python
into the prompt and click enter on your keyboard.
Enter the following code into the prompt and click enter on your keyboard:
import pkg_resources
from subprocess import call