将pip源更换到国内镜像

参考文档:将pip源更换到国内镜像

在c盘user目录新建pip文件夹,然后在里面建一个pip.ini文件

文件内容如下:

[global]
index-url=https://pypi.doubanio.com/simple
#index-url=https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=pypi.doubanio.com
#trusted-host=pypi.tuna.tsinghua.edu.cn/

这里用的豆瓣的pip源(好像更新的比清华的勤快),注释里有清华的。

这样子以后用pip管理工具安装库文件时,就会默认使用国内的源文件啦

 在cmd里pip list查看已安装的包

有时候不知道pip安装后的包在哪里pip安装路径

我的在这:

C:Users用户名AppDataLocalProgramsPythonPython39Libsite-packages

原文地址:https://www.cnblogs.com/lvjingyuan/p/14613385.html