Home > Enterprise >  I was unable to install my packages from requirement.txt. I keep getting "no module named '
I was unable to install my packages from requirement.txt. I keep getting "no module named '

Time:04-22

× python setup.py egg_info did not run successfully.

│ exit code: 1

╰─> [10 lines of output]

  Traceback (most recent call last):

    File "<string>", line 36, in <module>

    File "<pip-setuptools-caller>", line 34, in <module>

    File "/tmp/pip-install-s53y6nle/geomloss_b07e3b1a8878419fa7abd2c4614635b8/setup.py", line 14, in <module>

      import geomloss

    File "/tmp/pip-install-s53y6nle/geomloss_b07e3b1a8878419fa7abd2c4614635b8/geomloss/__init__.py", line 5, in <module>

      from .samples_loss import SamplesLoss

    File "/tmp/pip-install-s53y6nle/geomloss_b07e3b1a8878419fa7abd2c4614635b8/geomloss/samples_loss.py", line 1, in <module>

      import torch

  ModuleNotFoundError: No module named 'torch'

  [end of output]

CodePudding user response:

Do you have torch installed? pip install torch

CodePudding user response:

The first step is to install the library

pip install torch

check this out

In the next step, if your editor was active at the time of installation, you need to close it and run it again

  • Related