更改pip:
在如上图所示的位置创建名为pip的文件夹,然后在文件夹下创建pip.ini(可用txt创建后修改后缀)
将以后内容复制进去保存即可
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host = mirrors.aliyun.com
仅适用一次在代码后加 -i https://pypi.tuna.tsinghua.edu.cn/simple
-i http://mirrors.aliyun.com/pypi/simple/
更改conda:
在终端输入命令:
conda:
conda config --add channels http://mirrors.aliyun.com/pypi/simple/
conda config --set show_channel_urls yes
查看现在的conda源:
conda config --get channels
conda换回默认源:
conda config --remove-key channels
若失败也可以直接在文件中修改: