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

TLS/SSL certification error when intalling pip packages over SSH HPC clutser in virtual enviroment

提问人:Sadeq Al-Ahdal 提问时间:11/11/2023 更新时间:11/11/2023 访问量:25

问:

我正在尝试在 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 集群计算 HPC

评论


答:

0赞 Sadeq Al-Ahdal 11/11/2023 #1

我使用 Python 3.11 而不是 Python 3.8 解决了它