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 or conda 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 says package cache : /opt/conda/pkgs and my Python version is 3.7, then on the command line, type conda install /opt/conda/pkgs/conda-4.6.1-py37_0.tar.bz2 to resolve the issue.
Related
I have been trying to install rdkit using the line
conda install -c rdkit rdkit
which gave the following error:
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: /home/ss/miniconda3
current conda version: 4.5.12
minimum conda version: 4.9
Then upon trying to upgrade the version, the same error repeated.
How to work around this and upgrade the conda version?
I am trying to set up a conda environment with python 3.10 installed. For some reason, no install commands for additional packages are working. For example, if I run conda install pandas, I get the error:
PackagesNotFoundError: The following packages are not available from current channels:
- python=3.1
conda install -c conda-forge pandas doesn't work either. Not sure what the problem is.
Thats a bug in conda, you can read more about it here: https://github.com/conda/conda/issues/10969
Right now there is a PR to fix it but its not a released version. For now, just stick with
conda install python=3.9
Adding an answer as this issue has been fixed in the latest conda update. I faced the same issue in conda version 4.10.1 but it worked fine in version 4.11.0.
Update conda to the latest version with
conda update -n base -c defaults conda
Now install the required packages.
conda install -n py310 python=3.10 works for me.
Conda 4.10 is incompatible with python 3.10.
To use python 3.10 or newer, you need to update to conda 4.11+. If you cannot update conda, you need to revert to python 3.9 or older.
Read more on the on the link provided by vbraun. This reply is to clarify possibilities for the users.
Can also use the conda-forge channel:
conda install -c conda-forge python=3.10
We must create a new environment with latest version of python and change to this new environment inside anaconda navigator
I want to install sklearn-pandas for data science on my conda environments so I switch to my Python2 Conda environment and use skeleton to build it in:
conda skeleton pypi sklearn-pandas
conda-build sklearn-pandas
conda install --use-local sklearn-pandas
The problem is, this builds in a bunch of python 3 dependencies, and at the end of it all when I run python --version I get
Python 3.6.6
This means that it had to upgrade the python version of the environment to accommodate the package it installed.
I think this library should be compatible with Python 2, it even says in its Git repo "build universal wheel compatible with python 2 and python 3".
What arguments do I need to pass to conda skeleton, build, and install so that it installs and builds it for Python 2 and doesn't do this unwanted upgrade?
Figured this out - you only need to add one flag to the conda-build step. It's:
conda-build --python 2.7 sklearn-pandas
Although in the conda skeleton stage of the installation it appears to bring in py36 packages, once you do this conda-build step with the flag it replaces them with py27.
Some of my python packages on anaconda cannot be updated to the latest version.
For instance, beautifulsoup4 latest version on anaconda is v4.71 as seen in the release notes.
https://docs.anaconda.com/anaconda/reference/release-notes/
However, when I run conda update beautifulsoup4, the latest version that I can update to is v4.6.
I discovered that the channel used by beautifulsoup4 is pypi.
# Name Version Build Channel
beautifulsoup4 4.6.0 pypi_0 pypi
bleach 3.1.0 py_0 conda-forge
I suspect if I were to change the channel from pypi to conda-forge, I should be able to update to the latest version.
How can I change the channel from pypi to conda-forge? Or does the solution lies somewhere else?
I am using Windows 10 64-bit, python 3.7.
I was running through this problem myself.
Let's take a look at versions in conda-forge and PyPi:
Conda Forge
PyPi
Both are actually up to date. So the problem here isn't as much the channels but conda mixing up the reference for the labels.
Update conda with
conda update
This will actually spew out a message telling you to run the command with a prefix for the proper path for your environment. Should be something like this:
conda update --prefix C:\Users\yourAccount\AppData\Local\Continuum\anaconda3 anaconda
Run that and it will update packages as well, including beautifulsoup4.
After this, you'll notice that creating new environment with just conda install beautifulsoup4 will return you the latest version.
Another curious thing to notice is that
There aren't distributions of 4.7 for Win-32 or Linux-32. So, if you are on either of those, updating conda won't help. You'll have to get the source code and build it yourself (if it is even possible).
I used the following command below in the Anaconda shell prompt, I am on windows 7.
When I installed in Anaconda Navigator I got a much older version of
cvxpy version 0.4.10 instead of : win-64 v1.0.1.
Here is the details on the conda site:
===============================
https://anaconda.org/cvxgrp/cvxpy
Installers
conda install
linux-64 v1.0.6
win-64 v1.0.1
osx-64 v1.0.6
noarch v0.4.2
To install this package with conda run:
conda install -c cvxgrp cvxpy
=================================
I am wondering if the author of this package may not have properly
setup the more current version on Conda.
This has occurred with other python packages in the past on Conda.
Hope someone would know how to get this installed.
I actually tried to follow the instructions based on another question, but it did not work. See my reasons below in the comment section.