Managing Python in your environments

By default, when installing or updating packages in an environment, conda retrieves the latest possible versions of the requested package(s) and their dependencies that are compatible with the current environment.

Some packages (or package versions) are only compatible with certain versions of Python. If you’re trying to install a package that isn’t compatible with the version of Python used in your environment, conda will not install it. In this case, it’s often best to create a new environment that uses the required version of Python, along with the other packages you need.

To create a new environment with a specific version of Python and all the packages you need, run the following command:

# Replace <ENVIRONMENT> with the name of the new environment
# Replace <VERSION> with the specific version of Python you want to install
# Replace each <PACKAGE> with the name of a package you want to install in your new environment
conda create --name <ENVIRONMENT> python=<VERSION> <PACKAGE> <PACKAGE> <PACKAGE>

For more information on Managing Python, see the official conda documentation.