pytorch_scatter icon indicating copy to clipboard operation
pytorch_scatter copied to clipboard

Is PyG wheel for torch1.7.1+cu101 missing? Installation error...

Open liluo2 opened this issue 2 years ago • 4 comments

As I click https://data.pyg.org/whl/torch-1.7.1%2Bcu101.html, the hyperlinks are all torch1.7.0+cu101. Is there anything wrong? Because as I install pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.7.1+cu101.html, the error raises:

Looking in links: https://pytorch-geometric.com/whl/torch-1.7.1+cu101.html Collecting torch-scatter Using cached torch_scatter-2.0.9.tar.gz (21 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: torch-scatter Building wheel for torch-scatter (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [45 lines of output] /home/liluo/anaconda3/lib/python3.9/site-packages/setuptools/dist.py:757: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-3.9 creating build/lib.linux-x86_64-3.9/torch_scatter copying torch_scatter/utils.py -> build/lib.linux-x86_64-3.9/torch_scatter copying torch_scatter/segment_coo.py -> build/lib.linux-x86_64-3.9/torch_scatter copying torch_scatter/scatter.py -> build/lib.linux-x86_64-3.9/torch_scatter copying torch_scatter/init.py -> build/lib.linux-x86_64-3.9/torch_scatter copying torch_scatter/segment_csr.py -> build/lib.linux-x86_64-3.9/torch_scatter copying torch_scatter/placeholder.py -> build/lib.linux-x86_64-3.9/torch_scatter creating build/lib.linux-x86_64-3.9/torch_scatter/composite copying torch_scatter/composite/logsumexp.py -> build/lib.linux-x86_64-3.9/torch_scatter/composite copying torch_scatter/composite/softmax.py -> build/lib.linux-x86_64-3.9/torch_scatter/composite copying torch_scatter/composite/init.py -> build/lib.linux-x86_64-3.9/torch_scatter/composite copying torch_scatter/composite/std.py -> build/lib.linux-x86_64-3.9/torch_scatter/composite running build_ext building 'torch_scatter._scatter_cpu' extension creating build/temp.linux-x86_64-3.9 creating build/temp.linux-x86_64-3.9/csrc creating build/temp.linux-x86_64-3.9/csrc/cpu gcc -pthread -B /home/liluo/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/liluo/anaconda3/include -I/home/liluo/anaconda3/include -fPIC -O2 -isystem /home/liluo/anaconda3/include -fPIC -Icsrc -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/TH -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/THC -I/home/liluo/anaconda3/include/python3.9 -c csrc/cpu/scatter_cpu.cpp -o build/temp.linux-x86_64-3.9/csrc/cpu/scatter_cpu.o -O2 -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -DTORCH_EXTENSION_NAME=scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 gcc -pthread -B /home/liluo/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/liluo/anaconda3/include -I/home/liluo/anaconda3/include -fPIC -O2 -isystem /home/liluo/anaconda3/include -fPIC -Icsrc -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/TH -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/THC -I/home/liluo/anaconda3/include/python3.9 -c csrc/scatter.cpp -o build/temp.linux-x86_64-3.9/csrc/scatter.o -O2 -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -DTORCH_EXTENSION_NAME=scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 csrc/scatter.cpp: In static member function ‘static torch::autograd::variable_list ScatterMean::forward(torch::autograd::AutogradContext*, torch::autograd::Variable, torch::autograd::Variable, int64_t, c10::optionalat::Tensor, c10::optional)’: csrc/scatter.cpp:135:30: error: no matching function for call to ‘at::Tensor::div(at::Tensor&, const char [6])’ out.div(count, "floor"); ^ In file included from /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/Tensor.h:3:0, from /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/Context.h:4, from /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/ATen.h:9, from /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/torch/script.h:3, from csrc/scatter.cpp:2: /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:676:12: note: candidate: at::Tensor& at::Tensor::div(const at::Tensor&) const Tensor & div(const Tensor & other) const; ^~~~ /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:676:12: note: candidate expects 1 argument, 2 provided /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:678:12: note: candidate: at::Tensor& at::Tensor::div(c10::Scalar) const Tensor & div(Scalar other) const; ^~~~ /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:678:12: note: candidate expects 1 argument, 2 provided error: command '/usr/bin/gcc' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. 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: subprocess-exited-with-error

× Running setup.py install for torch-scatter did not run successfully. │ exit code: 1 ╰─> [47 lines of output] /home/liluo/anaconda3/lib/python3.9/site-packages/setuptools/dist.py:757: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running install /home/liluo/anaconda3/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build/lib.linux-x86_64-3.9 creating build/lib.linux-x86_64-3.9/torch_scatter copying torch_scatter/utils.py -> build/lib.linux-x86_64-3.9/torch_scatter copying torch_scatter/segment_coo.py -> build/lib.linux-x86_64-3.9/torch_scatter copying torch_scatter/scatter.py -> build/lib.linux-x86_64-3.9/torch_scatter copying torch_scatter/init.py -> build/lib.linux-x86_64-3.9/torch_scatter copying torch_scatter/segment_csr.py -> build/lib.linux-x86_64-3.9/torch_scatter copying torch_scatter/placeholder.py -> build/lib.linux-x86_64-3.9/torch_scatter creating build/lib.linux-x86_64-3.9/torch_scatter/composite copying torch_scatter/composite/logsumexp.py -> build/lib.linux-x86_64-3.9/torch_scatter/composite copying torch_scatter/composite/softmax.py -> build/lib.linux-x86_64-3.9/torch_scatter/composite copying torch_scatter/composite/init.py -> build/lib.linux-x86_64-3.9/torch_scatter/composite copying torch_scatter/composite/std.py -> build/lib.linux-x86_64-3.9/torch_scatter/composite running build_ext building 'torch_scatter._scatter_cpu' extension creating build/temp.linux-x86_64-3.9 creating build/temp.linux-x86_64-3.9/csrc creating build/temp.linux-x86_64-3.9/csrc/cpu gcc -pthread -B /home/liluo/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/liluo/anaconda3/include -I/home/liluo/anaconda3/include -fPIC -O2 -isystem /home/liluo/anaconda3/include -fPIC -Icsrc -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/TH -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/THC -I/home/liluo/anaconda3/include/python3.9 -c csrc/cpu/scatter_cpu.cpp -o build/temp.linux-x86_64-3.9/csrc/cpu/scatter_cpu.o -O2 -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="_gcc" -DPYBIND11_STDLIB="_libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -DTORCH_EXTENSION_NAME=scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 gcc -pthread -B /home/liluo/anaconda3/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/liluo/anaconda3/include -I/home/liluo/anaconda3/include -fPIC -O2 -isystem /home/liluo/anaconda3/include -fPIC -Icsrc -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/torch/csrc/api/include -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/TH -I/home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/THC -I/home/liluo/anaconda3/include/python3.9 -c csrc/scatter.cpp -o build/temp.linux-x86_64-3.9/csrc/scatter.o -O2 -DAT_PARALLEL_OPENMP -fopenmp -DTORCH_API_INCLUDE_EXTENSION_H -DPYBIND11_COMPILER_TYPE="gcc" -DPYBIND11_STDLIB="libstdcpp" -DPYBIND11_BUILD_ABI="cxxabi1011" -DTORCH_EXTENSION_NAME=scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++14 csrc/scatter.cpp: In static member function ‘static torch::autograd::variable_list ScatterMean::forward(torch::autograd::AutogradContext*, torch::autograd::Variable, torch::autograd::Variable, int64_t, c10::optionalat::Tensor, c10::optional)’: csrc/scatter.cpp:135:30: error: no matching function for call to ‘at::Tensor::div(at::Tensor&, const char [6])’ out.div(count, "floor"); ^ In file included from /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/Tensor.h:3:0, from /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/Context.h:4, from /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/ATen.h:9, from /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/torch/csrc/api/include/torch/types.h:3, from /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/torch/script.h:3, from csrc/scatter.cpp:2: /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:676:12: note: candidate: at::Tensor& at::Tensor::div(const at::Tensor&) const Tensor & div(const Tensor & other) const; ^~~~ /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:676:12: note: candidate expects 1 argument, 2 provided /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:678:12: note: candidate: at::Tensor& at::Tensor::div(c10::Scalar) const Tensor & div(Scalar other) const; ^~~~ /home/liluo/anaconda3/lib/python3.9/site-packages/torch/include/ATen/core/TensorBody.h:678:12: note: candidate expects 1 argument, 2 provided error: command '/usr/bin/gcc' failed with exit code 1 [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure

× Encountered error while trying to install package. ╰─> torch-scatter

note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

liluo2 avatar Mar 29 '22 02:03 liluo2

The wheels for PyTorch 1.7.0 will work for PyTorch 1.7.1 as well (that's why we just link to them). Your issue can be resolved by specifying versioning numbers according to https://pytorch-geometric.com/whl/torch-1.7.1+cu101.html. Otherwise, the latest torch-scatter release will be installed from source (which fails in your case):

pip install torch-scatter==2.0.7 -f https://pytorch-geometric.com/whl/torch-1.7.1+cu101.html

rusty1s avatar Mar 29 '22 07:03 rusty1s

Yes I found that installing the wheels for PyTorch 1.7.0 worked. But I think maybe you can make this work by not specifying versioning numbers? This will help other people. pip install torch-scatter==2.0.7 -f https://pytorch-geometric.com/whl/torch-1.7.1+cu101.html

liluo2 avatar Apr 07 '22 07:04 liluo2

BYW, thanks you rusty1s!

liluo2 avatar Apr 07 '22 07:04 liluo2

The only way to make this installable without version numbers if via --no-index option (which will not look at PyPi for newer versions):

pip install --no-index torch-scatter -f https://pytorch-geometric.com/whl/torch-1.7.1+cu101.html

rusty1s avatar Apr 07 '22 07:04 rusty1s

This issue had no activity for 6 months. It will be closed in 2 weeks unless there is some new activity. Is this issue already resolved?

github-actions[bot] avatar Oct 05 '22 02:10 github-actions[bot]