修改pip源为清华源,提高下载速度

pip命令使用清华源进行下载安装。

如果想使用命令行pip命令进行下载:

使用pip的时候在后面加上-i参数,指定pip的下载源

pip install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple
None

上面命令每次运行需要指定网址,可进行永久修改:

windows下: 在user目录中创建一个pip目录,如:C:\Users(用户)\xx\pip,新建文件pip.ini,内容如下

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
None

linux下: 修改 ~/.pip/pip.conf (如果没有自己创建一个), 内容如下:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

 

weinxin
我的微信
一个码农、工程狮、集能量和智慧于一身的、DIY高手、小伙伴er很多的、80后奶爸。
Igor
  • 版权声明: 发表于 2022-12-2515:15:55
  • 转载注明:http://blog.tsingmac.com/prolions/software/python/5219/
aliyun Maven 配置 Java & SpringBoot

aliyun Maven 配置

maven 配置指南 打开 maven 的配置文件( windows 机器一般在 maven 安装目录的 conf/settings.xml ),在<mirrors></mirror...
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: