Conda install and update do not work also solving

2020-05-21 19:39发布

问题:

I am using anaconda as below:

(base) C:\Users\xxx>conda info

     active environment : base
    active env location : C:\Users\xxx\Documents\ANACONDA
            shell level : 1
       user config file : C:\Users\xxx\.condarc
 populated config files : C:\Users\xxx\.condarc
          conda version : 4.7.11
    conda-build version : 3.18.9
         python version : 3.6.9.final.0
       virtual packages :
       base environment : C:\Users\xxx\Documents\ANACONDA  (writable)
           channel URLs : 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/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\xxx\Documents\ANACONDA\pkgs
                          C:\Users\xxx\.conda\pkgs
                          C:\Users\xxx\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\xxx\Documents\ANACONDA\envs
                          C:\Users\xxx\.conda\envs
                          C:\Users\xxx\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.7.11 requests/2.22.0 CPython/3.6.9 Windows/10 Windows/10.0.16299
          administrator : False
             netrc file : None
           offline mode : False

Now I have 2 issues that stop my work. 1) I cannot use conda install for any package. It will give me the error in solving environment list this:

failed with initial frozen solve. Retrying with flexible solve.

then it will fail again and give message like this:

Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.

Even after the checking for incompatible packages, it didn't give me the solution.

2) When I want to upgrade or downgrade conda by the command:

conda update -n base conda

or

conda install conda = 4.6.11

It will give me errors again in the solving environment, and I think this is related to the first issue.

Now I cannot use conda for anything, please advise and thank you!

回答1:

I ran into the same problem and I couldn't find a solution, but I did find a workaround. If you create an env and activate that env and then do the install, it seems to work just fine. If you don't need a lot of libraries I would try that.

Commands are:

  1. Create env
conda create --name myenv
  1. Activate the env
conda activate myenv


回答2:

You may downgrade to an older version of conda 4.6.14 and then install your packages.

conda config --set allow_conda_downgrades true
conda install conda=4.6.14


回答3:

Recommend to upgrade conda latest version.

conda install --quiet --yes conda=4.7.11 python -m pip install --upgrade pip==19.2.2

Good lucky!



回答4:

Create a new environment if your are not superuser, after that activate environment to install packages



回答5:

If your conda version is greater than or equal to 4.8, you may see that error.

(base) [localhost ~]$ conda --version
conda 4.8.2
(base) [localhost ~]$ conda install -c anaconda requests-kerberos
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.

Downgrade your conda if possible using the following commands

conda config --set allow_conda_downgrades true
conda install conda=4.6.14

Then create your virtual environment:

conda create --name myenv_conda

Then activate your myenv_conda

conda activate myenv_conda

Now try to install packages using conda -c install anaconda

eg: conda install -c conda requests-kerberos

output:
(myenv_conda) [localhost ~]$ conda install -c anaconda requests-kerberos
Collecting package metadata: done
Solving environment: done
....
....
....
Preparing transaction: done
Verifying transaction: done
Executing transaction: done