How to install torch-scatter==1.3.1?
See original GitHub issueI am trying to install 3D Part Assembly and they have the following requirements
https://github.com/AntheaLi/3DPartAssembly/blob/master/requirements.txt
numpy==1.16.0
opencv-python==4.2.0
pillow==6.2.0
pytorch==1.3.1
scikit-image==0.15.0
scikit-learn==0.21.3
scipy==1.3.1
setuptools==41.4.0
torchvision==0.4.2
torch-scatter==1.3.1
blender==2.7.9
bpy
When I am running the jupyter notebook
using pip install torch-scatter I am getting this
Collecting torch-scatter
Using cached torch_scatter-2.0.5.tar.gz (20 kB)
Building wheels for collected packages: torch-scatter
Building wheel for torch-scatter (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gdta70kw/torch-scatter/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gdta70kw/torch-scatter/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-15s2z_fx
cwd: /tmp/pip-install-gdta70kw/torch-scatter/
Complete output (47 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/torch_scatter
copying torch_scatter/utils.py -> build/lib.linux-x86_64-3.8/torch_scatter
copying torch_scatter/__init__.py -> build/lib.linux-x86_64-3.8/torch_scatter
copying torch_scatter/scatter.py -> build/lib.linux-x86_64-3.8/torch_scatter
copying torch_scatter/segment_csr.py -> build/lib.linux-x86_64-3.8/torch_scatter
copying torch_scatter/placeholder.py -> build/lib.linux-x86_64-3.8/torch_scatter
copying torch_scatter/segment_coo.py -> build/lib.linux-x86_64-3.8/torch_scatter
creating build/lib.linux-x86_64-3.8/torch_scatter/composite
copying torch_scatter/composite/logsumexp.py -> build/lib.linux-x86_64-3.8/torch_scatter/composite
copying torch_scatter/composite/std.py -> build/lib.linux-x86_64-3.8/torch_scatter/composite
copying torch_scatter/composite/__init__.py -> build/lib.linux-x86_64-3.8/torch_scatter/composite
copying torch_scatter/composite/softmax.py -> build/lib.linux-x86_64-3.8/torch_scatter/composite
running build_ext
building 'torch_scatter._scatter' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/tmp
creating build/temp.linux-x86_64-3.8/tmp/pip-install-gdta70kw
creating build/temp.linux-x86_64-3.8/tmp/pip-install-gdta70kw/torch-scatter
creating build/temp.linux-x86_64-3.8/tmp/pip-install-gdta70kw/torch-scatter/csrc
creating build/temp.linux-x86_64-3.8/tmp/pip-install-gdta70kw/torch-scatter/csrc/cpu
creating build/temp.linux-x86_64-3.8/tmp/pip-install-gdta70kw/torch-scatter/csrc/cuda
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/tmp/pip-install-gdta70kw/torch-scatter/csrc -I/usr/lib/python3/dist-packages/torch/include -I/usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include -I/usr/lib/python3/dist-packages/torch/include/TH -I/usr/lib/python3/dist-packages/torch/include/THC -I/usr/include/python3.8 -c /tmp/pip-install-gdta70kw/torch-scatter/csrc/scatter.cpp -o build/temp.linux-x86_64-3.8/tmp/pip-install-gdta70kw/torch-scatter/csrc/scatter.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_scatter -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++14
In file included from /usr/lib/python3/dist-packages/torch/include/ATen/Parallel.h:149,
from /usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
from /usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
from /usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
from /usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
from /usr/lib/python3/dist-packages/torch/include/torch/extension.h:4,
from /tmp/pip-install-gdta70kw/torch-scatter/csrc/cpu/scatter_cpu.h:3,
from /tmp/pip-install-gdta70kw/torch-scatter/csrc/scatter.cpp:4:
/usr/lib/python3/dist-packages/torch/include/ATen/ParallelOpenMP.h:84: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
84 | #pragma omp parallel for if ((end - begin) >= grain_size)
|
In file included from /usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include/torch/python.h:12,
from /usr/lib/python3/dist-packages/torch/include/torch/extension.h:6,
from /tmp/pip-install-gdta70kw/torch-scatter/csrc/cpu/scatter_cpu.h:3,
from /tmp/pip-install-gdta70kw/torch-scatter/csrc/scatter.cpp:4:
/usr/lib/python3/dist-packages/torch/include/torch/csrc/utils/pybind.h:6:10: fatal error: pybind11/pybind11.h: No such file or directory
6 | #include <pybind11/pybind11.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for torch-scatter
Running setup.py clean for torch-scatter
Failed to build torch-scatter
ERROR: torch-points3d 1.1.1 requires torch-cluster<1.5.6, which is not installed.
ERROR: torch-points3d 1.1.1 requires torch-points-kernels<0.7.0,>=0.6.6, which is not installed.
ERROR: torch-points3d 1.1.1 requires torch-sparse<0.7.0,>=0.6.0, which is not installed.
Installing collected packages: torch-scatter
Running setup.py install for torch-scatter ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gdta70kw/torch-scatter/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gdta70kw/torch-scatter/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-lnvogx36/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/alberto/.local/include/python3.8/torch-scatter
cwd: /tmp/pip-install-gdta70kw/torch-scatter/
Complete output (47 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.8
creating build/lib.linux-x86_64-3.8/torch_scatter
copying torch_scatter/utils.py -> build/lib.linux-x86_64-3.8/torch_scatter
copying torch_scatter/__init__.py -> build/lib.linux-x86_64-3.8/torch_scatter
copying torch_scatter/scatter.py -> build/lib.linux-x86_64-3.8/torch_scatter
copying torch_scatter/segment_csr.py -> build/lib.linux-x86_64-3.8/torch_scatter
copying torch_scatter/placeholder.py -> build/lib.linux-x86_64-3.8/torch_scatter
copying torch_scatter/segment_coo.py -> build/lib.linux-x86_64-3.8/torch_scatter
creating build/lib.linux-x86_64-3.8/torch_scatter/composite
copying torch_scatter/composite/logsumexp.py -> build/lib.linux-x86_64-3.8/torch_scatter/composite
copying torch_scatter/composite/std.py -> build/lib.linux-x86_64-3.8/torch_scatter/composite
copying torch_scatter/composite/__init__.py -> build/lib.linux-x86_64-3.8/torch_scatter/composite
copying torch_scatter/composite/softmax.py -> build/lib.linux-x86_64-3.8/torch_scatter/composite
running build_ext
building 'torch_scatter._scatter' extension
creating build/temp.linux-x86_64-3.8
creating build/temp.linux-x86_64-3.8/tmp
creating build/temp.linux-x86_64-3.8/tmp/pip-install-gdta70kw
creating build/temp.linux-x86_64-3.8/tmp/pip-install-gdta70kw/torch-scatter
creating build/temp.linux-x86_64-3.8/tmp/pip-install-gdta70kw/torch-scatter/csrc
creating build/temp.linux-x86_64-3.8/tmp/pip-install-gdta70kw/torch-scatter/csrc/cpu
creating build/temp.linux-x86_64-3.8/tmp/pip-install-gdta70kw/torch-scatter/csrc/cuda
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DWITH_CUDA -I/tmp/pip-install-gdta70kw/torch-scatter/csrc -I/usr/lib/python3/dist-packages/torch/include -I/usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include -I/usr/lib/python3/dist-packages/torch/include/TH -I/usr/lib/python3/dist-packages/torch/include/THC -I/usr/include/python3.8 -c /tmp/pip-install-gdta70kw/torch-scatter/csrc/scatter.cpp -o build/temp.linux-x86_64-3.8/tmp/pip-install-gdta70kw/torch-scatter/csrc/scatter.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_scatter -D_GLIBCXX_USE_CXX11_ABI=1 -std=c++14
In file included from /usr/lib/python3/dist-packages/torch/include/ATen/Parallel.h:149,
from /usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include/torch/utils.h:3,
from /usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include/torch/nn/cloneable.h:5,
from /usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include/torch/nn.h:3,
from /usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include/torch/all.h:7,
from /usr/lib/python3/dist-packages/torch/include/torch/extension.h:4,
from /tmp/pip-install-gdta70kw/torch-scatter/csrc/cpu/scatter_cpu.h:3,
from /tmp/pip-install-gdta70kw/torch-scatter/csrc/scatter.cpp:4:
/usr/lib/python3/dist-packages/torch/include/ATen/ParallelOpenMP.h:84: warning: ignoring #pragma omp parallel [-Wunknown-pragmas]
84 | #pragma omp parallel for if ((end - begin) >= grain_size)
|
In file included from /usr/lib/python3/dist-packages/torch/include/torch/csrc/api/include/torch/python.h:12,
from /usr/lib/python3/dist-packages/torch/include/torch/extension.h:6,
from /tmp/pip-install-gdta70kw/torch-scatter/csrc/cpu/scatter_cpu.h:3,
from /tmp/pip-install-gdta70kw/torch-scatter/csrc/scatter.cpp:4:
/usr/lib/python3/dist-packages/torch/include/torch/csrc/utils/pybind.h:6:10: fatal error: pybind11/pybind11.h: No such file or directory
6 | #include <pybind11/pybind11.h>
| ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-gdta70kw/torch-scatter/setup.py'"'"'; __file__='"'"'/tmp/pip-install-gdta70kw/torch-scatter/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-lnvogx36/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /home/alberto/.local/include/python3.8/torch-scatter Check the logs for full command output.
Note: you may need to restart the kernel to use updated packages.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
torch-scatter - PyPI
PyTorch 1.13. To install the binaries for PyTorch 1.13.0, simply run pip install torch-scatter -f https://data.pyg.org/whl/torch-1.13.0+${CUDA}.html.
Read more >Installation — pytorch_geometric documentation
Installation via Pip Wheels · Ensure that at least PyTorch 1.12.0 is installed: · Find the CUDA version PyTorch was installed...
Read more >Docker pytorch 1.3.0 and pytorch-scatter 1.3.2 not working
If I build docker without installing torch-scatter and run the container, and inside the running container if I install torch-scatter - it works ......
Read more >Torch Scatter - :: Anaconda.org
linux-64 v2.1.0; osx-64 v2.1.0. conda install. To install this package run one of the following: conda install -c conda-forge torch-scatter. Description.
Read more >Segmentation fault when importing torch-sparse (installing ...
Install Pytorch using their suggested conda command ( conda install pytorch torchvision torchaudio cudatoolkit=CUDA_VERSION -c pytorch -c conda- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I always thought pybind11 comes with PyTorch as there is no need to install it manually in general. I have no idea why it was missing in your case.
Regarding the version: What happens if you run
You can try to install pybind11: