conda / conda

A system-level, binary package and environment manager running on all major operating systems and platforms.
https://docs.conda.io/projects/conda/
Other
6.47k stars 1.68k forks source link

can't install anything using conda, it hangs in solving environment #8051

Closed solegalli closed 1 year ago

solegalli commented 5 years ago

Hello,

I don't seem to be able to install anything using conda. It hangs in "solving environment".

I tried: conda install -c anaconda pip conda install conda-build conda update conda conda install c- anaconda pandas

The all make conda try and resolve the environment until it crashes.

conda config --show-sources

gives:

channels:

I used to have conda-forge there, but I removed it after reading some threads. Either with or without I have the same problems.

I have conda 4.5.2 on windows.

Can you please help?

vincentX3 commented 2 years ago

已收到,稍后就看。

brainfo commented 2 years ago

已收到,谢谢。

vincentX3 commented 2 years ago

已收到,稍后就看。

cwfparsonson commented 2 years ago

I had this issue and removing conda-forge did not fix it. In the end I fixed it by using libmamba.

I had to:

  1. Go into my base conda environment and update my base python version to >3.7 using conda install -n base python=3.7 (N.B. trying to update to anything >3.7 would result in my environment hanging, so it had to be python==3.7)
  2. Update conda in my base environment with conda update -n base -c defaults conda
  3. Install libmamba in my base environment with conda install -n base conda-libmamba-solver
  4. Set my default solver to libmamba with conda config --set experimental_solver libmamba

After doing the above, I could create a new environment and use conda as usual and everything was solved MUCH faster.

woldieassefa21 commented 1 year ago

As suggested by @solegalli, I was able to fix it by removing the conda-forge channel. To see if you have conda-forge installed, you can open your configuration file in .condarc or just enter conda config --get channels at your conda prompt. I removed the conda-forge line from .condarc, and I'm no longer getting the error. You can also enter conda config --remove channels conda-forge to remove it.

Strangely, after removing the channel, I've added it back and the error has not returned.

Edit: Note I did uninstall anaconda yesterday before trying this today, so there is a chance that was important. But the error did not disappear until I removed the channel.

Thank you! This worked for me, too. Excellent. I wish I can have a drink with you right? I struggled and you save me.

vincentX3 commented 1 year ago

已收到,稍后就看。

woldieassefa21 commented 1 year ago

Hello. I tried the suggestion by @solegalli , that is, to remove the conda-forge line from .condarc. It seems it worked for one time. But the problem persists. For several days, I tried to use all suggestions from the internet with no solution. After several days of trial and error, I solved my problem. The solution is, first of all, you have to get out of the prefix or root, "base". That is, first run "conda deactivate". Then "conda update conda". Then install any package you want. it worked well for me. My solution: conda deactivate conda update conda

vincentX3 commented 1 year ago

已收到,稍后就看。

Karlheinzniebuhr commented 1 year ago

Hello. I tried the suggestion by @solegalli , that is, to remove the conda-forge line from .condarc. It seems it worked for one time. But the problem persists. For several days, I tried to use all suggestions from the internet with no solution. After several days of trial and error, I solved my problem. The solution is, first of all, you have to get out of the prefix or root, "base". That is, first run "conda deactivate". Then "conda update conda". Then install any package you want. it worked well for me. My solution: conda deactivate conda update conda

conda deactivate
conda update conda

This was the only thing that actually worked for me. It is amazing that conda can just break so badly as to not being able to recover with any of the official fixes and documentations

monajalal commented 1 year ago

I am installing an env, here's its environment.yaml:

name: neuralsfm
channels:
  - pytorch
  - conda-forge
  - defaults
dependencies:
  - python=3.7
  - pytorch=1.8.0
  - torchvision=0.9.1
  - cudatoolkit=10.1
  - ipython
  - tqdm
  - matplotlib
  - pylint
  - conda-forge::jupyterlab
  - conda-forge::h5py=3.1.0
  - conda-forge::loguru=0.5.3
  - conda-forge::scipy
  - conda-forge::numba
  - conda-forge::ipdb
  - conda-forge::albumentations=0.5.1
  - pip
  - pip:
    - -r requirements.txt

and here's what happens when it gets stuck: conda_hang1 conda_hang2 conda_hang3 conda_hang4

Do you have any suggestion for fixing this problem?

https://github.com/zju3dv/OnePose_Plus_Plus/issues/10

(base) mona@ard-gpu-01:~$ uname -a
Linux ard-gpu-01 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
(base) mona@ard-gpu-01:~$ lsb_release -a
LSB Version:    core-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:    22.04
Codename:   jammy

and

$ conda -V
conda 22.9.0
vincentX3 commented 1 year ago

已收到,稍后就看。

milan090 commented 1 year ago

Issue still persists 4 years later

vincentX3 commented 1 year ago

已收到,稍后就看。

Karlheinzniebuhr commented 1 year ago

I ended up using mamba. Solves dependencies in seconds and never just hangs idle

msanchezr99 commented 1 year ago

Conda lists the following as my default channels:

  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/free
  - https://repo.anaconda.com/pkgs/r
  - https://repo.anaconda.com/pkgs/pro
  - https://repo.anaconda.com/pkgs/msys2

Changing my .condarc from

channels:
  - conda-forge
  - defaults

to

channels:
  - conda-forge
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/free
  - https://repo.anaconda.com/pkgs/r
  - https://repo.anaconda.com/pkgs/pro

To explicitly remove https://repo.anaconda.com/pkgs/msys2 appears to have fixed the problem for me. Thanks to @soapy1 for the hint!

For me conda stayed forever in the solving enviroment problem. After I changed the .condarc to have my default channels without the msys2 one worked! Thank you!!

travishathaway commented 1 year ago

Hi all,

Conda maintainer here 👋. I just want to give some clarity about our position regarding "slow solving". Our official position is to either use the conda-libmamba-solver (more information here: https://conda.github.io/conda-libmamba-solver/getting-started/) or to install mamba using micromamba (more information here: https://mamba.readthedocs.io/en/latest/installation.html#micromamba).

We know the old solver is slow which is why we put so much effort into to allowing the libmamba solver to be used within conda.

In the meantime, I will be closing this issue because releasing the new conda-libmamba-solver essentially is the solution to this problem.

vincentX3 commented 1 year ago

已收到,稍后就看。

deguich commented 1 year ago

I know it's an old closed issue but it's still the best link on google for keyword "conda cannot use conda-forge".

In my case, the problem was related to a lack of memory. The processing of the conda-forge repodata.json file took too much RAM space, and conda stopped abruptly without any error message.

(base) /root > conda create --name test -c conda-forge python=3.10
Channels:
 - conda-forge
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): / #                                                                                                                                                  

Adding 10G swap file solve it. conda version : 23.9.0

vincentX3 commented 1 year ago

已收到,稍后就看。

EldarMu commented 8 months ago

I know it's an old closed issue but it's still the best link on google for keyword "conda cannot use conda-forge".

In my case, the problem was related to a lack of memory. The processing of the conda-forge repodata.json file took too much RAM space, and conda stopped abruptly without any error message.

(base) /root > conda create --name test -c conda-forge python=3.10
Channels:
 - conda-forge
 - defaults
Platform: linux-64
Collecting package metadata (repodata.json): / #                                                                                                                                                  

Adding 10G swap file solve it. conda version : 23.9.0

Had Solving Environment / Killed happening, this turned out to be the case there too since I was installing on a vm with 1gb ram.

vincentX3 commented 8 months ago

已收到,稍后就看。

aemadin commented 6 months ago

updated my very old conda version and that helped. used the below command conda install conda==24.4.0

vincentX3 commented 6 months ago

已收到,稍后就看。

donaldafeith commented 1 month ago

This may be useful to anyone who might be having issues. Try conda config --set channel_priority strict conda install -n base conda-libmamba-solver conda config --set solver libmamba conda clean --all

Fixed most of my issues that I had with the solver just spinning for too long and nothing happening.

vincentX3 commented 1 month ago

已收到,稍后就看。