I need to downgrade my conda version from 4.3 to 4.2 on my CentOS 6.7 machine. What is the command required to do that?
I wouldn't recommend downgrading conda
except when the newly installed (upgraded) version has a critical bug.
But since you asked: You can specify a version by appending ={version}
to the packages, this works even for the conda
package:
$ conda install conda=4.2
If you want a specific 4.2
version you can also use (for example):
$ conda install conda=4.2.15
Note that downgrading conda can be very risky. After the downgrade your conda
could fail completely or work incorrectly. Conda uses a lot of metadata that evolve over time ... so if the downgraded conda version cannot make sense of these - or even worse corrupt them - you'll have a painful experience in how to recover your conda environemnt. Downgrade conda at your own risk (and in my opinion only if really, really necessary)!
In case you already downgraded conda
and it's throwing exceptions (for example CondaUpgradeError
) at you, then maybe this "section" in an troubleshooting guide in the conda repository may be useful:
Conda upgrade error
Cause
Downgrading conda from 4.6.1 to 4.5.x and then trying to
conda install conda
orconda upgrade conda
will produce a solving and upgrade error similar to the following:Solving environment: failed CondaUpgradeError: This environment has previously been operated on by a conda version that's newer than the conda currently being used. A newer version of conda is required. target environment location: /opt/conda current conda version: 4.5.9 minimum conda version: 4.6
Solution
Change the .condarc file. Set the parameter by editing the .condarc file directly:
allow_conda_downgrades: true
in conda version 4.5.12. This will then let you upgrade. If you have something older than 4.5.12, install conda 4.6.1 again from the package cache.EXAMPLE: If my
conda info
sayspackage cache : /opt/conda/pkgs
and my Python version is 3.7, then on the command line, typeconda install /opt/conda/pkgs/conda-4.6.1-py37_0.tar.bz2
to resolve the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With