Failed to Build Torch-Scatter in Pytorch Geometry
I am very new to the concept of Graph Neural Networks. To learn more I tried installing torch geometric, but it is giving a huge error(which I can't even paste here).
My Versions:
&gt;&gt;&gt; import torch
&gt;&gt;&gt; torch.__version__
'1.8.1'
&gt;&gt;&gt; torch.version.cuda
'10.1'

The command I used to install torch geometric:
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.1+cu101.html

The Error Trace:
 C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/include\xutility(4424): error: function &quot;torch::OrderedDict&lt;Key, Value&gt;::Item::operator=(const torch::OrderedDict&lt;std::string, at::Tensor&gt;::Item &amp;) [with Key=std::string, Value=at::Tensor]&quot; (declared implicitly) cannot be referenced -- it is a deleted function
              detected during:
                instantiation of &quot;_OutIt std::_Move_unchecked(_InIt, _InIt, _OutIt) [with _InIt=torch::OrderedDict&lt;std::string, at::Tensor&gt;::Item *, _OutIt=torch::OrderedDict&lt;std::string, at::Tensor&gt;::Item *]&quot;
    C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/include\vector(1419): here
                instantiation of &quot;std::vector&lt;_Ty, _Alloc&gt;::iterator std::vector&lt;_Ty, _Alloc&gt;::erase(std::vector&lt;_Ty, _Alloc&gt;::const_iterator) [with _Ty=torch::OrderedDict&lt;std::string, at::Tensor&gt;::Item, _Alloc=std::allocator&lt;torch::OrderedDict&lt;std::string, at::Tensor&gt;::Item&gt;]&quot;
    C:/Users/Gopu/anaconda3/envs/torch_geometry/lib/site-packages/torch/include\torch/csrc/api/include/torch/ordered_dict.h(419): here
                instantiation of &quot;void torch::OrderedDict&lt;Key, Value&gt;::erase(const Key &amp;) [with Key=std::string, Value=at::Tensor]&quot;
    C:/Users/Gopu/anaconda3/envs/torch_geometry/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/container/parameterdict.h(51): here

    C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/include\xutility(4424): error: function &quot;torch::OrderedDict&lt;Key, Value&gt;::Item::operator=(const torch::OrderedDict&lt;std::string, std::shared_ptr&lt;torch::nn::Module&gt;&gt;::Item &amp;) [with Key=std::string, Value=std::shared_ptr&lt;torch::nn::Module&gt;]&quot; (declared implicitly) cannot be referenced -- it is a deleted function
              detected during:
                instantiation of &quot;_OutIt std::_Move_unchecked(_InIt, _InIt, _OutIt) [with _InIt=torch::OrderedDict&lt;std::string, std::shared_ptr&lt;torch::nn::Module&gt;&gt;::Item *, _OutIt=torch::OrderedDict&lt;std::string, std::shared_ptr&lt;torch::nn::Module&gt;&gt;::Item *]&quot;
    C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/include\vector(1419): here
                instantiation of &quot;std::vector&lt;_Ty, _Alloc&gt;::iterator std::vector&lt;_Ty, _Alloc&gt;::erase(std::vector&lt;_Ty, _Alloc&gt;::const_iterator) [with _Ty=torch::OrderedDict&lt;std::string, std::shared_ptr&lt;torch::nn::Module&gt;&gt;::Item, _Alloc=std::allocator&lt;torch::OrderedDict&lt;std::string, std::shared_ptr&lt;torch::nn::Module&gt;&gt;::Item&gt;]&quot;
    C:/Users/Gopu/anaconda3/envs/torch_geometry/lib/site-packages/torch/include\torch/csrc/api/include/torch/ordered_dict.h(419): here
                instantiation of &quot;void torch::OrderedDict&lt;Key, Value&gt;::erase(const Key &amp;) [with Key=std::string, Value=std::shared_ptr&lt;torch::nn::Module&gt;]&quot;
    C:/Users/Gopu/anaconda3/envs/torch_geometry/lib/site-packages/torch/include/torch/csrc/api/include\torch/nn/modules/container/moduledict.h(196): here

    2 errors detected in the compilation of &quot;C:/Users/Gopu/AppData/Local/Temp/tmpxft_00001354_00000000-7_scatter_cuda.cpp1.ii&quot;.
    scatter_cuda.cu
    error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin\\nvcc.exe' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\Gopu\anaconda3\envs\torch_geometry\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '&quot;'&quot;'C:\\Users\\Gopu\\AppData\\Local\\Temp\\pip-install-amy5gxh5\\torch-scatter_f0827337be9443d09c6b48e753621f6e\\setup.py'&quot;'&quot;'; __file__='&quot;'&quot;'C:\\Users\\Gopu\\AppData\\Local\\Temp\\pip-install-amy5gxh5\\torch-scatter_f0827337be9443d09c6b48e753621f6e\\setup.py'&quot;'&quot;';f = getattr(tokenize, '&quot;'&quot;'open'&quot;'&quot;', open)(__file__) if os.path.exists(__file__) else io.StringIO('&quot;'&quot;'from setuptools import setup; setup()'&quot;'&quot;');code = f.read().replace('&quot;'&quot;'\r\n'&quot;'&quot;', '&quot;'&quot;'\n'&quot;'&quot;');f.close();exec(compile(code, __file__, '&quot;'&quot;'exec'&quot;'&quot;'))' install --record 'C:\Users\Gopu\AppData\Local\Temp\pip-record-h5amznql\install-record.txt' --single-version-externally-managed --compile --install-headers 'C:\Users\Gopu\anaconda3\envs\torch_geometry\Include\torch-scatter' Check the logs for full command output.


Try checking python version it should be less then 3.9 as wheel for torch-scatter for python 3.9 is not released yet.
Create new environment with python 3.8
install pytorch cuda version and then :-
pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.1+cu101.html
if still not working try
pip install --upgrade torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.1+cu101.html
hope its helpful
