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:
- Created 4 years ago
- Comments:14 (6 by maintainers)
Top GitHub Comments
@rusty1s Thank you very much for your help, I have successfully installed.
The error message suggests that „pybind11 requires MSVC 2015 update 3 or newer“, so please try to update your compiler.