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

版权声明:本文为博主作者:HelloEarth_原创文章,版权归属原作者,如果侵权,请联系我们删除!

原文链接:https://blog.csdn.net/HelloEarth_/article/details/134056370

共计人评分,平均

到目前为止还没有投票!成为第一位评论此文章。

(0)
心中带点小风骚的头像心中带点小风骚普通用户
上一篇 2024年4月22日
下一篇 2024年4月22日

相关推荐