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:
- https://pypi.org/simple/pip/ Getting page https://pypi.org/simple/pip/ Found index url https://pypi.org/simple Starting new HTTPS connection (1): pypi.org:443 https://pypi.org:443 βGET /simple/pip/ HTTP/1.1β 200 11972
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (5 by maintainers)
Top GitHub Comments
pip install requests
This is already fixed in master!
Requirement already satisfied: torch-scatter
Congrats, youβve successfully installed it!