如何使用easy_install安装egg文件



在HPC节点上,我有一个名为pysdf-0.1-py3.8-linux-x86_64.egg的文件。

我找到了一本使用python -m easy_install pysdf-0.1-py3.8-linux-x86_64.egg安装该文件的Nvidia手册。

但是,当我运行这个命令时,我会得到以下错误。

(/scratch/s.1915438/modulus) [s.1915438@sl1 eggs]$ python -m easy_install pysdf-0.1-py3.8-linux-x86_64.egg
/scratch/s.1915438/modulus/bin/python: No module named easy_install

类似地,如果我使用pip install如下

(/scratch/s.1915438/modulus) [s.1915438@sl1 eggs]$ python -m pip install pysdf-0.1-py3.8-linux-x86_64.egg
ERROR: Could not find a version that satisfies the requirement pysdf-0.1-py3.8-linux-x86_64.egg (from versions: none)
ERROR: No matching distribution found for pysdf-0.1-py3.8-linux-x86_64.egg

我在HPC服务器上没有使用sudo apt的管理员访问权限。我的python安装在HPC机器上的/scratch/s.1915438/modulus/bin/python上。

有人知道为什么上面写着Could not find a version that satisfies the requirement吗。

三个月后,我想出了如何做到这一点。因此,可以使用2019年折旧的easy_install安装egg文件。支持easy_installsetuptools的最后一个版本是setuptools 42.0.0.

因此,您需要降级到该版本,如下所示。

pip3 install setuptools==42.0.0

然后使用以下命令安装egg文件。

python3 -m easy_install example.egg

如果您希望将setuptools升级到最新版本,请键入

pip3 install setuptools --upgrade

最新更新