pyg-team / pytorch_geometric

Graph Neural Network Library for PyTorch
https://pyg.org
MIT License
21.04k stars 3.62k forks source link

Jupiter kernel dies when importing pytorch geometric #5680

Open SalvatoreRa opened 1 year ago

SalvatoreRa commented 1 year ago

🐛 Describe the bug

Hi everyone,

I have just installed PyTorch geometric in a virtual machine that is Linux Ubuntu, the virtual machine is on a CPU. I used the terminal to just install it and it gave me the message that the

pip install torch-scatter -f https://data.pyg.org/whl/torch-1.12.1+cpu.html
pip install torch-sparse -f https://data.pyg.org/whl/torch-1.12.1+cpu.html
pip install torch-geometric

However, when I launch anaconda and I use Jupiter, I just execute this snippet the kernel dies

import os
import torch
import matplotlib.pyplot as plt
from torch_geometric.datasets import Planetoid
from torch_geometric.transforms import NormalizeFeatures

However, I already use torch and it works ok, and apparently, it is PyTorch geometric that makes crash the kernel

Environment

rusty1s commented 1 year ago

Is there any more information available about what's happening? Can you run PyG fine on the command line?

SalvatoreRa commented 1 year ago

no, I have tried to create a python file

if I write inside, this will not executed

#!/usr/bin/env python3

import torch_geometric
print('Hello World!')

it will return this error: Erreur de segmentation (core dumped)

while if I comment the importing PyTorch geometric is printing hello world, if I import another library ( like numpy or anything else) it works

rusty1s commented 1 year ago

Yeah, what I meant by that is that one could add print statements between each import here to see where the segmentation fault actually occurs.

SalvatoreRa commented 1 year ago

I have tried to import singurlarly:

import torch_geometric.data
import torch_geometric.loader
import torch_geometric.transforms
import torch_geometric.utils
import torch_geometric.profile

each is making die the kernel, which is weird

rusty1s commented 1 year ago

Yes, this is to be expected since each will call import torch_geometric first.

SalvatoreRa commented 1 year ago

Import torch does not problem and I managed before to run a neural network with torch, so I have found weird this behaviour

bryanjohns commented 1 year ago

This could be the same issue I was having here, which is caused by pytorch_lightning

SalvatoreRa commented 1 year ago

This could be the same issue I was having here, which is caused by pytorch_lightning

So you solve that editing the Pytorch lightening import?

bryanjohns commented 1 year ago

I would start with trying this command

from pytorch_lightning import LightningDataModule

to see if that causes the kernel to crash. If so, then you can fix the issue by either 1. resolving the pytorch_lightning compatibility issue (i.e. finding an installation of pytorch_lightning that doesn't crash) or 2. editing the file mentioned in the other issue to remove pytorch_lightning from pytorch_geometric (which may or may not be acceptable, depending on your use case)

SalvatoreRa commented 1 year ago

Actually, I have no PyTorch lightning:

ModuleNotFoundError: No module named 'pytorch_lightning'

bryanjohns commented 1 year ago

Actually, I have no PyTorch lightning:

ModuleNotFoundError: No module named 'pytorch_lightning'

It's probably a different issue then. Not having pytorch_lightning installed should be handled gracefully. I guess what I'd recommend then is trying to find out which of the many things imported by pytorch_geometric causes the fault by adding print statements, as suggested above

SalvatoreRa commented 1 year ago

I have tried to add some prints everywhere:

from types import ModuleType
print("ModuleType")
from importlib import import_module
print("import_module")
import torch_geometric.data
print("torch_geometric.data")
import torch_geometric.loader
print("torch_geometric.loader")
import torch_geometric.transforms
print("torch_geometric.transforms")
import torch_geometric.utils
print("torch_geometric.utils")
import torch_geometric.profile
print("torch_geometric.profile")

from .seed import seed_everything
print("seed_everything")
from .home import get_home_dir, set_home_dir
print("get_home_dir, set_home_dir")
from .debug import is_debug_enabled, debug, set_debug
print("is_debug_enabled, debug, set_debug")
from .experimental import (is_experimental_mode_enabled, experimental_mode,
                           set_experimental_mode)

print("is_experimental_mode_enabled")

which is resulting in this printed:

ModuleType
import_module
bryanjohns commented 1 year ago

Ok - so then I think the next step is to add similar print statements with the pytorch_geometric/data/__init__.py file and keep following it until you find exactly which import is causing the issue

rusty1s commented 1 year ago

Ok - so then I think the next step is to add similar print statements with the pytorch_geometric/data/init.py file and keep following it until you find exactly which import is causing the issue

Yeah, it is a bit annoying but that's probably the easiest way to do. You can also just use a debugger instead.

j4freeman commented 1 year ago

I was having the same issue - debugged through and the issue seems to be inside this line in the initialization of pytorch_geometric/data/data.py:

from torch_sparse import SparseTensor

Tracing that through the root issue seems to be in torch_sparse calling torch.ops.load_library(spec.origin), where spec.origin is /home/john/.local/lib/python3.10/site-packages/torch_sparse/_version_cuda.so, and not quite sure how to decode that binary to debug further.

In the end I just downgraded to Python 3.6 and installed via pip instead of conda and the issue didn't seem to persist.

LeonMeon commented 1 year ago

Hi! I Have the same problem: yesterday torch_geometric worked normally. Now my kernel in jupyter dies every time when I import torch_geometric. Is there any solutions of this problem?

rusty1s commented 1 year ago

Which PyTorch and PyG version are you using? What has changed from yesterday? :)

rusty1s commented 1 year ago

Can you test to import torch before importing torch_geometric?

LeonMeon commented 1 year ago

Sorry for delay,I tried to manage it and gave up. import torch works normally (torch 1.13.0, cuda 11.6). That day (that "yesteraday") my server just reloaded

Akshay1010567 commented 1 year ago

I m facing the same issue while running 'from torch_geometric.datasets import Planetoid'. Before that import torch, torch_geometry was installed successfully and solved the torch-sparse error. But I could not go ahead after running from torch_geometric.datasets import Planetoid, because jupyter kernel crashed and shows OSError: [WinError 127] The specified procedure could not be found. Please help me to find out the solution.

rusty1s commented 1 year ago

Does import torch_scatter and import torch_sparse work normally for you?

Akshay1010567 commented 1 year ago

Does import torch_scatter and import torch_sparse work normally for you?

No, they both are not working and giving me the same error. Before that OSError: [WinError 127] The specified procedure could not be found, jupyter kernel crashed and show this message: https://stackoverflow.com/questions/59181708/getting-python-entry-point-not-found-when-trying-to-launch-jupyter-notebook-from, the exact same screenshot error message. After that I have upgrade conda and Anaconda according to that solution. But achieved same error.

rusty1s commented 1 year ago

Can you also try pip installation?

Akshay1010567 commented 1 year ago

Can you also try pip installation?

yes, I tried. But this installation failed to solve OS Error. And I could not be able to run/import 'from torch_geometric.datasets import Planetoid'. I could not able to work with Planetoid or any other PyG (torch geometry) dataset. Please help me to find out the solution.

rusty1s commented 1 year ago

Can you post the full log when running


pip install --verbose torch-scatter torch-sparse -f https://data.pyg.org/...
Akshay1010567 commented 1 year ago

(env_pytorch) E:\KIGA DATASET\Example_EventLogs\SAP_DEV>pip install --verbose torch-scatter torch-sparse -f https://data.pyg.org/... Using pip 22.3.1 from E:\Tensorprojects\envs\env_pytorch\lib\site-packages\pip (python 3.8) Looking in links: https://data.pyg.org/... Requirement already satisfied: torch-scatter in e:\tensorprojects\envs\env_pytorch\lib\site-packages (2.0.7) Requirement already satisfied: torch-sparse in e:\tensorprojects\envs\env_pytorch\lib\site-packages (0.6.9) Requirement already satisfied: scipy in e:\tensorprojects\envs\env_pytorch\lib\site-packages (from torch-sparse) (1.9.3) Requirement already satisfied: numpy<1.26.0,>=1.18.5 in e:\tensorprojects\envs\env_pytorch\lib\site-packages (from scipy->torch-sparse) (1.23.5)

sorry for the late reply. I got the same OS error message as before. My anaconda env is stored in a different directory and current jupyter notebook file is in a different directory. Is there any problem with that? I have worked on other projects with the different directories and works fine, but while working with this PyG dataset, I am not going ahead.

rusty1s commented 1 year ago

I think this is totally fine.

Can you first uninstall all the packages and run the same again? The logs are not very meaningful since it just says that requirements are already satisfied.

Akshay1010567 commented 1 year ago

I uninstalled all the packages and installed them again and at the end tried to install 'torch-sparse with pip install --verbose torch-scatter torch-sparse -f https://data.pyg.org/...', but still while running the 'from torch_geometric.io import read_planetoid_data', the error comes with torch-sparse module not found. The error while installing torch-sparse is below:

(env_pytorch) E:\KIGA DATASET\Example_EventLogs\SAP_DEV>pip install --verbose torch-scatter torch-sparse -f https://data.pyg.org/... Using pip 22.3.1 from E:\Tensorprojects\envs\env_pytorch\lib\site-packages\pip (python 3.8) Looking in links: https://data.pyg.org/... Collecting torch-scatter Using cached torch_scatter-2.1.0.tar.gz (106 kB) Running command python setup.py egg_info running egg_info creating C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-78w17tot\torch_scatter.egg-info writing C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-78w17tot\torch_scatter.egg-info\PKG-INFO writing dependency_links to C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-78w17tot\torch_scatter.egg-info\dependency_links.txt writing requirements to C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-78w17tot\torch_scatter.egg-info\requires.txt writing top-level names to C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-78w17tot\torch_scatter.egg-info\top_level.txt writing manifest file 'C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-78w17tot\torch_scatter.egg-info\SOURCES.txt' reading manifest file 'C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-78w17tot\torch_scatter.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '' found under directory 'test' adding license file 'LICENSE' writing manifest file 'C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-78w17tot\torch_scatter.egg-info\SOURCES.txt' Preparing metadata (setup.py) ... done Collecting torch-sparse Using cached torch_sparse-0.6.15.tar.gz (2.1 MB) Running command python setup.py egg_info running egg_info creating C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-lrnrvfxz\torch_sparse.egg-info writing C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-lrnrvfxz\torch_sparse.egg-info\PKG-INFO writing dependency_links to C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-lrnrvfxz\torch_sparse.egg-info\dependency_links.txt writing requirements to C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-lrnrvfxz\torch_sparse.egg-info\requires.txt writing top-level names to C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-lrnrvfxz\torch_sparse.egg-info\top_level.txt writing manifest file 'C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-lrnrvfxz\torch_sparse.egg-info\SOURCES.txt' reading manifest file 'C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-lrnrvfxz\torch_sparse.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '' found under directory 'test' adding license file 'LICENSE' writing manifest file 'C:\Users\HP\AppData\Local\Temp\pip-pip-egg-info-lrnrvfxz\torch_sparse.egg-info\SOURCES.txt' Preparing metadata (setup.py) ... done Requirement already satisfied: scipy in e:\tensorprojects\envs\env_pytorch\lib\site-packages (from torch-sparse) (1.9.3) Requirement already satisfied: numpy<1.26.0,>=1.18.5 in e:\tensorprojects\envs\env_pytorch\lib\site-packages (from scipy->torch-sparse) (1.24.0) Building wheels for collected packages: torch-scatter, torch-sparse Running command python setup.py bdist_wheel running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-38 creating build\lib.win-amd64-cpython-38\torch_scatter copying torch_scatter\placeholder.py -> build\lib.win-amd64-cpython-38\torch_scatter copying torch_scatter\scatter.py -> build\lib.win-amd64-cpython-38\torch_scatter copying torch_scatter\segment_coo.py -> build\lib.win-amd64-cpython-38\torch_scatter copying torch_scatter\segment_csr.py -> build\lib.win-amd64-cpython-38\torch_scatter copying torch_scatter\utils.py -> build\lib.win-amd64-cpython-38\torch_scatter copying torch_scatter__init__.py -> build\lib.win-amd64-cpython-38\torch_scatter creating build\lib.win-amd64-cpython-38\torch_scatter\composite copying torch_scatter\composite\logsumexp.py -> build\lib.win-amd64-cpython-38\torch_scatter\composite copying torch_scatter\composite\softmax.py -> build\lib.win-amd64-cpython-38\torch_scatter\composite copying torch_scatter\composite\std.py -> build\lib.win-amd64-cpython-38\torch_scatter\composite copying torch_scatter\composite__init__.py -> build\lib.win-amd64-cpython-38\torch_scatter\composite running egg_info writing torch_scatter.egg-info\PKG-INFO writing dependency_links to torch_scatter.egg-info\dependency_links.txt writing requirements to torch_scatter.egg-info\requires.txt writing top-level names to torch_scatter.egg-info\top_level.txt reading manifest file 'torch_scatter.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*' found under directory 'test' adding license file 'LICENSE' writing manifest file 'torch_scatter.egg-info\SOURCES.txt' running build_ext E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\utils\cpp_extension.py:358: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified warnings.warn(f'Error checking compiler version for {compiler}: {error}') building 'torch_scatter._scatter_cpu' extension creating build\temp.win-amd64-cpython-38 creating build\temp.win-amd64-cpython-38\Release creating build\temp.win-amd64-cpython-38\Release\csrc creating build\temp.win-amd64-cpython-38\Release\csrc\cpu "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DWITH_PYTHON -Dtorchscatter_EXPORTS -Icsrc -IE:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include -IE:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\torch\csrc\api\include -IE:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\TH -IE:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\THC -IE:\Tensorprojects\envs\env_pytorch\include -IE:\Tensorprojects\envs\env_pytorch\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt" /EHsc /Tpcsrc\cpu\scatter_cpu.cpp /Fobuild\temp.win-amd64-cpython-38\Release\csrc\cpu\scatter_cpu.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -O3 -DAT_PARALLEL_OPENMP /openmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0 cl : Command line warning D9002 : ignoring unknown option '-O3' scatter_cpu.cpp E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/macros/Macros.h(138): warning C4067: unexpected tokens following preprocessor directive - expected a newline E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(92): warning C4814: 'c10::reverse_iterator<_Iterator>::operator =': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(176): note: see reference to class template instantiation 'c10::reverse_iterator<_Iterator>' being compiled E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(125): warning C4814: 'c10::reverse_iterator<_Iterator>::operator ++': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(131): warning C4814: 'c10::reverse_iterator<_Iterator>::operator ++': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(136): warning C4814: 'c10::reverse_iterator<_Iterator>::operator --': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(142): warning C4814: 'c10::reverse_iterator<_Iterator>::operator --': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(151): warning C4814: 'c10::reverse_iterator<_Iterator>::operator +=': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(160): warning C4814: 'c10::reverse_iterator<_Iterator>::operator -=': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(88): warning C4814: 'c10::basic_string_view::operator =': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(672): note: see reference to class template instantiation 'c10::basic_string_view' being compiled E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(190): warning C4814: 'c10::basic_string_view::remove_prefix': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(199): warning C4814: 'c10::basic_string_view::remove_suffix': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(205): warning C4814: 'c10::basic_string_view::swap': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(88): warning C4814: 'c10::basic_string_view::operator =': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/StringUtil.h(144): note: see reference to class template instantiation 'c10::basic_string_view' being compiled E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(190): warning C4814: 'c10::basic_string_view::remove_prefix': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(199): warning C4814: 'c10::basic_string_view::remove_suffix': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(205): warning C4814: 'c10::basic_string_view::swap': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(521): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(520): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(522): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(519): error C3259: 'constexpr' functions can only have one return statement E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(548): error C3250: 'count': declaration is not allowed in 'constexpr' function body E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(548): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(549): error C3250: 'k': declaration is not allowed in 'constexpr' function body E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(549): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(549): note: see usage of '++' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(550): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(551): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(551): note: see usage of '++' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(553): error C3256: 'count': variable use does not produce a constant expression E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(561): error C2131: expression did not evaluate to a constant E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(553): note: a non-constant (sub-)expression was encountered Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe. You will be prompted to send an error report to Microsoft later. INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit code 2 error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. full command: 'E:\Tensorprojects\envs\env_pytorch\python.exe' -u -c ' exec(compile('"'"''"'"''"'"'

This is -- a caller that pip uses to run setup.py

#

- It imports setuptools before invoking setup.py, to enable projects that directly

import from distutils.core to work with newer packaging standards.

- It provides a clear error message when setuptools is not installed.

- It sets sys.argv[0] to the underlying setup.py, when invoking setup.py so

setuptools doesn'"'"'t think the script is -c. This avoids the following warning:

manifest_maker: standard file '"'"'-c'"'"' not found".

- It generates a shim setup.py, for handling setup.cfg-only projects.

import os, sys, tokenize

try: import setuptools except ImportError as error: print( "ERROR: Can not execute setup.py since setuptools is not available in " "the build environment.", file=sys.stderr, ) sys.exit(1)

file = %r sys.argv[0] = file

if os.path.exists(file): filename = file with tokenize.open(file) as f: setup_py_code = f.read() else: filename = "" setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec")) '"'"''"'"''"'"' % ('"'"'C:\Users\HP\AppData\Local\Temp\pip-install-kc7ao5gc\torch-scatter_e8d2512063ec4cff9eff6cb8355bcc28\setup.py'"'"',), "", "exec"))' bdist_wheel -d 'C:\Users\HP\AppData\Local\Temp\pip-wheel-qp_7i_pu' cwd: C:\Users\HP\AppData\Local\Temp\pip-install-kc7ao5gc\torch-scatter_e8d2512063ec4cff9eff6cb8355bcc28\ Building wheel for torch-scatter (setup.py) ... error ERROR: Failed building wheel for torch-scatter Running setup.py clean for torch-scatter Running command python setup.py clean running clean removing 'build\temp.win-amd64-cpython-38' (and everything under it) removing 'build\lib.win-amd64-cpython-38' (and everything under it) 'build\bdist.win-amd64' does not exist -- can't clean it 'build\scripts-3.8' does not exist -- can't clean it removing 'build' Running command python setup.py bdist_wheel running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-38 creating build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\add.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\bandwidth.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\cat.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\coalesce.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\convert.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\diag.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\eye.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\index_select.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\masked_select.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\matmul.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\metis.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\mul.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\narrow.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\padding.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\permute.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\reduce.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\rw.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\saint.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\sample.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\select.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\spadd.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\spmm.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\spspmm.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\storage.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\tensor.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\transpose.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse\utils.py -> build\lib.win-amd64-cpython-38\torch_sparse copying torch_sparse__init__.py -> build\lib.win-amd64-cpython-38\torch_sparse running egg_info writing torch_sparse.egg-info\PKG-INFO writing dependency_links to torch_sparse.egg-info\dependency_links.txt writing requirements to torch_sparse.egg-info\requires.txt writing top-level names to torch_sparse.egg-info\top_level.txt reading manifest file 'torch_sparse.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*' found under directory 'test' adding license file 'LICENSE' writing manifest file 'torch_sparse.egg-info\SOURCES.txt' running build_ext E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\utils\cpp_extension.py:358: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified warnings.warn(f'Error checking compiler version for {compiler}: {error}') building 'torch_sparse._convert_cpu' extension creating build\temp.win-amd64-cpython-38 creating build\temp.win-amd64-cpython-38\Release creating build\temp.win-amd64-cpython-38\Release\csrc creating build\temp.win-amd64-cpython-38\Release\csrc\cpu "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DWITH_PYTHON -Dtorchsparse_EXPORTS -Icsrc -Ithird_party/parallel-hashmap -IE:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include -IE:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\torch\csrc\api\include -IE:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\TH -IE:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\THC -IE:\Tensorprojects\envs\env_pytorch\include -IE:\Tensorprojects\envs\env_pytorch\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt" /EHsc /Tpcsrc\convert.cpp /Fobuild\temp.win-amd64-cpython-38\Release\csrc\convert.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -O2 -DAT_PARALLEL_OPENMP /openmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_convert_cpu -D_GLIBCXX_USE_CXX11_ABI=0 convert.cpp E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/macros/Macros.h(138): warning C4067: unexpected tokens following preprocessor directive - expected a newline E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(92): warning C4814: 'c10::reverse_iterator<_Iterator>::operator =': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(176): note: see reference to class template instantiation 'c10::reverse_iterator<_Iterator>' being compiled E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(125): warning C4814: 'c10::reverse_iterator<_Iterator>::operator ++': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(131): warning C4814: 'c10::reverse_iterator<_Iterator>::operator ++': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(136): warning C4814: 'c10::reverse_iterator<_Iterator>::operator --': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(142): warning C4814: 'c10::reverse_iterator<_Iterator>::operator --': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(151): warning C4814: 'c10::reverse_iterator<_Iterator>::operator +=': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(160): warning C4814: 'c10::reverse_iterator<_Iterator>::operator -=': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(88): warning C4814: 'c10::basic_string_view::operator =': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(672): note: see reference to class template instantiation 'c10::basic_string_view' being compiled E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(190): warning C4814: 'c10::basic_string_view::remove_prefix': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(199): warning C4814: 'c10::basic_string_view::remove_suffix': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(205): warning C4814: 'c10::basic_string_view::swap': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(88): warning C4814: 'c10::basic_string_view::operator =': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/StringUtil.h(144): note: see reference to class template instantiation 'c10::basic_string_view' being compiled E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(190): warning C4814: 'c10::basic_string_view::remove_prefix': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(199): warning C4814: 'c10::basic_string_view::remove_suffix': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(205): warning C4814: 'c10::basic_string_view::swap': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(521): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(520): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(522): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(519): error C3259: 'constexpr' functions can only have one return statement E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(548): error C3250: 'count': declaration is not allowed in 'constexpr' function body E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(548): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(549): error C3250: 'k': declaration is not allowed in 'constexpr' function body E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(549): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(549): note: see usage of '++' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(550): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(551): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(551): note: see usage of '++' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(553): error C3256: 'count': variable use does not produce a constant expression E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(561): error C2131: expression did not evaluate to a constant E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(553): note: a non-constant (sub-)expression was encountered Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe. You will be prompted to send an error report to Microsoft later. INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit code 2 error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. full command: 'E:\Tensorprojects\envs\env_pytorch\python.exe' -u -c ' exec(compile('"'"''"'"''"'"'

This is -- a caller that pip uses to run setup.py

#

- It imports setuptools before invoking setup.py, to enable projects that directly

import from distutils.core to work with newer packaging standards.

- It provides a clear error message when setuptools is not installed.

- It sets sys.argv[0] to the underlying setup.py, when invoking setup.py so

setuptools doesn'"'"'t think the script is -c. This avoids the following warning:

manifest_maker: standard file '"'"'-c'"'"' not found".

- It generates a shim setup.py, for handling setup.cfg-only projects.

import os, sys, tokenize

try: import setuptools except ImportError as error: print( "ERROR: Can not execute setup.py since setuptools is not available in " "the build environment.", file=sys.stderr, ) sys.exit(1)

file = %r sys.argv[0] = file

if os.path.exists(file): filename = file with tokenize.open(file) as f: setup_py_code = f.read() else: filename = "" setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec")) '"'"''"'"''"'"' % ('"'"'C:\Users\HP\AppData\Local\Temp\pip-install-kc7ao5gc\torch-sparse_e7c9d6355b734cada9391c33c74d765d\setup.py'"'"',), "", "exec"))' bdist_wheel -d 'C:\Users\HP\AppData\Local\Temp\pip-wheel-uhhhbwe4' cwd: C:\Users\HP\AppData\Local\Temp\pip-install-kc7ao5gc\torch-sparse_e7c9d6355b734cada9391c33c74d765d\ Building wheel for torch-sparse (setup.py) ... error ERROR: Failed building wheel for torch-sparse Running setup.py clean for torch-sparse Running command python setup.py clean running clean removing 'build\temp.win-amd64-cpython-38' (and everything under it) removing 'build\lib.win-amd64-cpython-38' (and everything under it) 'build\bdist.win-amd64' does not exist -- can't clean it 'build\scripts-3.8' does not exist -- can't clean it removing 'build' Failed to build torch-scatter torch-sparse Installing collected packages: torch-scatter, torch-sparse Running command Running setup.py install for torch-scatter running install E:\Tensorprojects\envs\env_pytorch\lib\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.win-amd64-cpython-38 creating build\lib.win-amd64-cpython-38\torch_scatter copying torch_scatter\placeholder.py -> build\lib.win-amd64-cpython-38\torch_scatter copying torch_scatter\scatter.py -> build\lib.win-amd64-cpython-38\torch_scatter copying torch_scatter\segment_coo.py -> build\lib.win-amd64-cpython-38\torch_scatter copying torch_scatter\segment_csr.py -> build\lib.win-amd64-cpython-38\torch_scatter copying torch_scatter\utils.py -> build\lib.win-amd64-cpython-38\torch_scatter copying torch_scatter__init__.py -> build\lib.win-amd64-cpython-38\torch_scatter creating build\lib.win-amd64-cpython-38\torch_scatter\composite copying torch_scatter\composite\logsumexp.py -> build\lib.win-amd64-cpython-38\torch_scatter\composite copying torch_scatter\composite\softmax.py -> build\lib.win-amd64-cpython-38\torch_scatter\composite copying torch_scatter\composite\std.py -> build\lib.win-amd64-cpython-38\torch_scatter\composite copying torch_scatter\composite__init__.py -> build\lib.win-amd64-cpython-38\torch_scatter\composite running egg_info writing torch_scatter.egg-info\PKG-INFO writing dependency_links to torch_scatter.egg-info\dependency_links.txt writing requirements to torch_scatter.egg-info\requires.txt writing top-level names to torch_scatter.egg-info\top_level.txt reading manifest file 'torch_scatter.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*' found under directory 'test' adding license file 'LICENSE' writing manifest file 'torch_scatter.egg-info\SOURCES.txt' running build_ext E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\utils\cpp_extension.py:358: UserWarning: Error checking compiler version for cl: [WinError 2] The system cannot find the file specified warnings.warn(f'Error checking compiler version for {compiler}: {error}') building 'torch_scatter._scatter_cpu' extension creating build\temp.win-amd64-cpython-38 creating build\temp.win-amd64-cpython-38\Release creating build\temp.win-amd64-cpython-38\Release\csrc creating build\temp.win-amd64-cpython-38\Release\csrc\cpu "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DWITH_PYTHON -Dtorchscatter_EXPORTS -Icsrc -IE:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include -IE:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\torch\csrc\api\include -IE:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\TH -IE:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\THC -IE:\Tensorprojects\envs\env_pytorch\include -IE:\Tensorprojects\envs\env_pytorch\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\winrt" /EHsc /Tpcsrc\cpu\scatter_cpu.cpp /Fobuild\temp.win-amd64-cpython-38\Release\csrc\cpu\scatter_cpu.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -O3 -DAT_PARALLEL_OPENMP /openmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0 cl : Command line warning D9002 : ignoring unknown option '-O3' scatter_cpu.cpp E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/macros/Macros.h(138): warning C4067: unexpected tokens following preprocessor directive - expected a newline E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(92): warning C4814: 'c10::reverse_iterator<_Iterator>::operator =': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(176): note: see reference to class template instantiation 'c10::reverse_iterator<_Iterator>' being compiled E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(125): warning C4814: 'c10::reverse_iterator<_Iterator>::operator ++': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(131): warning C4814: 'c10::reverse_iterator<_Iterator>::operator ++': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(136): warning C4814: 'c10::reverse_iterator<_Iterator>::operator --': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(142): warning C4814: 'c10::reverse_iterator<_Iterator>::operator --': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(151): warning C4814: 'c10::reverse_iterator<_Iterator>::operator +=': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/reverse_iterator.h(160): warning C4814: 'c10::reverse_iterator<_Iterator>::operator -=': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(88): warning C4814: 'c10::basic_string_view::operator =': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(672): note: see reference to class template instantiation 'c10::basic_string_view' being compiled E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(190): warning C4814: 'c10::basic_string_view::remove_prefix': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(199): warning C4814: 'c10::basic_string_view::remove_suffix': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(205): warning C4814: 'c10::basic_string_view::swap': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(88): warning C4814: 'c10::basic_string_view::operator =': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/StringUtil.h(144): note: see reference to class template instantiation 'c10::basic_string_view' being compiled E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(190): warning C4814: 'c10::basic_string_view::remove_prefix': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(199): warning C4814: 'c10::basic_string_view::remove_suffix': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/util/string_view.h(205): warning C4814: 'c10::basic_string_view::swap': in C++14 'constexpr' will not imply 'const'; consider explicitly specifying 'const' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(521): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(520): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(522): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(519): error C3259: 'constexpr' functions can only have one return statement E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(548): error C3250: 'count': declaration is not allowed in 'constexpr' function body E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(548): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(549): error C3250: 'k': declaration is not allowed in 'constexpr' function body E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(549): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(549): note: see usage of '++' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(550): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(551): error C3249: illegal statement or sub-expression for 'constexpr' function E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(551): note: see usage of '++' E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(553): error C3256: 'count': variable use does not produce a constant expression E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(561): error C2131: expression did not evaluate to a constant E:\Tensorprojects\envs\env_pytorch\lib\site-packages\torch\include\c10/core/DispatchKey.h(553): note: a non-constant (sub-)expression was encountered Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe. You will be prompted to send an error report to Microsoft later. INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe' failed with exit code 2 error: subprocess-exited-with-error

× Running setup.py install for torch-scatter did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip. full command: 'E:\Tensorprojects\envs\env_pytorch\python.exe' -u -c ' exec(compile('"'"''"'"''"'"'

This is -- a caller that pip uses to run setup.py

#

- It imports setuptools before invoking setup.py, to enable projects that directly

import from distutils.core to work with newer packaging standards.

- It provides a clear error message when setuptools is not installed.

- It sets sys.argv[0] to the underlying setup.py, when invoking setup.py so

setuptools doesn'"'"'t think the script is -c. This avoids the following warning:

manifest_maker: standard file '"'"'-c'"'"' not found".

- It generates a shim setup.py, for handling setup.cfg-only projects.

import os, sys, tokenize

try: import setuptools except ImportError as error: print( "ERROR: Can not execute setup.py since setuptools is not available in " "the build environment.", file=sys.stderr, ) sys.exit(1)

file = %r sys.argv[0] = file

if os.path.exists(file): filename = file with tokenize.open(file) as f: setup_py_code = f.read() else: filename = "" setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec")) '"'"''"'"''"'"' % ('"'"'C:\Users\HP\AppData\Local\Temp\pip-install-kc7ao5gc\torch-scattere8d2512063ec4cff9eff6cb8355bcc28\setup.py'"'"',), "", "exec"))' install --record 'C:\Users\HP\AppData\Local\Temp\pip-record-kwanyew\install-record.txt' --single-version-externally-managed --compile --install-headers 'E:\Tensorprojects\envs\env_pytorch\Include\torch-scatter' cwd: C:\Users\HP\AppData\Local\Temp\pip-install-kc7ao5gc\torch-scatter_e8d2512063ec4cff9eff6cb8355bcc28\ Running setup.py install for torch-scatter ... error 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.

rusty1s commented 1 year ago

Sorry for the confusion. You need to append the correct suffix to the URL, e.g.

pip install --verbose torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-1.13.0+cpu.html

(depending on your PyTorch/CUDA installation). See the README.md for more information.

Akshay1010567 commented 1 year ago

I have tried this too, but got again OSError: [WinError 127] The specified procedure could not be found, jupyter kernel crashed and show this message: https://stackoverflow.com/questions/59181708/getting-python-entry-point-not-found-when-trying-to-launch-jupyter-notebook-from. Is that something like my system does not fulfill this pytorch geometric(CUDA/torch) requirements and torch-sparse module installation requirements?

TheAustinator commented 1 year ago

This happened to me when I'd accidentally used the installation instructions for PyTorch 1.13. when I'd had PyTorch 1.12. installed. I was doing this in a docker container so I just restarted the container to get a clean slate, then did

pip install --upgrade torch
pip show torch

and confirmed that it was 1.13.1, then followed the install instructions again and everything worked