python常用pip安装源网址

平时pip安装偶尔会下载速度过慢

可以使用以下网站进行下载

豆瓣:http://pypi.douban.com/simple/

清华大学:https://pypi.tuna.tsinghua.edu.cn/simple/

中国科技大学:https://pypi.mirrors.ustc.edu.cn/simple/

阿里云:https://mirrors.aliyun.com/pypi/simple/

百度:https://mirror.baidu.com/pypi/simple

 

假设我们需要安装名为numpy的Python包。

使用默认源安装numpy

pip install numpy

使用清华大学镜像源,重新安装numpy

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

在电脑上安装了多个版本的Python时,确实可能需要指定特定版本的 pip 来安装包。通常,这可以通过以下几种方法实现:

1. 使用完整路径

E:\Python39\Scripts\pip.exe install package_name

本文来自网络,不代表协通编程立场,如若转载,请注明出处:https://www.net2asp.com/f1c17a12e9.html