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.

Problem when installing torch-scatter

See original GitHub issue

📚 Installation

Environment

  • OS:Ubuntu 18.04
  • Python version: python 3.7.3
  • PyTorch version:1.1.0
  • CUDA/cuDNN version: CUDA version 10.0.130
  • GCC version:
  • How you tried to install PyTorch Geometric and its extensions (pip, source):
  • Any other relevant information:

Checklist

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

Additional context

I tried to install torch-scatter in my virtual environment(pipenv) but it didn’t work.

The specification of my local machine is below. nvcc -version nvcc: NVIDIA ® Cuda compiler driver Copyright © 2005-2018 NVIDIA Corporation Built on Sat_Aug_25_21:08:01_CDT_2018 Cuda compilation tools, release 10.0, V10.0.130

gcc --version gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0 Copyright © 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

cat /usr/local/cuda/version.txt CUDA Version 10.0.130

cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2 #define CUDNN_MAJOR 7 #define CUDNN_MINOR 5 #define CUDNN_PATCHLEVEL 0

#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

#include “driver_types.h”

Then, pipenv install torch-scatter

Output is: ✔ Installation Succeeded Installing dependencies from Pipfile… An error occurred while installing torch-scatter! Will try again. An error occurred while installing torch-sparse! Will try again. An error occurred while installing torch-cluster! Will try again. An error occurred while installing torch-spline-conv! Will try again. 🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 10/10 — 00:00:05 Installing initially failed dependencies… ☤ ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 4/4 — 00:00:15 [pipenv.exceptions.InstallError]: File “/home/sshospital/.local/lib/python3.6/site-packages/pipenv/cli/command.py”, line 254, in install [pipenv.exceptions.InstallError]: editable_packages=state.installstate.editables, [pipenv.exceptions.InstallError]: File “/home/sshospital/.local/lib/python3.6/site-packages/pipenv/core.py”, line 1992, in do_install [pipenv.exceptions.InstallError]: skip_lock=skip_lock, [pipenv.exceptions.InstallError]: File “/home/sshospital/.local/lib/python3.6/site-packages/pipenv/core.py”, line 1253, in do_init [pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror, [pipenv.exceptions.InstallError]: File “/home/sshospital/.local/lib/python3.6/site-packages/pipenv/core.py”, line 862, in do_install_dependencies [pipenv.exceptions.InstallError]: _cleanup_procs(procs, False, failed_deps_queue, retry=False) [pipenv.exceptions.InstallError]: File “/home/sshospital/.local/lib/python3.6/site-packages/pipenv/core.py”, line 681, in _cleanup_procs [pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines) [pipenv.exceptions.InstallError]: [‘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): started’, " Building wheel for torch-scatter (setup.py): finished with status ‘error’“, ’ Running setup.py clean for torch-scatter’, ‘Failed to build torch-scatter’, ‘Installing collected packages: torch-scatter’, ’ Running setup.py install for torch-scatter: started’, " Running setup.py install for torch-scatter: finished with status ‘error’”] [pipenv.exceptions.InstallError]: [‘ERROR: Complete output from command /home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/bin/python3.7 -u -c 'import setuptools, tokenize;file='“'”'/tmp/pip-install-a7lhvo86/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-j_367rd1 --python-tag cp37:’, ’ ERROR: 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/torch_scatter’, ’ copying torch_scatter/mul.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/min.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/div.py -> 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/init.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/std.py -> build/lib.linux-x86_64-3.7/torch_scatter’, ’ creating 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/test_std.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’, ’ copying test/test_forward.py -> build/lib.linux-x86_64-3.7/test’, ’ creating 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/ext.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’, ’ warning: build_py: byte-compiling is disabled, skipping.‘, ’ ‘, ’ 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’, ’ x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fdebug-prefix-map=/build/python3.7-0Cmdei/python3.7-3.7.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include -I/home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/TH -I/home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/THC -I/usr/include/python3.7m -I/home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/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’, ’ In file included from /home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/torch/csrc/Device.h:3:0,‘, ’ from /home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/python.h:8,’, ’ from /home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/torch/extension.h:6,‘, ’ from cpu/scatter.cpp:1:’, ’ /home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/torch/csrc/python_headers.h:9:10: fatal error: Python.h: No such file or directory’, ’ #include <Python.h>‘, ’ ^~‘, ’ compilation terminated.’, " error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1", ’ ----------------------------------------‘, ’ ERROR: Failed building wheel for torch-scatter’, ’ ERROR: Complete output from command /home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/bin/python3.7 -u -c 'import setuptools, tokenize;file='“'”'/tmp/pip-install-a7lhvo86/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-pf6t3kzs/install-record.txt --single-version-externally-managed --compile --install-headers /home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/include/site/python3.7/torch-scatter:‘, ’ ERROR: 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/torch_scatter’, ’ copying torch_scatter/mul.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/min.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/div.py -> 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/init.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/std.py -> build/lib.linux-x86_64-3.7/torch_scatter’, ’ creating 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/test_std.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’, ’ copying test/test_forward.py -> build/lib.linux-x86_64-3.7/test’, ’ creating 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/ext.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’, ’ warning: build_py: byte-compiling is disabled, skipping.‘, ’ ‘, ’ 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’, ’ x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fdebug-prefix-map=/build/python3.7-0Cmdei/python3.7-3.7.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include -I/home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/torch/csrc/api/include -I/home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/TH -I/home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/THC -I/usr/include/python3.7m -I/home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/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’, ’ In file included from /home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/torch/csrc/Device.h:3:0,‘, ’ from /home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/torch/csrc/api/include/torch/python.h:8,’, ’ from /home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/torch/extension.h:6,‘, ’ from cpu/scatter.cpp:1:’, ’ /home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/lib/python3.7/site-packages/torch/include/torch/csrc/python_headers.h:9:10: fatal error: Python.h: No such file or directory’, ’ #include <Python.h>', ’ ^~’, ’ compilation terminated.‘, " error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1", ’ ----------------------------------------’, ‘ERROR: Command “/home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/bin/python3.7 -u -c 'import setuptools, tokenize;file='”'“'/tmp/pip-install-a7lhvo86/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-pf6t3kzs/install-record.txt --single-version-externally-managed --compile --install-headers /home/sshospital/.local/share/virtualenvs/gnn-solve-jssp-YSXwIMg8/include/site/python3.7/torch-scatter” failed with error code 1 in /tmp/pip-install-a7lhvo86/torch-scatter/’]

Could you give me any suggestions?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
michaelzxucommented, May 16, 2019
0reactions
jaehyeongchuncommented, May 16, 2019

Thanks, I should have installed python3.7-dev!! Now it works well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while installing PyTorch Scatter · Issue #2381 - GitHub
I am using the command "pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+cpu.html". Visual Basic along with Windows 10 ...
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 >
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 >
Unable to install torch-scatter and other packages - Jetson Nano
I am attempting to create a dockerized Jupyter notebook container based on the DLI image with my own additions of using PyTorch graph...
Read more >
Installation — pytorch_geometric 1.3.2 documentation
In rare cases, CUDA or Python path problems can prevent a successful installation. pip may even signal a successful installation, but runtime errors...
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