Solving environments failed when trying to install a package from conda-forge - anaconda

when trying to install any package from conda-forge, it raises the following error :
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.
but when i try to install the same package not from conda-forge, everything is ok and there's no problem.
what's the problem here and how can i solve it?
i tried removing and reinstalling conda-forge channel as it worked for some people, but it didn't solve the problem for me

Related

Cannot install geopandas

I am trying to instal geopandas. It goes like this:
(base) PS C:\Users\a_e_f> conda install geopandas
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.
Examining tornado:*
etc etc for more than an hour.
How I got here:
I installed anaconda many months ago but never got around to using it. Now I need to do something with geopandas so...
I tried to update anaconda. Got some warnings & so decided to uninstall it & do a new clean install.
I attempted to uninstall anacondas but found the instructions unclear & missed a step. Reinstalled anaconda. geopandas wouldn't install.
Research revealed the missing uninstall step. Did it again. Looked like it was all gone.
Installed anaconda. Verified as here: https://docs.anaconda.com/anaconda/install/verify-install/#
Tried to install geopandas. See above.
I am using Windows 10
Do not install packages into the base environment, create new, clean ones for your project.
Use conda-forge channel where GeoPandas team has the ability to fine tune installation process
conda create -n geo_env
conda activate geo_env
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
conda install geopandas
if that doesn't help, use mamba to install GeoPandas.
conda create -n geo_env
conda activate geo_env
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
conda install mamba
mamba install geopandas
Following merv's hints (above) I used the approach here: Conda install some-package hangs with (Solving environment: failed)
That seems to have fixed the problem.
Thanks all for your help.

conda install python-graphviz: stuck at Solving environment

When I tried to conda install python-graphviz in Anaconda3 on my Ubuntu machine, it stuck at Solving environment:
(base) $ conda install python-graphviz
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: /
What's the problem?
I had the same problem. The following was my solution:
Install graphviz manually.
E.g. for ubuntu:
sudo apt install graphviz graphviz-dev
Then do a pip install for the python package.
pip install graphviz
Confusingly the pip install of graphviz is the same as the conda install of python-graphviz. (bad naming)
Typing this from my phone so better double check my commands for typos. Let me know if that solved it.

conda not installing packages

I am unable to install packages through conda. When I run conda install, I get this output.
(base) C:\Users\Madhan_Kumar>conda install pytesseract
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
this is happening since I uninstalled and reinstalled anaconda. conda was working properly before that.
Does anyone know how to solve this?

Failed "solving environment" for python 3.8 installation through anaconda

(base) Apples—MacBook—Pro-2:— sailong$ conda install python=3.8
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: 1
(base) Apples—MacBook—Pro-2:— sailong$ conda install python=3.8
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.
Examining conflict for sqlalchemy pyopenssl conda—package—handling pytest—openfiles pathlib2 py—lief sortedco/ a
Did anyone encounter the same problem or knows how to tackle it?
I experience a lot of problems after updating the system.
System: MacOS Catalina V10.15.3
I've fixed this problem by uninstall the "whole" python and reinstall with conda. I think the problem maybe due to the other conda python 3.7 package related,
conda remove --force
These are common Problems when you install Anaconda via the GUI installer, Install Anaconda using the Bash Shell Script from Anaconda.com . This will solve most of the issues.
https://repo.anaconda.com/archive/Anaconda3-2021.11-MacOSX-x86_64.sh
This one worked for me, use "sudo"

Can't create Anaconda environment with python=3.4

I'm trying to set up a Anaconda environment with Python=3.4.
(base) C:\WINDOWS\system32>conda create -n py34 version=3.4
I already include the conda-forge channel, but still get this error:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- version=3.4
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
- https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
When i try it with:
(base) C:\WINDOWS\system32>conda create -n py34 python=3.4 -c conda-forge
I get:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Package vc conflicts for:
python=3.4 -> vc=10
Package pip conflicts for:
python=3.4 -> pip
Package vs2010_runtime conflicts for:
python=3.4 -> vs2010_runtime
I'm pretty new to Anaconda and Python and dont know what to search for anymore.
This post: Why conda cannot create environment with python=3.4 installed in it didnt help either.
Firstly you can provide more details by increasing the verbosity of the create command, which will provide useful debug messages. Each -v increases the verbosity from INFO to DEBUG to TRACE. I normally always use DEBUG because I hate seeing it just sit there when solving an environment.
conda create -v -v -v -n py34 python=3.4
I don't believe you needed to add conda-forge, the problem with your first command was that you didn't specify python=3.4, you did version=3.4. Try it without conda-forge and including python=3.4 instead.
It also looks like your conda is broken, it's failing to resolve the environments which is likely not helping the situation. Try to fix that with
conda update --all
If you are still stuck with the same problem then review the conflicts with the following commands
conda info vc
conda info pip
conda info vs2010_runtime
I believe there is a chance that some of the packages in your base are incompatible with 3.4. In this case you could try to install without any default packages
conda create --no-default-packages -n py34 python=3.4
If you are still running into issues, there is a chance there is something janky with your config files, so I would try doing a complete uninstall of anaconda on windows. And then attempt this again.
Ok, 3 days later i found out that the latest Version of Anaconda is kinda broken. I downgraded to version 4.6.14 and now everythings seems to work.
conda config --set allow_conda_downgrades true
conda install conda=4.6.14
Solving environment: failed with current_repodata.json, will retry with next repodata source. UnsatisfiableError:

Resources