47

I have tried to install new package in conda for windows using the following command:

conda install -c conda-forge python-pdfkit

but got the following error:

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.

I have tried the following workarounds but no use, still getting the same error:

Workaround 1:

$conda create --name myenv $conda activate myenv

Workaround 2:

conda config --set ssl_verify false
CC BY-SA 4.0
1

6 Answers 6

49

As stated by a Conda maintainer in https://github.com/conda/conda/issues/8051#issuecomment-1549451621 their official position is that they know the old solver is slow and that is why they put effort in allowing the libmamba solver to be used in Conda.

To install:

conda install -n base conda-libmamba-solver

at which point you are free to use it once, e.g.:

conda install tensorflow --solver=libmamba

or set as default solver:

conda config --set solver libmamba

It usually solves in seconds.

For more installation info see: https://conda.github.io/conda-libmamba-solver/getting-started/

CC BY-SA 4.0
Sign up to request clarification or add additional context in comments.

2 Comments

CondaValueError: You have chosen a non-default solver backend (libmamba) but it was not recognized. Choose one of: classic
@MuhammadIkhwanPerwira I think this might be due to trying to set default solver in a base environment of an older anaconda version You can try getting a more recent version of Anaconda first and retrying, or maybe trying to create an env and set your solver there. See this issue on github: github.com/conda/conda/issues/12868
4

I have had a similar issue before and since I don't see your code I can't specify exactly what the solution is. All I know is that while installing conda package the following issues might occur:

  1. The package you are trying to install is not available in the conda-forge channel. In this case, you may need to try installing the package from a different channel, or you may need to specify a different channel in the conda install command.
  2. The package you are trying to install is not compatible with your current version of conda or with the other packages you have installed. In this case, you may need to try updating your version of conda or try installing a different version of the package.
  3. There is a problem with your conda configuration or with the conda environment you are using. In this case, you may need to try creating a new conda environment and installing the package there, or you may need to try re-installing conda itself.

If you are still having trouble installing the package after trying the above methods, Please give me more details about your specific situation, such as the version of conda you are using and the other packages you have installed. This will help me know more about your issue to be able to offer more specific suggestions.

Hope this will help somehow.

CC BY-SA 4.0

1 Comment

Still facing the same issue. Anaconda version: conda version : 22.11.1
2

I had the same problem and I solved it by using mamba. Just replace conda with mamba in your installation command.

For example: the following command didn't work for me:

conda install scikit-image

But, the following command works quickly:

mamba install scikit-image
CC BY-SA 4.0

Comments

1

i had the same problem trying to install matplotlib.

In my case, I had a channel_priority = strict.

I changed it to flexible with

conda config --set channel_priority flexible

hope it helps!

CC BY-SA 4.0

Comments

-1

Really I faced the same problem and it takes me all day to solve it. So my final idea was to create a new environment to download specific packages that the environment need, So I run code.

Code:

conda create --name tf tensorflow-gpu
CC BY-SA 4.0

1 Comment

conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0 <-- no work for me
-8

Don't use conda install for the basic installation of your base environment, if you have the same habit like me to install all the frequently-used packages to one base environment. Use only pip for this environment.

conda install will check out all the inconsistency of an environment, and this check is detailed to the "channel name" and "label hash", even your package's version is supported forthe installation, but it was installed from a different channel or different label, the installation will not be continued. Furthermore, this check is "recursive", it will keep on check which packages caused the inconsistency of the packages that were found inconsistency of the installing package...

- defaults/osx-64::pep8==1.7.1=py38hecd8cb5_1

Look at this line, this refers that this package "pep8" of version "1.7.1" of channel "defaults/osx-64" of label "py38hecd8cb5_1"is inconsistency. Maybe the version "1.7.1" is Ok but the label "py38hecd8cb5_1" is not Ok that means you must download this package from exactly the same label with the installing package.

So actually, Conda encourages users to create multiple different environments, each with a small number of packages installed, and to use them for a single task scenario.

CC BY-SA 4.0

2 Comments

I did not downvote this, but yes, don't do that. I would say never use pip in base and use pip in envs if and only if there is no other way. The main reason is it will create quite hard to debug conflicts down the road
Don't use pip in a conda environment unless absolutely nothing else will work. Seriously. Its very much the wrong way to go. pip has a completely different dependency resolution tree and your going to get stuff overwriting each other all over the place. Further it completely breaks reproducability because your environment wont be accurately resolved via conda environment --from-history

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.