Pierre
Pierre

Reputation: 23

issues with Python version when I am using conda install

I tried to install optitype as follow:

conda install -c bioconda optitype

I got the message:

Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Solving environment: | Found conflicts! Looking for incompatible packages. This can take several minutes. Press CTRL-C to abort. failed

UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment:

Specifications:

Your python: python=3.8

If python is on the left-most side of the chain, that's the version you've asked for. When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.

The following specifications were found to be incompatible with your system:

Your installed version is: 2.31

So, I tried to install python 2.7 in conda:

conda install -c anaconda python=2.7

which gave me hundred of conflicts and finished by saying that I installed:

Your installed version is: 2.31

I re-tried to install optitype but it's not working!

If someone has an idea!

Upvotes: 0

Views: 1470

Answers (1)

merv
merv

Reputation: 76720

Bioconda as a channel builds atop the conda-forge channel. Any specification that does not prioritize that (such as prioritizing anaconda channel) is incorrect. Also, do not bother changing Python versions in-place beyond patches - nearly every package will have to be reinstalled, such that it is much more simple for the solver to create a new environment. Try something like,

# name the environment something meaningful (not "foo")
conda create -n foo -c conda-forge -c bioconda python=2.7 optitype

Feel free to include additional packages that you require in the same line.

Note that mamba is much faster than conda, especially when solving for older packages like this. That is, were I installing this, I would use:

# install mamba if not already installed
conda install -n base -conda-forge mamba

mamba create -n foo -c conda-forge -c bioconda python=2.7 optitype

Upvotes: 1

Related Questions