hpceasy-installegg

How to install egg file with easy_install?


On a HPC node, I have a file named pysdf-0.1-py3.8-linux-x86_64.egg.

I found a Nvidia Manual to install this file using python -m easy_install pysdf-0.1-py3.8-linux-x86_64.egg.

However, when I run this command I get the following error.

(/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

Similarly, if I use pip install as follows

(/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

I do not have admin access on HPC server to use sudo apt. My python is installed at /scratch/s.1915438/modulus/bin/python on the HPC machine.

Does anyone knows why it says Could not find a version that satisfies the requirement.


Solution

  • After 3 months, I figured out how to do this. So, egg files can be installed using something called easy_install which was depreciated back in 2019. The last version of setuptools that supported easy_install was setuptools 42.0.0..

    So, you need to downgrade to that version as follows.

    pip3 install setuptools==42.0.0
    

    And then install the egg files using the following command.

    python3 -m easy_install example.egg
    

    If you wish to upgrade the setuptools to the latest version, then type

    pip3 install setuptools --upgrade