pip 源 替换国内源

网上收集来的pip源地址:

阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/ 
豆瓣(douban) http://pypi.douban.com/simple/ 
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

 

setuptools 工具

function:安装pip工具的前置依赖

https://pypi.org/project/setuptools/#files

python setup.py install

 

pip 工具:(需要先安装setuptools工具)

function:支持大部分python模块的安装

https://pypi.org/project/pip/#files

python setup.py install

 

wheel工具:(需要先安装pip工具)

function: 支持.whl后缀文件安装

pip install wheel    

 

 

Tips:一个推荐的whl模块下载网站

https://www.lfd.uci.edu/~gohlke/pythonlibs/

 

临时使用三方源的方式:(命令版)

 pip install <模块名> -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

 

永久使用三方源的方式:(修改文件版)

Linux版本修改pip源使用国内源:

 ~/.pip/pip.conf(如果没有就自行创建)

 

Windows版本修改pip源使用国内源:

%HOMEPATH%\pip\pip.ini

 

修改配置文件内容:

[global]
index-url = http://pypi.douban.com/simple
[install]
trusted-host=pypi.douban.com  # 如果不添加这两行,将会出现如下错误提示:

 

  

参考资料:

https://blog.csdn.net/chenghuikai/article/details/55258957

https://www.cnblogs.com/sunnydou/p/5801760.html

posted @   Cong0ks  阅读(3515)  评论(0编辑  收藏  举报
编辑推荐:
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
阅读排行:
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· 单线程的Redis速度为什么快?
· 展开说说关于C#中ORM框架的用法!
· Pantheons:用 TypeScript 打造主流大模型对话的一站式集成库
点击右上角即可分享
微信分享提示