python3安装源
windows:
一句话安装源
pip config set global.index-url https://
mirrors.aliyun.com/simple
这时候自动写入pip.ini文件里
但在用pip安装模块还是有问题,用everything搜索pip.ini就能看到这个文件在哪里,编辑该文件
在文件后追加
[install]
trusted-host=mirrors.aliyun.com
紫色字体处要一致
linux:
1、临时修改
pip install pymysql -i https://mirrors.aliyun.com/pypi/simple/
2、永久修改
mkdir /root/.pip
touch /root/.pip/pip.conf
vim pip.conf
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/