pip换源

文章目录

pip换源详解

一、pip是什么

pip 是 Python 中的标准库管理器。它允许你安装和管理不属于 Python标准库 的其它软件包

二、pip换源

国内比较好的PyPI源库有

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

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

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

1.1临时换源

tex 复制代码
#清华源
pip install markdown -i https://pypi.tuna.tsinghua.edu.cn/simple
# 阿里源
pip install markdown -i https://mirrors.aliyun.com/pypi/simple/
# 腾讯源
pip install markdown -i http://mirrors.cloud.tencent.com/pypi/simple
# 豆瓣源
pip install markdown -i http://pypi.douban.com/simple/

临时换源就是在pip install 库 后面直接加上 -i 换源地址

1.2 永久换源

tex 复制代码
# 清华源
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# 阿里源
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
# 腾讯源
pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple
# 豆瓣源
pip config set global.index-url http://pypi.douban.com/simple/# 换回默认源pip config unset global.index-url

设置完成以后直接使用pip intall 库名 即可

相关推荐
Tipriest_9 天前
sudo安装pip包的影响
python·pip·sudo
ajassi200010 天前
开源 python 应用 开发(一)python、pip、pyAutogui、python opencv安装
python·opencv·开源·pip
猫头虎11 天前
2025最新Python 100个常用函数在线体验项目
android·java·python·pycharm·django·pandas·pip
CaracalTiger13 天前
HTTP 协议的基本概念(请求/响应流程、状态码、Header、方法)问题解决方案大全
开发语言·网络·python·深度学习·网络协议·http·pip
草明13 天前
Python pip 以及 包的升级
windows·python·pip
杰瑞学AI19 天前
成功解决 ValueError: Unable to find resource t64.exe in package pip._vendor.distlib
python·pip
纬领网络19 天前
Linux环境下安装和使用RAPIDS平台的cudf和cuml - pip 安装方法
开发语言·python·pip
WangY_ZQ23 天前
Python 如何在Python 3.6上安装PIP
linux·python·pip
猫头虎1 个月前
零基础安装 Python 教程:从下载到环境配置一步到位(支持 VSCode 和 PyCharm)与常用操作系统操作指南
vscode·python·pycharm·beautifulsoup·numpy·pyqt·pip
代码讲故事1 个月前
解决 xmlsec.InternalError: (-1, ‘lxml & xmlsec libxml2 library version mismatch‘)
linux·python·pip·lxml·xmlsec·libxml2