本文已参与新人创作礼活动,一起开启掘金创作之路。
解决 ERROR: Could not find a version that satisfies the requirement xxx 的问题
出现这个问题的原因是python国内网络不稳定,直接导致报错。因此我们常用镜像源来解决此问题
pip install 包名 -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
Anaconda 查看安装源:
conda config --show-sources
Anaconda 添加安装源:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
切换回Anaconda的默认源
conda config --remove-key channels
指定阿里云镜像, 安装REQUIREMENTS.TXT中的所有
pip install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -r requirements.txt
其他镜像源