python pip安装库—下载源更换(清华源、阿里源、中科大源、豆瓣源)
发表于:2024-07-16 21:56:45浏览:292次
##### #### 使用全局配置,建议使用豆瓣
如阿里
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
pip config set install.trusted-host mirrors.aliyun.com
如豆瓣
pip config set global.index-url http://pypi.douban.com/simple/
pip config set install.trusted-host pypi.douban.com
一、清华源 https://pypi.tuna.tsinghua.edu.cn/simple/
pip install xxx -i https://pypi.tuna.tsinghua.edu.cn/simple/
二、阿里源 https://mirrors.aliyun.com/pypi/simple
pip install xxx -i https://mirrors.aliyun.com/pypi/simple
三、中科大源 https://pypi.mirrors.ustc.edu.cn/simple/
pip install xxx -i https://pypi.mirrors.ustc.edu.cn/simple/
四、豆瓣源 http://pypi.douban.com/simple/
pip install xxx -i http://pypi.douban.com/simple/
前提条件:
你的pip需要设置为环境变量里
如,按下 win+r,出入cmd,继续输入pip,能够正常弹出如下图
推荐文章
- python提示No module named setuptools,wget提示ERROR 403: SSL is required及报错Cannot fetch index base URL
- 深化 PHP 的能力边界:解锁并优雅利用外部函数接口(FFI)
- python pip安装库—下载源更换(清华源、阿里源、中科大源、豆瓣源)
- 2024 年开发人员必须了解的 6 大 PHP 框架?
- js保留两位小数的合理处理方法
- PHP代码实现摄像头调用功能:让你的应用有更多互动性
- 深入解析 Python 中的 JSON 处理工具
- Thinkphp6集成JWT API接口引入token
- Vue又出新品——petite-vue
- PHP函数探究——array_key_first()