问题描述:
当使用 conda install ** 安装第三方包时,出现以下错误
错误提示:
Collecting package metadata: failed
UnavailableInvalidChannel: The channel is not accessible or is invalid.
channel name: 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'
channel url: https://conda.anaconda.org/'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'
error code: 404
You will need to adjust your conda configuration to proceed.
Use `conda config --show channels` to view your configuration's current state,
and use `conda config --show-sources` to view config file locations.
解决方法:
//原方法添加
conda config --add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'
conda config --set show_channel_urls yes
1、删除之前添加的信息 打开用户目录(如C:\Users\Vincent)下的.condarc文件,删除之前误添加的信息
2、去掉引号,重新添加
//在Windows上配置确实有这个问题,去掉单引号就好了
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
即可添加 Anaconda Python 免费仓库。
运行 conda install ** 测试一下吧。
————————————————
版权声明:本文为CSDN博主「express_L」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_18250439/article/details/96424608
升级conda所有库
以管理员身份启动Anaconda Prompt:
conda(升级Anaconda前需要先升级conda):conda update conda
anaconda:conda update anaconda
spyder:conda update spyder
所有包:conda update --all
安装包:conda install package
更新包:conda update package
查询某个conda指令使用-h后缀,如conda update -h作者:是虎妹
链接:https://www.jianshu.com/p/b7b8e8f09937
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
pip install 库名
pip install 库名 --upgrade
# 或者
conda install 库名
conda update 库名
# 更新所有库
conda update --all
# 更新 conda 自身
conda update conda
# 更新 anaconda 自身
conda update anaconda
————————————————
版权声明:本文为CSDN博主「xiexu911」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xiexu911/article/details/80282440
-
列出所有已过期的库
pip list --outdated -
单个更新库名
pip install --upgrade 库名
更新Sloving environment failed
conda config --get channels //列出已配置的镜像
conda config --remove 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/' # highest priority
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
升级conda(升级Anaconda前需要先升级conda):conda update conda
升级anaconda:conda update anaconda
升级spyder:conda update spyder
更新所有包:conda update --all
安装包:conda install package