Top5:Anaconda切换到清华镜像源
如果我们只是临时使用一次可以执行如下代码
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple 需要下载的模块名称
注:simple 不能少, 是 https 而不是 http
设为默认
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
有时候国内原无法连接,需要恢复默认源:
conda config --remove-key channels
如果提示需要升级pip,而连接到默认源的网络连接较差,可以使用清华镜像站来升级 pip:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pip -U