question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip install torch-scatter not success

See original GitHub issue

📚 Installation

Environment

  • OS: Ubuntu 16.04.2
  • Python version: Python 3.7.2
  • PyTorch version: 1.1.0
  • CUDA/cuDNN version: CUDA 10.0 cuDNN 7.3.1
  • GCC version: 5.2.0
  • How you tried to install PyTorch Geometric and its extensions (pip, source):
  • Any other relevant information:

Checklist

  • I followed the installation guide.
  • I cannot find my error message in the FAQ.
  • I set up CUDA correctly and can compile CUDA code via nvcc.
  • I have cloned the repository and tried a manual installation from source.
  • I do have multiple CUDA versions on my machine.
  • I checked if the official extension example runs on my machine.
  • The offical extension example runs on my machine.

Additional context

Collecting torch-scatter Using cached https://files.pythonhosted.org/packages/07/c0/f7ac424496f4a3bcb31aa993fba29077a6d42fc2624c66e90b58a566a98e/torch_scatter-1.2.0.tar.gz Building wheels for collected packages: torch-scatter Building wheel for torch-scatter (setup.py) … error ERROR: Complete output from command /home/e0044/anaconda3/envs/pytorch/bin/python -u -c ‘import setuptools, tokenize;file=’“'”‘/tmp/pip-install-krr483lt/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-i5o_c_e4 --python-tag cp37: ERROR: No CUDA runtime is found, using CUDA_HOME=‘/usr/local/cuda’ running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/test copying test/test_std.py -> build/lib.linux-x86_64-3.7/test copying test/test_forward.py -> build/lib.linux-x86_64-3.7/test copying test/test_multi_gpu.py -> build/lib.linux-x86_64-3.7/test copying test/test_backward.py -> build/lib.linux-x86_64-3.7/test copying test/utils.py -> build/lib.linux-x86_64-3.7/test copying test/init.py -> build/lib.linux-x86_64-3.7/test creating build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/mean.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/min.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/div.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/mul.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/std.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/add.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/sub.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/max.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/init.py -> build/lib.linux-x86_64-3.7/torch_scatter creating build/lib.linux-x86_64-3.7/torch_scatter/utils copying torch_scatter/utils/ext.py -> build/lib.linux-x86_64-3.7/torch_scatter/utils copying torch_scatter/utils/gen.py -> build/lib.linux-x86_64-3.7/torch_scatter/utils copying torch_scatter/utils/init.py -> build/lib.linux-x86_64-3.7/torch_scatter/utils running build_ext building ‘torch_scatter.scatter_cpu’ extension creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/cpu gcc -pthread -B /home/e0044/anaconda3/envs/pytorch/compiler_compat -Wl,–sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/e0044/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include -I/home/e0044/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/e0044/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/TH -I/home/e0044/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/THC -I/home/e0044/anaconda3/envs/pytorch/include/python3.7m -c cpu/scatter.cpp -o build/temp.linux-x86_64-3.7/cpu/scatter.o -Wno-unused-variable -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ g++ -pthread -shared -B /home/e0044/anaconda3/envs/pytorch/compiler_compat -L/home/e0044/anaconda3/envs/pytorch/lib -Wl,-rpath=/home/e0044/anaconda3/envs/pytorch/lib -Wl,–no-as-needed -Wl,–sysroot=/ build/temp.linux-x86_64-3.7/cpu/scatter.o -o build/lib.linux-x86_64-3.7/torch_scatter/scatter_cpu.cpython-37m-x86_64-linux-gnu.so /home/e0044/anaconda3/envs/pytorch/compiler_compat/ld: cannot find -lm /home/e0044/anaconda3/envs/pytorch/compiler_compat/ld: cannot find -lpthread /home/e0044/anaconda3/envs/pytorch/compiler_compat/ld: cannot find -lc collect2: error: ld returned 1 exit status error: command ‘g++’ failed with exit status 1

ERROR: Failed building wheel for torch-scatter Running setup.py clean for torch-scatter Failed to build torch-scatter Installing collected packages: torch-scatter Running setup.py install for torch-scatter … error ERROR: Complete output from command /home/e0044/anaconda3/envs/pytorch/bin/python -u -c ‘import setuptools, tokenize;file=’“'”‘/tmp/pip-install-krr483lt/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-6as0y30t/install-record.txt --single-version-externally-managed --compile: ERROR: No CUDA runtime is found, using CUDA_HOME=‘/usr/local/cuda’ running install running build running build_py creating build creating build/lib.linux-x86_64-3.7 creating build/lib.linux-x86_64-3.7/test copying test/test_std.py -> build/lib.linux-x86_64-3.7/test copying test/test_forward.py -> build/lib.linux-x86_64-3.7/test copying test/test_multi_gpu.py -> build/lib.linux-x86_64-3.7/test copying test/test_backward.py -> build/lib.linux-x86_64-3.7/test copying test/utils.py -> build/lib.linux-x86_64-3.7/test copying test/init.py -> build/lib.linux-x86_64-3.7/test creating build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/mean.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/min.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/div.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/mul.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/std.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/add.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/sub.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/max.py -> build/lib.linux-x86_64-3.7/torch_scatter copying torch_scatter/init.py -> build/lib.linux-x86_64-3.7/torch_scatter creating build/lib.linux-x86_64-3.7/torch_scatter/utils copying torch_scatter/utils/ext.py -> build/lib.linux-x86_64-3.7/torch_scatter/utils copying torch_scatter/utils/gen.py -> build/lib.linux-x86_64-3.7/torch_scatter/utils copying torch_scatter/utils/init.py -> build/lib.linux-x86_64-3.7/torch_scatter/utils running build_ext building ‘torch_scatter.scatter_cpu’ extension creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/cpu gcc -pthread -B /home/e0044/anaconda3/envs/pytorch/compiler_compat -Wl,–sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/e0044/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include -I/home/e0044/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/e0044/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/TH -I/home/e0044/anaconda3/envs/pytorch/lib/python3.7/site-packages/torch/include/THC -I/home/e0044/anaconda3/envs/pytorch/include/python3.7m -c cpu/scatter.cpp -o build/temp.linux-x86_64-3.7/cpu/scatter.o -Wno-unused-variable -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ g++ -pthread -shared -B /home/e0044/anaconda3/envs/pytorch/compiler_compat -L/home/e0044/anaconda3/envs/pytorch/lib -Wl,-rpath=/home/e0044/anaconda3/envs/pytorch/lib -Wl,–no-as-needed -Wl,–sysroot=/ build/temp.linux-x86_64-3.7/cpu/scatter.o -o build/lib.linux-x86_64-3.7/torch_scatter/scatter_cpu.cpython-37m-x86_64-linux-gnu.so /home/e0044/anaconda3/envs/pytorch/compiler_compat/ld: cannot find -lm /home/e0044/anaconda3/envs/pytorch/compiler_compat/ld: cannot find -lpthread /home/e0044/anaconda3/envs/pytorch/compiler_compat/ld: cannot find -lc collect2: error: ld returned 1 exit status error: command ‘g++’ failed with exit status 1 ---------------------------------------- ERROR: Command “/home/e0044/anaconda3/envs/pytorch/bin/python -u -c ‘import setuptools, tokenize;file=’”'”‘/tmp/pip-install-krr483lt/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-6as0y30t/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-install-krr483lt/torch-scatter/

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
tutu123133commented, May 11, 2019

@rusty1s Thank you very much for your help, I have successfully installed.

0reactions
rusty1scommented, Jul 16, 2019

The error message suggests that „pybind11 requires MSVC 2015 update 3 or newer“, so please try to update your compiler.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot install torch-scatter and torch-sparse #772 - GitHub
My problem was solved by installing the header files and static libraries for python dev. I used the command sudo apt-get install python3-dev ......
Read more >
Installation problem with PyTorch's Geometric. "torch-scatter ...
I'm having trouble installing torch-scatter from PyTorch Geometric to deal with some tabular data for question answering task based on TAPAS ...
Read more >
Installation — pytorch_geometric 1.3.2 documentation
Please follow the steps below for a successful installation: Ensure that at least PyTorch 1.2.0 is installed: $ python -c "import torch; print(torch....
Read more >
cannot successfully install "torch-scatter" - PyTorch Forums
I cannot successfully install “torch_scatter”. When I run the command line : pip3 install torch_scatter, an error always occurs, just like ...
Read more >
torch-scatter - PyPI
pip install torch -scatter ... operations require the "group-index" tensor to be sorted, whereas scatter operations are not subject to these requirements.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found