我在运行 Red Hat Enterprise Linux Server 7 的高性能计算 (HPC) 集群上尝试在 Python 虚拟环境中安装 numpy 包时遇到问题。该集群使用 Slurm 作为工作负载管理器,并使用 Anaconda 3-5.3 .1 用于管理环境。以下是我遵循的步骤以及我面临的错误:
已加载 Slurm 模块:
module load slurm/17.11.12
已加载 Anaconda 模块:
module load anaconda/3-5.3.1
创建了一个名为abdou_env的Python虚拟环境:
python3 -m venv abdou_env
激活虚拟环境:
source abdou_env/bin/activate
在虚拟环境(abdou_env)中,我尝试使用 pip3 install numpy 安装 numpy 包,但遇到以下错误:
Collecting numpy
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fffef3c6d50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fffef3c6d10>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fffef3c6790>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fffef3c6150>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fffef3c6050>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/numpy/
ERROR: Could not find a version that satisfies the requirement numpy (from versions: none)
ERROR: No matching distribution found for numpy
虚拟环境中的Python版本:3.7 虚拟环境中的pip版本:19.2.3 连接到包存储库以下载和安装 numpy 似乎存在问题。我检查了网络连接,看起来没问题。集群的模块系统和环境配置也可能在其中发挥作用。
我正在寻求有关如何排查和解决此问题的建议。我是否需要在 HPC 集群环境或 Anaconda 设置中配置某些特定内容才能使软件包安装在虚拟环境中正常工作?任何指导或建议将不胜感激。
预先感谢您的协助!
您是否尝试为您的 anaconda 版本使用正确版本的 numpy ? 您可以根据您的操作系统在此处找到版本