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?

Cipcu commented 4 years ago

Have the same issue as @Architect0711. Cannot build my images.

jay6430 commented 4 years ago

first you should run the below commands before your desired package installation

conda create --name myenv conda activate myenv

daddydrac commented 4 years ago

I've installed latest Anaconda3. a first conda update conda went fine. Then stuck again.

conda clean -idoesn't help me. @joehoeller's trick (create env, activate,conda config --set ssl_verify False`) doesn't help either.

So, I cannot use conda at all.

One thing to note is that at least now a Ctrl-C does abort (with my previous anaconda2 installation I needed to kill conda with the task manager)

What’s the error output on cmd line?

FrankwaP commented 4 years ago

@joehoeller
Not the one who wrote this exact command, but "stuck" probably means the same as OP's "It hangs in "solving environment" ", which is what also happened to me. So there's no message at all. You just see "solving environment" and nothing happens, then after a while you come back to the command prompt.

Once again, in my case fixing it was just a matter of not using conda-forge. So it's probably more a matter of channel maintenance than code maintenance?

FrankwaP commented 4 years ago

@Architect0711

Your problem is not related to "can't install anything using conda, it hangs in solving environment". Please be more careful.

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

The message is pretty clear: you already have Python in the environment where you're executing the opencv installation command, and its version does not satisfy the compatibility check which is done when one uses conda install.

This is the perfect example of why to use conda: it enforces the compatibility of every libraries inside an environment, and if this prevents you from installing a new library, then you can easily create a new environment where everything will be OK (see @jay6430 answer).

KrisThielemans commented 4 years ago

there's no message at all. You just see "solving environment" and nothing happens, then after a while you come back to the command prompt.

thanks @FrankwaP for stepping in. that's correct.

in my case fixing it was just a matter of not using conda-forge.

I've deleted the channel and tried to install one thing. Seemed indeed to be working fine. Obviously, that isn't much use to me, but could help with solving the problem.

sdflkjssl commented 4 years ago

Try conda clean -i

ccwright commented 4 years ago

Updating conda and then running the following worked for me:

conda create --name myenv
conda activate myenv
alvgaona commented 4 years ago

So I've tried some things before being able to download packages without conda getting stuck and I did what many of you suggest. I'll gather all that in this comment.

  1. I tried installing conda v4.6.9 by running, in the base environment, conda install conda=4.6.9. Not sure if this had something to do with it but is worth mentioning it.
  2. I created another environment. I couldn't get packages installed in the root environment.
  3. Avoid using -c option to specify channels. Just go straight with conda install <package>.
  4. Set channel priority by running conda config --set channel_priority strict.

My guess is that conda is having issues installing packages other than in ~/anaconda3/envs. I can't say this will make it work for everyone but at least did it for me.

FWIW, I installed Anaconda with CLI installer and I'm running it on macOS Catalina 10.15.4.

Hope this gets fixed by the team soon. It's a blocker for many of us.

ShunTono commented 4 years ago

I face same problem that I could not update or download package.

(base) C:\Users\Shungo>conda update conda Collecting package metadata (current_repodata.json): failed

>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

Traceback (most recent call last):
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
    return func(*args, **kwargs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
    exit_code = do_call(args, p)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
    return getattr(module, func_name)(args, parser)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\cli\main_update.py", line 20, in execute
    install(args, parser, 'update')
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\cli\install.py", line 265, in install
    should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 117, in solve_for_transaction
    should_retry_solve)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 158, in solve_for_diff
    force_remove, should_retry_solve)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 262, in solve_final_state
    ssc = self._collect_all_metadata(ssc)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
    return f(*args, **kwds)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 415, in _collect_all_metadata
    index, r = self._prepare(prepared_specs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\solve.py", line 1011, in _prepare
    self.subdirs, prepared_specs, self._repodata_fn)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\index.py", line 228, in get_reduced_index
    repodata_fn=repodata_fn)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 105, in query_all
    result = tuple(concat(executor.map(subdir_query, channel_urls)))
  File "C:\Users\Shungo\anaconda3\lib\concurrent\futures\_base.py", line 598, in result_iterator
    yield fs.pop().result()
  File "C:\Users\Shungo\anaconda3\lib\concurrent\futures\_base.py", line 435, in result
    return self.__get_result()
  File "C:\Users\Shungo\anaconda3\lib\concurrent\futures\_base.py", line 384, in __get_result
    raise self._exception
  File "C:\Users\Shungo\anaconda3\lib\concurrent\futures\thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 98, in <lambda>
    package_ref_or_match_spec))
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 110, in query
    self.load()
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 174, in load
    _internal_state = self._load()
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 248, in _load
    repodata_fn=self.repodata_fn)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\conda\core\subdir_data.py", line 485, in fetch_repodata_remote_request
    timeout=timeout)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\adapters.py", line 412, in send
    conn = self.get_connection(request.url, proxies)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\adapters.py", line 309, in get_connection
    proxy_manager = self.proxy_manager_for(proxy)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\requests\adapters.py", line 199, in proxy_manager_for
    **proxy_kwargs)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\urllib3\poolmanager.py", line 470, in proxy_from_url
    return ProxyManager(proxy_url=url, **kw)
  File "C:\Users\Shungo\anaconda3\lib\site-packages\urllib3\poolmanager.py", line 420, in __init__
    raise ProxySchemeUnknown(proxy.scheme)
urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme None

$ C:\Users\Shungo\anaconda3\Scripts\conda-script.py update conda

environment variables: CIO_TEST= CONDA_BAT=C:\Users\Shungo\anaconda3\condabin\conda.bat CONDA_DEFAULT_ENV=base CONDA_EXE=C:\Users\Shungo\anaconda3\condabin..\Scripts\conda.exe CONDA_EXES="C:\Users\Shungo\anaconda3\condabin..\Scripts\conda.exe" CONDA_PREFIX=C:\Users\Shungo\anaconda3 CONDA_PROMPT_MODIFIER=(base) CONDA_PYTHON_EXE=C:\Users\Shungo\anaconda3\python.exe CONDA_ROOT=C:\Users\Shungo\anaconda3 CONDA_SHLVL=1 HOMEPATH=\Users\Shungo HTTPS_PROXY= HTTP_PROXY= PATH=C:\Users\Shungo\anaconda3;C:\Users\Shungo\anaconda3\Library\mingw-w64\ bin;C:\Users\Shungo\anaconda3\Library\usr\bin;C:\Users\Shungo\anaconda 3\Library\bin;C:\Users\Shungo\anaconda3\Scripts;C:\Users\Shungo\anacon da3\bin;C:\Users\Shungo\anaconda3;C:\Users\Shungo\anaconda3\Library\mi ngw-w64\ PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\Windows PowerShell\v1.0\Modules REQUESTS_CA_BUNDLE= SSL_CERT_FILE=

 active environment : base
active env location : C:\Users\Shungo\anaconda3
        shell level : 1
   user config file : C:\Users\Shungo\.condarc

populated config files : C:\Users\Shungo.condarc conda version : 4.8.2 conda-build version : 3.18.11 python version : 3.7.6.final.0 virtual packages : base environment : C:\Users\Shungo\anaconda3 (writable) channel URLs : https://conda.anaconda.org/conda-forge/win-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/win-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/win-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/win-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/pro/win-64 https://repo.anaconda.com/pkgs/pro/noarch package cache : C:\Users\Shungo\anaconda3\pkgs C:\Users\Shungo.conda\pkgs C:\Users\Shungo\AppData\Local\conda\conda\pkgs envs directories : C:\Users\Shungo\anaconda3\envs C:\Users\Shungo.conda\envs C:\Users\Shungo\AppData\Local\conda\conda\envs platform : win-64 user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.6 Windows/10 Windows/10.0.18362 administrator : False netrc file : None offline mode : False

If someone know solution, please teach me. Thank you

FrankwaP commented 4 years ago

@alvgaona

Pretty sure it's not point 2 but point 3 that solved your problem: I always create environments yet also had this issue, until I removed "-c conda-forge".

FrankwaP commented 4 years ago

@ShunTono

I face same problem that I could not update or download package.

No you don't since your install doesn't "hang in solving environment" as the post title says. No one here mentions this "urllib3.exceptions.ProxySchemeUnknown" you have.

This solved topic seems relevant: https://github.com/psf/requests/issues/5297 I found it with a "conda urllib3.exceptions.ProxySchemeUnknown" search (just saying so you know what to do next time). Look at "joh-ku" post which has clear instructions.

ShunTono commented 4 years ago

Thank you for your advice! I will check it.

EkilGitHub commented 4 years ago

it can work: conda clean -i

ahmadsadeed commented 4 years ago

I have issues installing geopandas. I opened an issue on their GitHub but later found out that the issue is not with geopandas. I can't install anything using conda.

https://github.com/conda-forge/geopandas-feedstock/issues/82#issue-622293206

I also tried conda clean --all and the steps mentioned in this post.

ahmadsadeed commented 4 years ago

Issue: I have tried multiple ways but can't install geopandas package. I tried geopandas install guide, but get output that runs forever. I tried without creating an environment, after creating a new environment, using defaults channel and using conda-forge channel. None worked. I tried removing anaconda completely and reinstalled.

$ conda create -n top 
$ conda activate top
$ conda config --env --add channels conda-forge
$ conda config --env --set channel_priority strict
$ conda install python=3 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: \ 

I don't want to use pip install because it is preferred to use conda install. Also I tried installing using Anaconda Navigator following this answer, but the progress bar keeps running saying solving package specifications.


Environment (conda list):

``` $ conda list # packages in environment at /Users/sadeed/opt/anaconda3/envs/top: # # Name Version Build Channel _ipyw_jlab_nb_ext_conf 0.1.0 py37_0 alabaster 0.7.12 py37_0 anaconda 2020.02 py37_0 anaconda-client 1.7.2 py37_0 anaconda-navigator 1.9.12 py37_0 anaconda-project 0.8.4 py_0 applaunchservices 0.2.1 py_0 appnope 0.1.0 py37_0 appscript 1.1.0 py37h1de35cc_0 argh 0.26.2 py37_0 asn1crypto 1.3.0 py37_0 astroid 2.3.3 py37_0 astropy 4.0 py37h1de35cc_0 atomicwrites 1.3.0 py37_1 attrs 19.3.0 py_0 autopep8 1.4.4 py_0 babel 2.8.0 py_0 backcall 0.1.0 py37_0 backports 1.0 py_2 backports.functools_lru_cache 1.6.1 py_0 backports.shutil_get_terminal_size 1.0.0 py37_2 backports.tempfile 1.0 py_1 backports.weakref 1.0.post1 py_1 beautifulsoup4 4.8.2 py37_0 bitarray 1.2.1 py37h1de35cc_0 bkcharts 0.2 py37_0 blas 1.0 mkl bleach 3.1.0 py37_0 blosc 1.16.3 hd9629dc_0 bokeh 1.4.0 py37_0 boto 2.49.0 py37_0 bottleneck 1.3.2 py37h776bbcc_0 bzip2 1.0.8 h1de35cc_0 ca-certificates 2020.1.1 0 certifi 2019.11.28 py37_0 cffi 1.14.0 py37hb5b8e2f_0 chardet 3.0.4 py37_1003 click 7.0 py37_0 cloudpickle 1.3.0 py_0 clyent 1.2.2 py37_1 colorama 0.4.3 py_0 conda-package-handling 1.6.0 py37h1de35cc_0 conda-verify 3.4.2 py_1 contextlib2 0.6.0.post1 py_0 cryptography 2.8 py37ha12b0ac_0 curl 7.68.0 ha441bb4_0 cycler 0.10.0 py37_0 cython 0.29.15 py37h0a44026_0 cytoolz 0.10.1 py37h1de35cc_0 dask 2.11.0 py_0 dask-core 2.11.0 py_0 dbus 1.13.12 h90a0687_0 decorator 4.4.1 py_0 defusedxml 0.6.0 py_0 diff-match-patch 20181111 py_0 distributed 2.11.0 py37_0 docutils 0.16 py37_0 entrypoints 0.3 py37_0 et_xmlfile 1.0.1 py37_0 expat 2.2.6 h0a44026_0 fastcache 1.1.0 py37h1de35cc_0 filelock 3.0.12 py_0 flake8 3.7.9 py37_0 flask 1.1.1 py_0 freetype 2.9.1 hb4e5f40_0 fsspec 0.6.2 py_0 future 0.18.2 py37_0 get_terminal_size 1.0.0 h7520d66_0 gettext 0.19.8.1 h15daf44_3 gevent 1.4.0 py37h1de35cc_0 glib 2.63.1 hd977a24_0 glob2 0.7 py_0 gmp 6.1.2 hb37e062_1 gmpy2 2.0.8 py37h6ef4df4_2 greenlet 0.4.15 py37h1de35cc_0 h5py 2.10.0 py37h3134771_0 hdf5 1.10.4 hfa1e0ec_0 heapdict 1.0.1 py_0 html5lib 1.0.1 py37_0 hypothesis 5.5.4 py_0 icu 58.2 h4b95b61_1 idna 2.8 py37_0 imageio 2.6.1 py37_0 imagesize 1.2.0 py_0 importlib_metadata 1.5.0 py37_0 intel-openmp 2019.4 233 intervaltree 3.0.2 py_0 ipykernel 5.1.4 py37h39e3cac_0 ipython 7.12.0 py37h5ca1d4c_0 ipython_genutils 0.2.0 py37_0 ipywidgets 7.5.1 py_0 isort 4.3.21 py37_0 itsdangerous 1.1.0 py37_0 jbig 2.1 h4d881f8_0 jdcal 1.4.1 py_0 jedi 0.14.1 py37_0 jinja2 2.11.1 py_0 joblib 0.14.1 py_0 jpeg 9b he5867d9_2 json5 0.9.1 py_0 jsonschema 3.2.0 py37_0 jupyter 1.0.0 py37_7 jupyter_client 5.3.4 py37_0 jupyter_console 6.1.0 py_0 jupyter_core 4.6.1 py37_0 jupyterlab 1.2.6 pyhf63ae98_0 jupyterlab_server 1.0.6 py_0 keyring 21.1.0 py37_0 kiwisolver 1.1.0 py37h0a44026_0 krb5 1.17.1 hddcf347_0 lazy-object-proxy 1.4.3 py37h1de35cc_0 libarchive 3.3.3 h786848e_5 libcurl 7.68.0 h051b688_0 libcxx 4.0.1 hcfea43d_1 libcxxabi 4.0.1 hcfea43d_1 libedit 3.1.20181209 hb402a30_0 libffi 3.2.1 h475c297_4 libgfortran 3.0.1 h93005f0_2 libiconv 1.15 hdd342a3_7 liblief 0.9.0 h2a1bed3_2 libpng 1.6.37 ha441bb4_0 libsodium 1.0.16 h3efe00b_0 libspatialindex 1.9.3 h0a44026_0 libssh2 1.9.0 ha12b0ac_1 libtiff 4.1.0 hcb84e12_0 libxml2 2.9.9 hf6e021a_1 libxslt 1.1.33 h33a18ac_0 llvm-openmp 4.0.1 hcfea43d_1 llvmlite 0.31.0 py37h1341992_0 locket 0.2.0 py37_1 lxml 4.5.0 py37hef8c89e_0 lz4-c 1.8.1.2 h1de35cc_0 lzo 2.10 h362108e_2 markupsafe 1.1.1 py37h1de35cc_0 matplotlib 3.1.3 py37_0 matplotlib-base 3.1.3 py37h9aa3819_0 mccabe 0.6.1 py37_1 mistune 0.8.4 py37h1de35cc_0 mkl 2019.4 233 mkl-service 2.3.0 py37hfbe908c_0 mkl_fft 1.0.15 py37h5e564d8_0 mkl_random 1.1.0 py37ha771720_0 mock 4.0.1 py_0 more-itertools 8.2.0 py_0 mpc 1.1.0 h6ef4df4_1 mpfr 4.0.1 h3018a27_3 mpmath 1.1.0 py37_0 msgpack-python 0.6.1 py37h04f5b5a_1 multipledispatch 0.6.0 py37_0 navigator-updater 0.2.1 py37_0 nbconvert 5.6.1 py37_0 nbformat 5.0.4 py_0 ncurses 6.2 h0a44026_0 networkx 2.4 py_0 nltk 3.4.5 py37_0 nose 1.3.7 py37_2 notebook 6.0.3 py37_0 numba 0.48.0 py37h6c726b0_0 numexpr 2.7.1 py37hce01a72_0 numpy 1.18.1 py37h7241aed_0 numpy-base 1.18.1 py37h6575580_1 numpydoc 0.9.2 py_0 olefile 0.46 py37_0 openpyxl 3.0.3 py_0 openssl 1.1.1d h1de35cc_4 packaging 20.1 py_0 pandas 1.0.1 py37h6c726b0_0 pandoc 2.2.3.2 0 pandocfilters 1.4.2 py37_1 parso 0.5.2 py_0 partd 1.1.0 py_0 path 13.1.0 py37_0 path.py 12.4.0 0 pathlib2 2.3.5 py37_0 pathtools 0.1.2 py_1 patsy 0.5.1 py37_0 pcre 8.43 h0a44026_0 pep8 1.7.1 py37_0 pexpect 4.8.0 py37_0 pickleshare 0.7.5 py37_0 pillow 7.0.0 py37h4655f20_0 pip 20.0.2 py37_1 pkginfo 1.5.0.1 py37_0 pluggy 0.13.1 py37_0 ply 3.11 py37_0 prometheus_client 0.7.1 py_0 prompt_toolkit 3.0.3 py_0 psutil 5.6.7 py37h1de35cc_0 ptyprocess 0.6.0 py37_0 py 1.8.1 py_0 py-lief 0.9.0 py37h1413db1_2 pycodestyle 2.5.0 py37_0 pycosat 0.6.3 py37h1de35cc_0 pycparser 2.19 py37_0 pycrypto 2.6.1 py37h1de35cc_9 pycurl 7.43.0.5 py37ha12b0ac_0 pydocstyle 4.0.1 py_0 pyflakes 2.1.1 py37_0 pygments 2.5.2 py_0 pylint 2.4.4 py37_0 pyodbc 4.0.30 py37h0a44026_0 pyopenssl 19.1.0 py37_0 pyparsing 2.4.6 py_0 pyqt 5.9.2 py37h655552a_2 pyrsistent 0.15.7 py37h1de35cc_0 pysocks 1.7.1 py37_0 pytables 3.6.1 py37h5bccee9_0 pytest 5.3.5 py37_0 pytest-arraydiff 0.3 py37h39e3cac_0 pytest-astropy 0.8.0 py_0 pytest-astropy-header 0.1.2 py_0 pytest-doctestplus 0.5.0 py_0 pytest-openfiles 0.4.0 py_0 pytest-remotedata 0.3.2 py37_0 python 3.7.6 h359304d_2 python-dateutil 2.8.1 py_0 python-jsonrpc-server 0.3.4 py_0 python-language-server 0.31.7 py37_0 python-libarchive-c 2.8 py37_13 python.app 2 py37_10 pytz 2019.3 py_0 pywavelets 1.1.1 py37h1de35cc_0 pyyaml 5.3 py37h1de35cc_0 pyzmq 18.1.1 py37h0a44026_0 qdarkstyle 2.8 py_0 qt 5.9.7 h468cd18_1 qtawesome 0.6.1 py_0 qtconsole 4.6.0 py_1 qtpy 1.9.0 py_0 readline 7.0 h1de35cc_5 requests 2.22.0 py37_1 ripgrep 11.0.2 he32d670_0 rope 0.16.0 py_0 rtree 0.9.3 py37_0 ruamel_yaml 0.15.87 py37h1de35cc_0 scikit-image 0.16.2 py37h6c726b0_0 scikit-learn 0.22.1 py37h27c97d8_0 scipy 1.4.1 py37h9fa6033_0 seaborn 0.10.0 py_0 send2trash 1.5.0 py37_0 setuptools 46.0.0 py37_0 simplegeneric 0.8.1 py37_2 singledispatch 3.4.0.3 py37_0 sip 4.19.8 py37h0a44026_0 six 1.14.0 py37_0 snappy 1.1.7 he62c110_3 snowballstemmer 2.0.0 py_0 sortedcollections 1.1.2 py37_0 sortedcontainers 2.1.0 py37_0 soupsieve 1.9.5 py37_0 sphinx 2.4.0 py_0 sphinxcontrib 1.0 py37_1 sphinxcontrib-applehelp 1.0.1 py_0 sphinxcontrib-devhelp 1.0.1 py_0 sphinxcontrib-htmlhelp 1.0.2 py_0 sphinxcontrib-jsmath 1.0.1 py_0 sphinxcontrib-qthelp 1.0.2 py_0 sphinxcontrib-serializinghtml 1.1.3 py_0 sphinxcontrib-websupport 1.2.0 py_0 spyder 4.0.1 py37_0 spyder-kernels 1.8.1 py37_0 sqlalchemy 1.3.13 py37h1de35cc_0 sqlite 3.31.1 ha441bb4_0 statsmodels 0.11.0 py37h1de35cc_0 sympy 1.5.1 py37_0 tbb 2020.0 h04f5b5a_0 tblib 1.6.0 py_0 terminado 0.8.3 py37_0 testpath 0.4.4 py_0 tk 8.6.8 ha441bb4_0 toolz 0.10.0 py_0 tornado 6.0.3 py37h1de35cc_3 tqdm 4.42.1 py_0 traitlets 4.3.3 py37_0 ujson 1.35 py37h1de35cc_0 unicodecsv 0.14.1 py37_0 unixodbc 2.3.7 h1de35cc_0 urllib3 1.25.8 py37_0 watchdog 0.10.2 py37h1de35cc_0 wcwidth 0.1.8 py_0 webencodings 0.5.1 py37_1 werkzeug 1.0.0 py_0 wheel 0.34.2 py37_0 widgetsnbextension 3.5.1 py37_0 wrapt 1.11.2 py37h1de35cc_0 wurlitzer 2.0.0 py37_0 xlrd 1.2.0 py37_0 xlsxwriter 1.2.7 py_0 xlwings 0.17.1 py37_0 xlwt 1.3.0 py37_0 xmltodict 0.12.0 py_0 xz 5.2.4 h1de35cc_4 yaml 0.1.7 hc338f04_2 yapf 0.28.0 py_0 zeromq 4.3.1 h0a44026_3 zict 1.0.0 py_0 zipp 2.2.0 py_0 zlib 1.2.11 h1de35cc_3 zstd 1.3.7 h5bba6e5_0 ```


Details about conda and system ( conda info ):

``` $ conda info active environment : top active env location : /Users/sadeed/opt/anaconda3/envs/top shell level : 2 user config file : /Users/sadeed/.condarc populated config files : /Users/sadeed/.condarc /Users/sadeed/opt/anaconda3/envs/top/.condarc conda version : 4.8.3 conda-build version : 3.18.11 python version : 3.7.6.final.0 virtual packages : __osx=10.15.4 base environment : /Users/sadeed/opt/anaconda3 (writable) channel URLs : https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /Users/sadeed/opt/anaconda3/pkgs /Users/sadeed/.conda/pkgs envs directories : /Users/sadeed/opt/anaconda3/envs /Users/sadeed/.conda/envs platform : osx-64 user-agent : conda/4.8.3 requests/2.22.0 CPython/3.7.6 Darwin/19.4.0 OSX/10.15.4 UID:GID : 501:20 netrc file : /Users/sadeed/.netrc offline mode : False ```
john-curry871 commented 4 years ago

Creating a new env worked for me as per jay

conda create --name myenv conda activate myenv

mind-matrix commented 4 years ago

Hi guys. I know I am a little late in the discussion but this worked for me 100% of the time I faced this issue - Whenever this happened it was unfortunate as I could not get any packages to set up from the navigator anymore. But what I could do is instead open up the Command Prompt from the navigator and install the package using conda-forge and then updating the index, it showed up correctly! For example, to install spacy after this happens, you can open up the command prompt and type - py conda install -c conda-forge spacy And this will let you install spacy without any hassle. Then you can update your index in your selected environment and spacy will show up as installed! Done.

KrisThielemans commented 4 years ago

@mind-matrix my issues (and I believe most of the others) have always been with the command line.

realknorke commented 4 years ago

This issue is a showstopper for me. The easiest way to reproduce the problem without interference from local context:

docker run -it continuumio/anaconda3 conda install -c conda-forge airflow
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
[…]

When the install process is started in verbose mode (-vv), you can see how the resolve process is looping

[…]
DEBUG conda.resolve:filter_group(633): conda-package-handling: pruned from 17 -> 1
DEBUG conda.resolve:filter_group(633): conda: pruned from 16 -> 1
DEBUG conda.resolve:filter_group(633): anaconda-navigator: pruned from 8 -> 1
DEBUG conda.resolve:filter_group(633): xmltodict: pruned from 9 -> 1
DEBUG conda.resolve:filter_group(633): conda-verify: pruned from 15 -> 1
DEBUG conda.resolve:filter_group(633): backports.functools_lru_cache: pruned from 6 -> 1
DEBUG conda.resolve:filter_group(633): backports.tempfile: pruned from 3 -> 1
DEBUG conda.resolve:filter_group(633): backports.weakref: pruned from 21 -> 1
DEBUG conda.resolve:filter_group(633): navigator-updater: pruned from 4 -> 1
DEBUG conda.resolve:filter_group(633): _ipyw_jlab_nb_ext_conf: pruned from 7 -> 1
DEBUG conda.resolve:filter_group(633): conda-env: pruned from 4 -> 1
DEBUG conda.resolve:filter_group(633): airflow: pruned from 16 -> 0
DEBUG conda.common._logic:_run_sat(601): Invoking SAT with clause count: 2
DEBUG conda.resolve:_get_sat_solver_cls(60): Using SAT solver interface 'pycosat'.
DEBUG conda.resolve:gen_clauses(914): gen_clauses returning with clause count: 2263
DEBUG conda.resolve:generate_spec_constraints(922): generate_spec_constraints returning with clause count: 2263
DEBUG conda.resolve:__init__(110): restricting to unmanageable packages: __glibc
DEBUG conda.resolve:gen_clauses(914): gen_clauses returning with clause count: 63232
DEBUG conda.resolve:generate_spec_constraints(922): generate_spec_constraints returning with clause count: 63232
DEBUG conda.common._logic:_run_sat(601): Invoking SAT with clause count: 63233
DEBUG conda.resolve:generate_spec_constraints(922): generate_spec_constraints returning with clause count: 63232
DEBUG conda.common._logic:_run_sat(601): Invoking SAT with clause count: 63233
DEBUG conda.resolve:generate_spec_constraints(922): generate_spec_constraints returning with clause count: 63233
DEBUG conda.common._logic:_run_sat(601): Invoking SAT with clause count: 63235
DEBUG conda.resolve:generate_spec_constraints(922): generate_spec_constraints returning with clause count: 63235
DEBUG conda.common._logic:_run_sat(601): Invoking SAT with clause count: 63238
DEBUG conda.resolve:generate_spec_constraints(922): generate_spec_constraints returning with clause count: 63238
DEBUG conda.common._logic:_run_sat(601): Invoking SAT with clause count: 63242
DEBUG conda.resolve:generate_spec_constraints(922): generate_spec_constraints returning with clause count: 63242
DEBUG conda.common._logic:_run_sat(601): Invoking SAT with clause count: 63247
DEBUG conda.resolve:generate_spec_constraints(922): generate_spec_constraints returning with clause count: 63247
DEBUG conda.common._logic:_run_sat(601): Invoking SAT with clause count: 63253
DEBUG conda.resolve:generate_spec_constraints(922): generate_spec_constraints returning with clause count: 63253
DEBUG conda.common._logic:_run_sat(601): Invoking SAT with clause count: 63260
DEBUG conda.resolve:generate_spec_constraints(922): generate_spec_constraints returning with clause count: 63260
DEBUG conda.common._logic:_run_sat(601): Invoking SAT with clause count: 63268
DEBUG conda.resolve:generate_spec_constraints(922): generate_spec_constraints returning with clause count: 63268
>>CTRL+C<<
^Cfailed with initial frozen solve. Retrying with flexible solve.
Traceback (most recent call last):
  File "/opt/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1079, in __call__
    return func(*args, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/conda/cli/main.py", line 84, in _main
    exit_code = do_call(args, p)
  File "/opt/conda/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
    return getattr(module, func_name)(args, parser)
  File "/opt/conda/lib/python3.7/site-packages/conda/cli/main_install.py", line 20, in execute
    install(args, parser, 'install')
  File "/opt/conda/lib/python3.7/site-packages/conda/cli/install.py", line 265, in install
    should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),
  File "/opt/conda/lib/python3.7/site-packages/conda/core/solve.py", line 117, in solve_for_transaction
    should_retry_solve)
  File "/opt/conda/lib/python3.7/site-packages/conda/core/solve.py", line 158, in solve_for_diff
    force_remove, should_retry_solve)
  File "/opt/conda/lib/python3.7/site-packages/conda/core/solve.py", line 275, in solve_final_state
    ssc = self._add_specs(ssc)
  File "/opt/conda/lib/python3.7/site-packages/conda/core/solve.py", line 558, in _add_specs
    (_.to_match_spec() for _ in ssc.prefix_data.iter_records()))), self.specs_to_add
  File "/opt/conda/lib/python3.7/site-packages/conda/resolve.py", line 1108, in get_conflicting_specs
    explicit_specs=explicit_specs))
  File "/opt/conda/lib/python3.7/site-packages/conda/common/logic.py", line 284, in minimal_unsatisfiable_subset
    if sat(working_set | {spec, }, True) is None:
  File "/opt/conda/lib/python3.7/site-packages/conda/resolve.py", line 1092, in mysat
    return C.sat(constraints, add_if)
  File "/opt/conda/lib/python3.7/site-packages/conda/common/logic.py", line 226, in sat
    solution = self._clauses.sat(additional=additional, includeIf=includeIf, limit=limit)
  File "/opt/conda/lib/python3.7/site-packages/conda/common/_logic.py", line 639, in sat
    solution = self._run_sat(self.m, limit=limit)
  File "/opt/conda/lib/python3.7/site-packages/conda/common/_logic.py", line 602, in _run_sat
    solution = self._sat_solver.run(m, limit=limit)
  File "/opt/conda/lib/python3.7/site-packages/conda/common/_logic.py", line 156, in run
    sat_solution = self.invoke(solver)
  File "/opt/conda/lib/python3.7/site-packages/conda/common/_logic.py", line 189, in invoke
    sat_solution = next(iter_sol)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/bin/conda", line 13, in <module>
    sys.exit(main())
  File "/opt/conda/lib/python3.7/site-packages/conda/cli/main.py", line 150, in main
    return conda_exception_handler(_main, *args, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1371, in conda_exception_handler
    return_value = exception_handler(func, *args, **kwargs)
  File "/opt/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1082, in __call__
    return self.handle_exception(exc_val, exc_tb)
  File "/opt/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1122, in handle_exception
    self._print_conda_exception(CondaError("KeyboardInterrupt"), _format_exc())
  File "/opt/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1133, in _print_conda_exception
    print_conda_exception(exc_val, exc_tb)
  File "/opt/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1047, in print_conda_exception
    print(_format_exc(exc_val, exc_tb), file=sys.stderr)
  File "/opt/conda/lib/python3.7/site-packages/conda/exceptions.py", line 1069, in _format_exc
    formatted_exception = format_exception(exc_type, exc_val, exc_tb)
  File "/opt/conda/lib/python3.7/traceback.py", line 121, in format_exception
    type(value), value, tb, limit=limit).format(chain=chain))
  File "/opt/conda/lib/python3.7/traceback.py", line 508, in __init__
    capture_locals=capture_locals)
  File "/opt/conda/lib/python3.7/traceback.py", line 344, in extract
    for f, lineno in frame_gen:
  File "/opt/conda/lib/python3.7/traceback.py", line 309, in walk_tb
    yield tb.tb_frame, tb.tb_lineno
AttributeError: 'str' object has no attribute 'tb_frame'

With that problem it is not possible to use Anaconda's conda.

mind-matrix commented 4 years ago

Are you on Windows? Coz https://anaconda.org/conda-forge/airflow shows labels for linux and osx only.

ahmadsadeed commented 4 years ago

@realknorke I had issues with conda as well and didn't want to use pip to fix the problem. After trying many advice from Conda's GitHub page, I found out that the issue was not being able to find dependencies for the python version I had installed. Creating new environment help but with one more argument for python version.

conda create -n branch-env python=3.7
conda activate branch-env
conda install package-name
realknorke commented 4 years ago

Are you on Windows? Coz https://anaconda.org/conda-forge/airflow shows labels for linux and osx only.

Linux. I don't do computer games…

@ahmadsadeed
It seems to work using the env. Its very slow but the installation succeeded. Thanks. :+1:

pip is not an option for various reasons, at least the following:

oluwabajio commented 4 years ago

I was having this issue also. What worked for me was

conda update conda

abrac commented 4 years ago

I fixed the problem by modifying my .condarc as follows:

citruszhang commented 4 years ago

This problem confused me today. I clean the .condarc file and rewrite channels to it. Then, sloved it.

petrakou commented 4 years ago

After trying many advice from Conda's GitHub page, I found out that the issue was not being able to find dependencies for the python version I had installed. Creating new environment help but with one more argument for python version.

conda create -n branch-env python=3.7
conda activate branch-env
conda install package-name

@ahmadsadeed this was the solution that almost worked for me after all (the trying of everything suggested here and dedicated a few hours to this problem). Thanks! More precisely, I didn't need to create a new environment. I just activated an already existing one, which had been created with a specific python version.

HOWEVER, the problem is still not completely gone. I was able to install in this environment. But:

  1. I still can't install in the base environment.
  2. Updating anaconda, not from the command line but by clicking on the relevant pop-up message, still gets stuck (stuck message: "Updating package on root".)

Will this issue ever get resolved? Apparently it has been wasting the time of several humans for some time now :)

Lxiangyue commented 4 years ago

Update the Conda VERSION!!! It works!!! I met the same problem. Maybe it is a long time for me not using conda.... I tried the methods mentioned above, but all didn't work. Then I repower my computer, and try to use conda to install an env, it warining me "A new conda version exist." So I update the conda version, then everything goes well~~

Benjelene commented 4 years ago

@realknorke I had issues with conda as well and didn't want to use pip to fix the problem. After trying many advice from Conda's GitHub page, I found out that the issue was not being able to find dependencies for the python version I had installed. Creating new environment help but with one more argument for python version.

conda create -n branch-env python=3.7
conda activate branch-env
conda install package-name

This worked for me!

aniruddhakal commented 4 years ago

After 2 years I thought I'd try Anaconda again, and this happens!

janaruto commented 4 years ago

First I tried: conda config --set channel_priority strict

Nothing changed, so I unistalled conda and reinstalled it but still, I am not able to install any packages altough using conda instaall -c conda- forge packagename

Herers some outputs: conda config --get channels --add channels 'defaults' # lowest priority --add channels 'conda-forge' # highest priority

conda --version conda 4.8.3

Yesterday everything worked just fine...

shah-deven commented 4 years ago

Removing the conda-forge channel appears to remove this behavior and it continues to work after add conda-forge.

The following steps worked to resolve the issue.

  1. conda config --remove channels conda-forge
  2. conda config --add channels conda-forge

No other changes were required to fix this on my system.

Thank you @EricThomson and @solegalli for figuring this out!

It does a little longer than normal but it worked for me.

stromal commented 4 years ago

Adding more RAM helps I switched from 0.5 GB to 8GB RAM

bossbeagle1509 commented 3 years ago

I removed and added conda forge as suggested by @EricThomson and everything is now blazing smooth. 👍

gemmavnash commented 3 years ago

This has been bugging me for weeks. It wasn't until I google 'hangs on solving environment' that I found this thread. Phew. Thanks guys. :)

hotheadhacker commented 3 years ago

[Update] This problem usually happens when you try to update your respective operating system Linux/Windows due to improper mismatch linking of anaconda3 resources. You need to update or I would say uninstall and then reinstall anaconda3. Take a deep breath and it will work :)

taoyafan commented 3 years ago

I had the same issue when adding conda-forge channel and i fixed it by changing channel-priority to "flexible" conda config --describe channel_priority conda config --set channel_priority flexible After that conda update conda woked fine again. I hope it helps.

conda config --set channel_priority flexible worked for me!

It's also worked for me!!

sakimarquis commented 3 years 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.

really interesting, it works perfect! thank you very much

Uzaaft commented 3 years ago

Using conda config --remove channels conda-forge did not solve the problem for me. What did solve the problem is to uninstall, remove the condarc file, and then reinstalling. Removed it by using the command: rm ~/.condarc

LeeKamentsky commented 3 years ago

I installed mamba: https://github.com/mamba-org/mamba use mamba install whatever and problem was solved for me.

phantom-balance commented 3 years ago

It's a memory problem. Increasing the ram solved the issue for me, not particularly on this situation but had the same solving environment: killed issue that got solved after increasing ram in my virtual machine.

CoderTypist commented 3 years ago

I was running conda install -c conda-forge pyspark and was ran into this problem. I would cancel the install after the first Solving environment: failed with initial frozen solve. Retrying with flexible solve. It turned out that I simply had to wait for conda install -c conda-forge pyspark to keep retrying. Pyspark was installed after the third Solving environment.

$ conda install -c conda-forge pyspark
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: done

## Package Plan ##

  environment location: /home/<my_user>/anaconda3

  added / updated specs:
    - pyspark

...

I had made several changes before this worked, so I'm not sure how many of them actually helped. I tried to list them as close to the actual order I called them in, but some of them are out of order.

This is a mix of suggestions recommended by anaconda itself, this thread, StackOverflow, and other online sources.

sudo chown 1000:1000 /home/<my_user>/.conda
sudo chown 1000:1000 /home/<my_user>/anaconda3
conda update conda
conda config --add channels conda-forge
conda update -n base -c default conda
sudo chmod 777 -R ~/anaconda3/
sudo chmod 777 -R ~/.conda/
conda config --set channel_priority flexible
EricThomson commented 3 years ago

I have started using mamba and life has become way way easier. Things that would take 18 hours to resolve (or simply stall out) in conda take 30 minutes using mamba. It's been a game-changer for me.

https://github.com/mamba-org/mamba

mjohnyasar commented 3 years ago

Anaconda Prompt (Anacond3) (base) C:.\Users\C> conda config --add channels conda-forge . conda-script.py install: error: argument -f/--force: ignored explcit argument 'orge'

I am trying to install fbprophet , first I installed pystan as described but later when I wanted to install fbprophet.. I take this below error message. . C:\ProgramData\Anaconda3\lib\site-packages\pystan\stan\src\stan/model/indexing/rvalue_index_size.hpp(20): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data C:\Users\C\AppData\Local\Temp\pystan_wz0so5uo\stanfit4anon_model_f5236004a3fd5b8429270d00efcc0cf9_5539184804222051439.cpp(5077): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit status 2

ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\C\AppData\Local\Temp\pip-install-y1c6x424\fbprophet_56ee60f93302458a87de31986a99e36d\setup.py'"'"'; file='"'"'C:\Users\C\AppData\Local\Temp\pip-install-y1c6x424\fbprophet_56ee60f93302458a87de31986a99e36d\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\C\AppData\Local\Temp\pip-record-xk3t38jt\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\ProgramData\Anaconda3\Include\fbprophet' Check the logs for full command output.

LemuelPuglisi commented 2 years ago

I fixed the problem by modifying my .condarc as follows:

* Changed:
  ```
  channels:
    - conda-forge
    - defaults
  ```

  to
  ```
  channels:
    - defaults
    - conda-forge
  ```

* and changed `channel_priority: strict` to `channel_priority: flexible`

Thanks, this works for me!

vincentX3 commented 2 years ago

已收到,稍后就看。

brainfo commented 2 years ago

已收到,谢谢。

vincentX3 commented 2 years ago

已收到,稍后就看。

Satinelamp commented 2 years ago

I installed mamba: https://github.com/mamba-org/mamba use mamba install whatever and problem was solved for me.

Whatever I want to install, I got stuck with solving environment, not able to install mamba with conda, is there a manual way to install mamba?

carloocchiena commented 2 years ago

sorry guys, is there a sort-of definitive fix for this issue?

I actually search thru the whole thread, but I feel like there's a lot of trial and error with nothing proven.

Thanks for pointing me to the right message\fix in the case.