3
DTK开发
使用DCU镜像运行的容器无法安装第三方库
2024-08-24 18:58:28
86

使用DCU镜像image.sourcefind.cn:5000/dcu/admin/base/pytorch:1.13.1-centos7.6-dtk23.10-py310启动容器后,运行pip install命令会报错:
[root@bogon home]# pip install Gymnasium[all] -i https://mirrors.aliyun.com/pypi/simple
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
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.")': /pypi/simple/gymnasium/
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.")': /pypi/simple/gymnasium/
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.")': /pypi/simple/gymnasium/
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.")': /pypi/simple/gymnasium/
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.")': /pypi/simple/gymnasium/
Could not fetch URL https://mirrors.aliyun.com/pypi/simple/gymnasium/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='mirrors.aliyun.com', port=443): Max retries exceeded with url: /pypi/simple/gymnasium/ (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 Gymnasium[all] (from versions: none)
ERROR: No matching distribution found for Gymnasium[all]
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://mirrors.aliyun.com/pypi/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='mirrors.aliyun.com', port=443): Max retries exceeded with url: /pypi/simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
驱动已安装无误,指定pip源还会报错,尝试升级openssl版本依然报同样的错误,请问这个问题如何解决?

另外尝试通过第三方库对应的github源文件安装库,会报如下错误:
Download error on https://pypi.org/simple/farama-notifications/: unknown url type: https -- Some packages may not be found!
这个问题通过升级openssl版本没有解决。

全部评论(1)
只看楼主
K
KevinWang
楼主
1楼
错误已解决,报错指明了问题所在:python编译过程中未包含ssl模块,似乎镜像1.13.1-centos7.6-dtk23.10-py310在python编译时未包含ssl模块;帖子不能pip install的问题换了一个镜像就解决了,具体更换的是镜像1.13.1-centos7.6-dtk23.10-py39
2024/8/25
没有更多内容了
--
楼主
Level.1
0 帖子
楼主热帖
暂无数据