UnavailableInvalidChannel: HTTP 404 NOT FOUND for channel simple <https://pypi.tuna.tsinghua.edu.cn/
·
背景
pycharm中安装pymysql包的时候一直安装失败
解决过程
1、起初因为是镜像源配置不够,原来配置的是清华镜像源,于是又加了一些中科大镜像源,发现还是失败
相关命令如下:
#查看当前配置的频道
conda config --show channels
#配置中科大镜像源
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
#设置搜索时显示通道地址
conda config --set show_channel_urls yes
2、仔细看了一下失败的日志,发现报错原因是:UnavailableInvalidChannel: HTTP 404 NOT FOUND for channel simple <https://pypi.tuna.tsinghua.edu.cn/simple>,
这个错误通常表示你使用的 PyPI 镜像源(清华源)无法访问,可能是由于 URL 错误或镜像源暂时不可用导致的。
3、所以我试着移除这个清华源无效的频道:
conda config --remove channels https://pypi.tuna.tsinghua.edu.cn/simple
注意:conda 的镜像源地址与 pip 的不同,不能直接使用 pip 的镜像地址作为 conda 的频道。如果某个镜像源持续无法访问,建议切换到其他镜像源或使用官方源。
问题解决,成功安装
更多推荐
所有评论(0)