Steps to Create Conda Environment with Specific Python Version

We can make use of the conda create to create an environment, let us take a look at the steps to create one with a specific Python version.

  • Step 1:
    If you do not have Anaconda (Conda) installed make sure you install it first, or else you will get the error "command not found: conda"

    Anaconda Download Link: https://www.anaconda.com/download/

Miniconda Download Link: https://docs.conda.io/en/latest/miniconda.html

  • Step 2: Open Terminal (if on Mac/Linux) or Command Prompt (if on Windows)
  • Step 3: Now run the command,

    Syntax:

    conda create -n condapy39env python=<python-version>

    Example:

    conda create -n condapy311env python=3.11
  • Step 4:

    Once done, you are good to activate the conda environment,

    macOS
    conda activate condapy311env
    Windows/Linux
    source activate condapy311env
  • Conda Create Env using Python Version Example

    Comments & Discussion

    Facing issues? Have questions? Post them here! We're happy to help!