宝塔618特惠活动,企业版999元/年,宝塔SSL证书买1送1!限时抢购!查看活动
当前位置:论坛首页 > Linux面板 > 求助

pip3 install -r requirements.报错python环境无法处理HTTPS连接,

发表在 Linux面板2023-7-22 11:58 [复制链接] 5 2381

[root@ht2022102504170 freegpt-webui]# pip3 install -r requirements.txt
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/websocket-client/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/websocket-client/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/websocket-client/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/websocket-client/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/websocket-client/
Could not fetch URL https://pypi.org/simple/websocket-client/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/websocket-client/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
ERROR: Could not find a version that satisfies the requirement websocket-client (from versions: none)
ERROR: No matching distribution found for websocket-client
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
[root@ht2022102504170 freegpt-webui]#
使用道具 举报 只看该作者 回复
发表于 2023-7-22 12:51:44 | 显示全部楼层
我用py项目管理器 没有报错 但是没有办法添加端口
使用道具 举报 回复 支持 反对
发表于 2023-7-22 13:18:42 | 显示全部楼层
根据您的日志,urllib3库无法与您的OpenSSL库版本(1.0.2k-fips)正常工作,urllib3库v2.0开始只支持OpenSSL 1.1.1+。

这可能是由于Python环境和系统的OpenSSL版本不兼容导致的,为了解决这个问题,您有以下几个可能的解决方案:
使用道具 举报 回复 支持 反对
发表于 2023-7-22 13:31:05 | 显示全部楼层
这个SSL升级怎么解决
使用道具 举报 回复 支持 反对
发表于 2023-7-22 13:36:55 | 显示全部楼层
[root@ht2022102504170 ~]# btpip list | grep -E "requests|urllib3"
requests                  2.25.1
requests-file             1.5.1
requests-oauthlib         1.3.0
urllib3                   1.26.6
WARNING: You are using pip version 20.3.3; however, version 23.2 is available.
You should consider upgrading via the '/www/server/panel/pyenv/bin/python3.7 -m pip install --upgrade pip' command.
[root@ht2022102504170 ~]#
使用道具 举报 回复 支持 反对
发表于 2023-7-22 17:13:20 | 显示全部楼层
ImportError:urllib3 v2.0 only supports OpenSSL 就是报这个错 试了论坛同样报错的帖子依旧没有解决问题
使用道具 举报 回复 支持 反对
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

普通问题处理

论坛响应时间:72小时

问题处理方式:排队(仅解答)

工作时间:白班:9:00 - 18:00

紧急运维服务

响应时间:3分钟

问题处理方式:宝塔专家1对1服务

工作时间:工作日:9:00 - 18:30

宝塔专业团队为您解决服务器疑难问题

点击联系技术免费分析

工作时间:09:00至18:30

快速回复 返回顶部 返回列表