python常用pip安装源网址

本文介绍如何解决pip安装Python包时速度慢的问题,推荐使用豆瓣、清华大学等国内镜像源,并指导在多版本Python中指定pip安装路径的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

平时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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值