背景:有些软件包需要使用pip安装而不能使用conda安装,但Anaconda中的pip没内国内镜像源的配置,会导致下载错误。
没有使用国内镜像源而导致的pip下载错误
ERROR: Could not find a version that satisfies the requirement tqdm (from versions: none) ERROR: No matching distribution found for tqdm
国内常见镜像源
阿里云 https://mirrors.aliyun.com/pypi/simple/ 豆瓣 http://pypi.douban.com/simple/ 清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/ 中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
conda 配置镜像源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ conda config --set show_channel_urls yes
pip 配置镜像源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple



