Closed ryuusenshi closed 1 year ago
PR #59 resolves this.
(Note, it is even worse as it actually requires both numpy
and torch
to already be installed to install geomloss
.)
Thanks, @matthewfeickert . Yes, eventually I saw it required numpy too.
I'll close this issue since it's being addressed
I'll close this issue since it's being addressed
I'd actually suggest keeping it open until the PR gets closed. It can be helpful for others searching the repo to see what Issues are open.
Resolved with v0.2.6
.
If geomloss is part of a requirements file being installed with pip, installation will fail if torch is not already installed.
The reason being that geomloss is imported in
setup.py
, which in turns importsgeomloss.__init__
, which importsgeomloss.samples_loss
, which importstorch
.Even if you put torch in the same requirements file, the installation will fail because packages are fully installed in the end.
The only thing used in
setup.py
isgeomloss.__init__.__version__
, so I suggest to move the SamplesLoss import in a new file:losses.py
, and leave only the__version__
in__init__.py