49

I'm trying to downgrade python version of anaconda via conda install python=3.3, but have following error:

~/anaconda3/bin$ ./conda install python=3.3
Fetching package metadata .........
Solving package specifications: .


UnsatisfiableError: The following specifications were found to be in conflict:
  - gevent -> python 2.6*
  - python 3.3*
Use "conda info <package>" to see the dependencies for each package.

How to resolve conflicts with the packages?

mrgloom
  • 20,061
  • 36
  • 171
  • 301

4 Answers4

87

If you want to set specific version, use it like this:

WARNING: This command will overwrite the default python version system-wise

conda install python=3.6


To create environment with a specific version, you can do:

conda create -n $PYTHON36_ENV_NAME python=3.6 anaconda  # set custom env name

The anaconda at the end allows the env to use all anaconda packages


For more information refere to Anaconda documentation

CermakM
  • 1,642
  • 1
  • 16
  • 15
  • 2
    Hi. I did `conda install python=3.6.6` but got `3.6.9` installed. How to force conda to install requested version? – Confounded Nov 01 '19 at 14:00
  • This will not set it as default. – Ash Sep 29 '20 at 14:37
  • @CermakM, I think you are right, I want to downgrade python version in Spyder Anaconda from 3.8 to 3.7. I run following commands and a message shows IT MAY TAKE FEW MONUTES, but it is running and running (like half an hour) to solve conflicts: conda search python conda install python=3.7.0 – tursunWali Feb 20 '21 at 00:11
  • 1
    well, this command is did not work for me: conda install python=3.7.0, in Spyder it is still shows Python 3.8.5. I gonna try : conda create --name py33 python=3.3 – tursunWali Feb 20 '21 at 00:15
11

There are two ways to downgrade python in anaconda.

1. Downgrade python in the active environment

(This can lead to conflicts with installed packages for higher python versions)

conda activate nameOfYourEnvironment
conda install python=3.3

2. Create a new environment

(This is a more safer way, but you need to reinstall all packages)

conda activate base
conda create --name env_name python=3.3

Hint: Use conda list before creating a new environment to get the names of all installed packages in the actual environment.


If you want to check your installed environments do:

conda env list

If you got problems in installing, make sure to run the shell as administrator (always recommended).

JAdel
  • 1,309
  • 1
  • 7
  • 24
7

You can make environments with other versions of Python using this command:

conda create --name py33 python=3.3
source activate py33
ally-e
  • 1,515
  • 10
  • 13
7

Very firstly check the current version using command python --version. Then on anaconda prompt type the command conda search python which will list all the python versions available till date. Then from that list select your version and type conda install python=3.5.2 or any of your choice

hrithikpy7336
  • 71
  • 1
  • 2