linux 设置pip 镜像 Pip Warning:–trusted-host 问题解决方案
2024-09-27 07:35:51
pip升级到7.0以后,在使用http镜像进行包安装及升级的时候往往会有如下提示:
Collecting beautifulsoup4
The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS it is recommended to use HTTPS instead, otherwise you may silence this warning and allow it anyways with ‘–trusted-host mirrors.aliyun.com’.
Could not find a version that satisfies the requirement beautifulsoup4 (from versions: )
No matching distribution found for beautifulsoup4
解决办法如下:
1.安装时加入–trusted-host mirrors.aliyun.com参数:
1
|
pip install beautifulsoup4 --trusted-host mirrors.aliyun.com
|
2.在pip.conf中加入trusted-host选项,该方法是一劳永逸
1
2
3
4
|
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
|
最新文章
- Online Judge(OJ)搭建(第一版)
- python-print
- mvc.net 的四种传值方式
- kali2 ssh
- 经典的单例模式c3p0来控制数据库连接池
- MOOTOOLS简单操作应用知识
- IOS拷贝文件到沙盒
- .NET MVC4 实训记录之四(Unit of work + Repository)
- 史上最全的css hack(ie6-9,firefox,chrome,opera,safari)
- CentOS 7 安装 JDK
- 老李分享:JVM调优
- 弹性盒模型 flex box
- hdu3081 Marriage Match II
- 60.Vue:将px转化为rem,适配移动端
- addEventListener() 和 removeEventListener()
- asp.net core2.1 bundleconfig.json合并压缩资源文件
- [学习笔记]JS计数器,闭包和localStorage
- 20180831xlVBA_WorkbooksCosolidate
- for练习.html
- Mysql 获取表属性