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.

torch-scatter install fail

See original GitHub issue

πŸ“š Installation

Environment

  • OS: Windows 10
  • Python version: 3.7.2
  • PyTorch version: 1.2.0
  • CUDA/cuDNN version: 10.1
  • GCC version: 8.2
  • How did you try to install PyTorch Geometric and its extensions (pip, source): pip

I would like to install it use the code pip install --verbose --no-cache-dir torch-scatter It raises the following error:

creating build\lib.win-amd64-3.7\torch_scatter\utils copying torch_scatter\utils\ext.py -> build\lib.win-amd64-3.7\torch_scatter\utils copying torch_scatter\utils\gen.py -> build\lib.win-amd64-3.7\torch_scatter\utils copying torch_scatter\utils_init_.py -> build\lib.win-amd64-3.7\torch_scatter\utils running build_ext c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\utils\cpp_extension.py:189: UserWarning: Error checking compiler version for g++: Command β€˜g++’ returned non-zero exit status 1. warnings.warn(β€˜Error checking compiler version for {}: {}’.format(compiler, error))

C:\MinGW\bin\gcc.exe -mdll -O -Wall -DMS_WIN64 -Ic:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include -Ic:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include\torch\csrc\api\include -Ic:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include\TH -Ic:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include\THC -Ic:\users\pipi\anaconda3\envs\cvan\include -Ic:\users\pipi\anaconda3\envs\cvan\include -c cpu/scatter.cpp -o build\temp.win-amd64-3.7\Release\cpu\scatter.o -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 In file included from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/c10/core/Backend.h:5, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/c10/core/Layout.h:3, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/ATen/core/Tensor.h:4, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/ATen/Tensor.h:2, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/ATen/Context.h:4, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/ATen/ATen.h:5, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include\torch\csrc\api\include/torch/types.h:3, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include\torch\csrc\api\include/torch/data/dataloader_options.h:4, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include\torch\csrc\api\include/torch/data/dataloader/base.h:3, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include\torch\csrc\api\include/torch/data/dataloader/stateful.h:3, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include\torch\csrc\api\include/torch/data/dataloader.h:3, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include\torch\csrc\api\include/torch/data.h:3, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include\torch\csrc\api\include/torch/all.h:4, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/torch/extension.h:4, from cpu/scatter.cpp:1: c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/c10/core/TensorTypeIdRegistration.h:50:16: error: β€˜mutex’ in namespace β€˜std’ does not name a type mutable std::mutex mutex_; ^~~~~ c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/c10/core/TensorTypeIdRegistration.h:50:11: note: β€˜std::mutex’ is defined in header β€˜<mutex>’; did you forget to β€˜#include <mutex>’? c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/c10/core/TensorTypeIdRegistration.h:19:1: +#include <mutex>

c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/c10/core/TensorTypeIdRegistration.h:50:11: mutable std::mutex mutex_; ^~~ In file included from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/c10/core/ScalarType.h:6, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/c10/core/Scalar.h:9, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/ATen/core/Tensor.h:7, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/ATen/Tensor.h:2, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/ATen/Context.h:4, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include/ATen/ATen.h:5, from c:\users\pipi\anaconda3\envs\cvan\lib\site-packages\torch\include\torch\csrc\api\include/torch/types.h:3,

cpu/scatter.cpp:52:5: note: in expansion of macro β€˜DIM_APPLY4’ DIM_APPLY4(scalar_t, src, int64_t, index, scalar_t, out, int64_t, arg, dim, ^~~~~~~~~~ error: command β€˜C:\MinGW\bin\gcc.exe’ failed with exit status 1 Running setup.py install for torch-scatter … error Cleaning up… Removing source in C:\Users\PiPi\AppData\Local\Temp\pip-install-74cjo568\torch-scatter Removed build tracker β€˜C:\Users\PiPi\AppData\Local\Temp\pip-req-tracker-uqm34y5v’ ERROR: Command errored out with exit status 1: β€˜c:\users\pipi\anaconda3\envs\cvan\python.exe’ -u -c β€˜import sys, setuptools, tokenize; sys.argv[0] = β€˜"β€™β€œβ€˜C:\Users\PiPi\AppData\Local\Temp\pip-install-74cjo568\torch-scatter\setup.pyβ€™β€β€™β€œβ€˜; file=β€™β€β€˜β€œβ€˜C:\Users\PiPi\AppData\Local\Temp\pip-install-74cjo568\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 β€˜C:\Users\PiPi\AppData\Local\Temp\pip-record-wy8mzqdx\install-record.txt’ --single-version-externally-managed --compile Check the logs for full command output. Exception information: Traceback (most recent call last): File β€œc:\users\pipi\anaconda3\envs\cvan\lib\site-packages\pip_internal\cli\base_command.py”, line 188, in main status = self.run(options, args) File β€œc:\users\pipi\anaconda3\envs\cvan\lib\site-packages\pip_internal\commands\install.py”, line 407, in run use_user_site=options.use_user_site, File β€œc:\users\pipi\anaconda3\envs\cvan\lib\site-packages\pip_internal\req_init_.py”, line 58, in install_given_reqs **kwargs File β€œc:\users\pipi\anaconda3\envs\cvan\lib\site-packages\pip_internal\req\req_install.py”, line 959, in install spinner=spinner, File β€œc:\users\pipi\anaconda3\envs\cvan\lib\site-packages\pip_internal\utils\misc.py”, line 931, in call_subprocess raise InstallationError(exc_msg) pip._internal.exceptions.InstallationError: Command errored out with exit status 1: β€˜c:\users\pipi\anaconda3\envs\cvan\python.exe’ -u -c 'import sys, setuptools, tokenize; sys.argv[0] = 'β€β€˜β€œβ€˜C:\Users\PiPi\AppData\Local\Temp\pip-install-74cjo568\torch-scatter\setup.pyβ€™β€β€™β€œβ€˜; file=β€™β€β€˜β€œβ€˜C:\Users\PiPi\AppData\Local\Temp\pip-install-74cjo568\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 β€˜C:\Users\PiPi\AppData\Local\Temp\pip-record-wy8mzqdx\install-record.txt’ --single-version-externally-managed --compile Check the logs for full command output. 1 location(s) to search for versions of pip:

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
rusty1scommented, Sep 7, 2019

pip install requests

This is already fixed in master!

1reaction
howieraemcommented, Sep 7, 2019

Requirement already satisfied: torch-scatter Congrats, you’ve successfully installed it!

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...
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
pip install torch-scatter. When running in a docker container without NVIDIA driver, PyTorch needs to evaluate the compute capabilities and may fail.
Read more >
Installation β€” pytorch_geometric documentation
pip install pyg-lib torch-scatter torch-sparse -f ... In rare cases, CUDA or Python path problems can prevent a successful installation. pip may even...
Read more >
Unable to install torch-scatter and other packages - Jetson Nano
Hi, I am attempting to create a dockerized Jupyter notebook container based on the DLI image with my own additions of using PyTorch...
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