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.

Error while installing PyTorch Scatter

See original GitHub issue

📚 Installation

I am getting the error “cl : Command line error D8003 : missing source filename” while installing PyTorch Scatter. 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 SDK is already installed.

Environment

  • OS: Windows 10
  • Python version: 3.6.5
  • PyTorch version: 1.8.1
  • CUDA/cuDNN version: None
  • GCC version:
  • How did you try to install PyTorch Geometric and its extensions (wheel, source): wheel
  • Any other relevant information:

Checklist

  • I followed the installation guide.
  • I cannot find my error message in the FAQ.
  • I set up CUDA correctly and can compile CUDA code via nvcc.
  • I do have multiple CUDA versions on my machine.

Additional context

Log details: Looking in links: https://pytorch-geometric.com/whl/torch-1.8.0+cpu.html Collecting torch-scatter Using cached torch_scatter-2.0.6.tar.gz (21 kB) Building wheels for collected packages: torch-scatter Building wheel for torch-scatter (setup.py) … error ERROR: Command errored out with exit status 1: command: ‘C:\ProgramData\Anaconda3\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’“‘C:\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\setup.py’”’“‘; file=’”‘“‘C:\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\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 ‘C:\Users\1583548\AppData\Local\Temp\pip-wheel-gv7edt2r’ cwd: C:\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255
Complete output (44 lines): running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\torch_scatter copying torch_scatter\placeholder.py -> build\lib.win-amd64-3.6\torch_scatter copying torch_scatter\scatter.py -> build\lib.win-amd64-3.6\torch_scatter copying torch_scatter\segment_coo.py -> build\lib.win-amd64-3.6\torch_scatter copying torch_scatter\segment_csr.py -> build\lib.win-amd64-3.6\torch_scatter copying torch_scatter\utils.py -> build\lib.win-amd64-3.6\torch_scatter copying torch_scatter_init_.py -> build\lib.win-amd64-3.6\torch_scatter creating build\lib.win-amd64-3.6\torch_scatter\composite copying torch_scatter\composite\logsumexp.py -> build\lib.win-amd64-3.6\torch_scatter\composite copying torch_scatter\composite\softmax.py -> build\lib.win-amd64-3.6\torch_scatter\composite copying torch_scatter\composite\std.py -> build\lib.win-amd64-3.6\torch_scatter\composite copying torch_scatter\composite_init_.py -> build\lib.win-amd64-3.6\torch_scatter\composite running build_ext C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\cpp_extension.py:304: 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-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\Users creating build\temp.win-amd64-3.6\Release\Users\1583548 creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local\Temp creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255 creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\csrc creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\csrc\cpu C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -IC:\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\csrc -IC:\ProgramData\Anaconda3\lib\site-packages\torch\include -IC:\ProgramData\Anaconda3\lib\site-packages\torch\include\torch\csrc\api\include -IC:\ProgramData\Anaconda3\lib\site-packages\torch\include\TH -IC:\ProgramData\Anaconda3\lib\site-packages\torch\include\THC -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include “-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\ATLMFC\include” “-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include” "-IC:\Program Files (x86)\Windows Kits\10" /EHsc /TpC:\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\csrc\scatter.cpp /Fobuild\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\csrc\scatter.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -O2 -DAT_PARALLEL_OPENMP /openmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0 cl : Command line error D8003 : missing source filename error: command ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe’ failed with exit status 2 Error in atexit._run_exitfuncs: Traceback (most recent call last): File “C:\ProgramData\Anaconda3\lib\site-packages\colorama\initialise.py”, line 20, in reset_all AnsiToWin32(orig_stdout).reset_all() File “C:\ProgramData\Anaconda3\lib\site-packages\colorama\ansitowin32.py”, line 71, in init strip = conversion_supported or (not is_stream_closed(wrapped) and not is_a_tty(wrapped)) File “C:\ProgramData\Anaconda3\lib\site-packages\colorama\ansitowin32.py”, line 17, in is_stream_closed return not hasattr(stream, ‘closed’) or stream.closed ValueError: underlying buffer has been detached

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: Command errored out with exit status 1: command: ‘C:\ProgramData\Anaconda3\python.exe’ -u -c ‘import sys, setuptools, tokenize; sys.argv[0] = ‘"’“‘C:\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\setup.py’”’“‘; file=’”‘“‘C:\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\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\1583548\AppData\Local\Temp\pip-record-7d0cj2dr\install-record.txt’ --single-version-externally-managed --user --prefix= --compile --install-headers ‘C:\Users\1583548\AppData\Roaming\Python\Python36\Include\torch-scatter’ cwd: C:\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255
Complete output (44 lines): running install running build running build_py creating build creating build\lib.win-amd64-3.6 creating build\lib.win-amd64-3.6\torch_scatter copying torch_scatter\placeholder.py -> build\lib.win-amd64-3.6\torch_scatter copying torch_scatter\scatter.py -> build\lib.win-amd64-3.6\torch_scatter copying torch_scatter\segment_coo.py -> build\lib.win-amd64-3.6\torch_scatter copying torch_scatter\segment_csr.py -> build\lib.win-amd64-3.6\torch_scatter copying torch_scatter\utils.py -> build\lib.win-amd64-3.6\torch_scatter copying torch_scatter_init_.py -> build\lib.win-amd64-3.6\torch_scatter creating build\lib.win-amd64-3.6\torch_scatter\composite copying torch_scatter\composite\logsumexp.py -> build\lib.win-amd64-3.6\torch_scatter\composite copying torch_scatter\composite\softmax.py -> build\lib.win-amd64-3.6\torch_scatter\composite copying torch_scatter\composite\std.py -> build\lib.win-amd64-3.6\torch_scatter\composite copying torch_scatter\composite_init_.py -> build\lib.win-amd64-3.6\torch_scatter\composite running build_ext C:\ProgramData\Anaconda3\lib\site-packages\torch\utils\cpp_extension.py:304: 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-3.6 creating build\temp.win-amd64-3.6\Release creating build\temp.win-amd64-3.6\Release\Users creating build\temp.win-amd64-3.6\Release\Users\1583548 creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local\Temp creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255 creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\csrc creating build\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\csrc\cpu C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MT -IC:\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\csrc -IC:\ProgramData\Anaconda3\lib\site-packages\torch\include -IC:\ProgramData\Anaconda3\lib\site-packages\torch\include\torch\csrc\api\include -IC:\ProgramData\Anaconda3\lib\site-packages\torch\include\TH -IC:\ProgramData\Anaconda3\lib\site-packages\torch\include\THC -IC:\ProgramData\Anaconda3\include -IC:\ProgramData\Anaconda3\include “-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\ATLMFC\include” “-IC:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\include” “-IC:\Program Files (x86)\Windows Kits\10" /EHsc /TpC:\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\csrc\scatter.cpp /Fobuild\temp.win-amd64-3.6\Release\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\csrc\scatter.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /EHsc -O2 -DAT_PARALLEL_OPENMP /openmp -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=_scatter_cpu -D_GLIBCXX_USE_CXX11_ABI=0 cl : Command line error D8003 : missing source filename error: command ‘C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.28.29910\bin\HostX86\x64\cl.exe’ failed with exit status 2 Error in atexit._run_exitfuncs: Traceback (most recent call last): File “C:\ProgramData\Anaconda3\lib\site-packages\colorama\initialise.py”, line 20, in reset_all AnsiToWin32(orig_stdout).reset_all() File “C:\ProgramData\Anaconda3\lib\site-packages\colorama\ansitowin32.py”, line 71, in init strip = conversion_supported or (not is_stream_closed(wrapped) and not is_a_tty(wrapped)) File “C:\ProgramData\Anaconda3\lib\site-packages\colorama\ansitowin32.py”, line 17, in is_stream_closed return not hasattr(stream, ‘closed’) or stream.closed ValueError: underlying buffer has been detached ---------------------------------------- ERROR: Command errored out with exit status 1: ‘C:\ProgramData\Anaconda3\python.exe’ -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '”’”‘C:\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\setup.py’“'”‘; file=’“'”‘C:\Users\1583548\AppData\Local\Temp\pip-install-b92l6kvp\torch-scatter_5b2264bb35584445b5cb65709b56d255\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\1583548\AppData\Local\Temp\pip-record-7d0cj2dr\install-record.txt’ --single-version-externally-managed --user --prefix= --compile --install-headers ‘C:\Users\1583548\AppData\Roaming\Python\Python36\Include\torch-scatter’ Check the logs for full command output.

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
rusty1scommented, Apr 15, 2021

Can you try to install via:

pip install --no-index torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+cpu.html
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 ...
Read more >
Installation problem with PyTorch's Geometric. "torch-scatter ...
Solution found: The error is due to wrong/unsupported GCC versions (that's indeed more PyTorch related). I ...
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 >
Troubleshooting — immuneML 2.2.2 documentation
Depending on the Python version and virtual environment, users may experience errors when installing PyTorch via pip. The most common reason for this ......
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