Managing Python — conda 24.3.1.dev23 documentation (2024)

Conda treats Python the same as any other package, so it is easyto manage and update multiple installations.

Conda supports Python 3.8, 3.9, 3.10, 3.11 and 3.12.

Viewing a list of available Python versions#

To list the versions of Python that are available to install,in your terminal window, run:

conda search python

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, run:

Installing a different version of Python#

To install a different version of Python without overwriting thecurrent version, create a new environment and install the secondPython version into it:

  1. Create the new environment:

    • To create the new environment for Python 3.9, in your terminalwindow run:

      conda create -n py39 python=3.9

      Note

      Replace py39 with the name of the environment youwant to create. python=3.9 is the package and version youwant to install in this new environment. This could be anypackage, such as numpy=1.19, or multiple packages.

  2. Activate the new environment.

  3. Verify that the new environment is your currentenvironment.

  4. To verify that the current environment uses the new Pythonversion, in your terminal window, run:

    python --version

Installing PyPy#

To use the PyPy builds you can do the following:

conda config --add channels conda-forgeconda config --set channel_priority strictconda create -n pypy pypyconda activate pypy

Using a different version of Python#

To switch to an environment that has different version of Python,activate the environment.

Updating Python#

To update Python to the latest version in your environment, run:

conda update python

This command will update you to the latest major release (e.g. from python=3.10 to python=3.12).

If you would like to remain on a minor release, use the conda install command instead:

conda install python=3.10
Managing Python — conda 24.3.1.dev23 documentation (2024)
Top Articles
Latest Posts
Article information

Author: Allyn Kozey

Last Updated:

Views: 5700

Rating: 4.2 / 5 (43 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Allyn Kozey

Birthday: 1993-12-21

Address: Suite 454 40343 Larson Union, Port Melia, TX 16164

Phone: +2456904400762

Job: Investor Administrator

Hobby: Sketching, Puzzles, Pet, Mountaineering, Skydiving, Dowsing, Sports

Introduction: My name is Allyn Kozey, I am a outstanding, colorful, adventurous, encouraging, zealous, tender, helpful person who loves writing and wants to share my knowledge and understanding with you.