在虚拟环境中通过 SSH HPC clutser 安装 pip 包时出现 TLS/SSL 认证错误

问题描述 投票:0回答:1

我正在尝试在 HPC 集群上的虚拟 venv 中安装 python 包。

(metaTS_venv) [xxxuser@hpc metaTS]$ pip3 install pandas

我收到下面的 TLS/SSL 错误。如果我安装在主目录上它工作正常,但在虚拟环境上安装时它不起作用。 我在 Stackoverflow 上读到了很多类似的问题,他们建议添加 --trusted-host pypi.python.org。但这不适用于这种情况。

Could not fetch URL https://pypi.org/simple/pandas/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pandas/ (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 pandas (from versions: none)
ERROR: No matching distribution found for pandas
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```
python ssh pip cluster-computing hpc
1个回答
0
投票

我使用Python 3.11而不是Python 3.8解决了这个问题

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.