問題描述:
使用conda install XXX安裝第三方包時出錯绩聘。
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 (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.
PackagesNotFoundError: The following packages are not available from current channels:
- activate
Current channels:
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://mirrors.ustc.edu.cn/anaconda/pkgs/free/linux-64
- https://mirrors.ustc.edu.cn/anaconda/pkgs/free/noarch
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
- https://conda.anaconda.org/bioconda/linux-64
- https://conda.anaconda.org/bioconda/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/r/linux-64
- https://conda.anaconda.org/r/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.
解決方案一:改變通道
設置鏡像的優(yōu)先權(quán)朽缴。
conda config --set channel_priority flexible
解決方案二:設置channel_priority 為false
conda config --set channel_priority false
解決方案三:conda版本問題
1五续、更新conda環(huán)境
# 查看版本
conda -V
# 更新conda環(huán)境
conda update -n base conda
# 更新conda的所有包
conda update --all
#修改頻道
conda config --add channels conda-forge
conda config --set channel_priority flexible
2官硝、降低conda版本
conda config --set allow_conda_downgrades true
conda install conda=4.6.14 #要重啟另一個窗口查看
conda -V
解決方案四:
把miniconda卸載,重新安裝拿愧,更換版本為miniconda3 4.6.14版本杠河。
我盡力了,把網(wǎng)上的方法總結(jié)在此浇辜。
參考文章:
https://blog.csdn.net/Sakura_Logic/article/details/108312146
https://blog.csdn.net/tiaochewang219/article/details/108061728
https://blog.csdn.net/LiiXuanYue/article/details/108808260
http://www.reibang.com/p/4c7b9127cf83