python安装一些包的时候会出现失败,可以切换一下源,国内清华的源比较好用
1.一次使用
比如安装numpy
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy
2.长期使用
修改用户文件夹下面的pip/pip.ini文件
内容修改为
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
也可以通过命令行的方式,效果相同
python安装一些包的时候会出现失败,可以切换一下源,国内清华的源比较好用
1.一次使用
比如安装numpy
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy
2.长期使用
修改用户文件夹下面的pip/pip.ini文件
内容修改为
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
也可以通过命令行的方式,效果相同