pip intsall 安装报错 ERROR: Could not find a version that satisfies the requirementi
1.使用pip install 包名: 出现问题和警告
pip install transformers
可能出现的错误1:
警告信息:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLZeroReturnError(6, ‘TLS/SSL connection has been closed (EOF) (_ssl.c:1131)’))’: /simple/pyopenssl/
Could not fetch URL https://pypi.org/simple/pyopenssl/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/pyopenssl/ (Caused by SSLError(SSLZeroReturnError(6, ‘TLS/SSL connection has been closed (EOF) (_ssl.c:1131)’))) - skipping
错误的信息:ERROR: Could not find a version that satisfies the requirement pyOpenSSL (from versions: none)
ERROR: No matching distribution found for pyOpenSSL
可能出现的错误2:ValueError: check_hostname requires server_hostname
2.百度发现了很多博客总结了一些方法。
问题的产生: 我之前就遇到了这个问题,
第一次出现问题的原因是因为我先使用 pip uninstall 包名x
,然后在使用 pip install install 包名x
然后出现的这个问题 那个没有解决之后重装了anaconda.
这里出现问题是因为我运行程序的时候下载预训练模型的时候感觉网速比较慢中途终止了程序,然后开启的 vpn
(重点重点 圈起来要考的) 加速, 然后再次使用pip install 的时候遇上了如上的我问题。 所以这次我不想再次重装anaconda. 要处理他。
首先我这两次出现这个问题都是因为开启的代理服务器 VPN
, 所以只要把刚刚所开启的代理服务器关闭即可解决
解决pip install 安装报错方法(最好是先把代理代理关掉)
方法1: 把代理服务器关掉
把代理服务器关掉可以解决 这个方法也可以解决, pip安装错误 ValueError: check_hostname requires server_hostname
方法2: 使用临时的源安装(这种方法适合一次性使用)
使用临时的源安装(这种方法适合一次性使用)
以豆瓣安装transformer包为例, --trusted-host
不要省略
pip install transformers -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
使用格式为
pip install 包名 -i 源名 --trusted-host 源的网址
一些其他的源
清华:https://pypi.tuna.tsinghua.edu.cn/simple
阿里云:http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
华中理工大学:http://pypi.hustunique.com/
山东理工大学:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/
方法3: 永久的更换源的方法
永久的更换源的方法
配置文件自动调取默认的源,
Windows 系统:
直接在user目录中创建一个pip文件,如:C:\Users\xx\pip,新建文件pip.ini
Linux 系统
修改 ~/.pip/pip.conf(没有就创建一个文件夹及文件。文件夹要加“.”,表示是隐藏文件夹), 编辑完之后 ESC:, wq!保存退出
vim ~/.pip/pip.conf
上述文件建立完后添加如下内容:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com
参考博客:https://blog.csdn.net/thenorther/article/details/104376561
参考博客:https://blog.csdn.net/u010741112/article/details/115907497
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /boutique/detail/tanhgfihhb
-
在命令提示符下载pyecharts时出现“pip不是内部或外部命令”
-
linux pip报错WARNING: Running pip as the ‘root‘ user can result in broken permissions and conflicting
-
使用pip安装Cartopy库时,出现报错Getting requirements to build wheel did not run successfully.
-
pip intsall 安装报错 ERROR: Could not find a version that satisfies the requirementi
-
微信视频号直播1000个看过多少钱
-
python pip 卸载环境内所有的包
-
photoshop保存的图片太大微信发不了怎么办
PHP中文网 06-15 -
Android 11 保存文件到外部存储,并分享文件
Luke 10-12 -
word里面弄一个表格后上面的标题会跑到下面怎么办
PHP中文网 06-20 -
《学习通》视频自动暂停处理方法
HelloWorld317 07-05 -
photoshop扩展功能面板显示灰色怎么办
PHP中文网 06-14 -
微信公众号没有声音提示怎么办
PHP中文网 03-31 -
excel下划线不显示怎么办
PHP中文网 06-23 -
excel打印预览压线压字怎么办
PHP中文网 06-22 -
怎样阻止微信小程序自动打开
PHP中文网 06-13 -
TikTok加速器哪个好免费的TK加速器推荐
TK小达人 10-01