You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When torch-scatter is installed in a system that doesn't have an existing install of torch, the installation fails.
I've noticed that the install_requires in setup.py doesn't list torch as an installation dependency. Adding the torch package here may resolve the issue.
The issue can be easily reproduced by issuing the following commands in a Linux shell:
# First, create a new virtual environment
python3 -m venv test-venv
# Next, activate it
source ~/test-venv/bin/activate
# Finally, try to install `torch-scatter`
python3 -m pip install --upgrade torch-scatter
Looking in indexes: https://pypi.org/simple
Collecting torch-scatter
Downloading torch_scatter-2.1.1.tar.gz (107 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 107.6/107.6 KB 2.0 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-nksi8_2c/torch-scatter_b525def955bd4685856db2313510ac1d/setup.py", line 8, in <module>
import torch
ModuleNotFoundError: No module named 'torch'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
The current workaround is to manually install torch first, in a separate command before installing anything that requires torch-scatter.
The text was updated successfully, but these errors were encountered:
When
torch-scatter
is installed in a system that doesn't have an existing install oftorch
, the installation fails.I've noticed that the
install_requires
insetup.py
doesn't listtorch
as an installation dependency. Adding thetorch
package here may resolve the issue.The issue can be easily reproduced by issuing the following commands in a Linux shell:
The current workaround is to manually install
torch
first, in a separate command before installing anything that requirestorch-scatter
.The text was updated successfully, but these errors were encountered: