我正在尝试在 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 3.11而不是Python 3.8解决了这个问题