Reputation: 93
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:
>>> import torch
>>> torch.__version__
'1.8.1'
>>> 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 "torch::OrderedDict<Key, Value>::Item::operator=(const torch::OrderedDict<std::string, at::Tensor>::Item &) [with Key=std::string, Value=at::Tensor]" (declared implicitly) cannot be referenced -- it is a deleted function
detected during:
instantiation of "_OutIt std::_Move_unchecked(_InIt, _InIt, _OutIt) [with _InIt=torch::OrderedDict<std::string, at::Tensor>::Item *, _OutIt=torch::OrderedDict<std::string, at::Tensor>::Item *]"
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/include\vector(1419): here
instantiation of "std::vector<_Ty, _Alloc>::iterator std::vector<_Ty, _Alloc>::erase(std::vector<_Ty, _Alloc>::const_iterator) [with _Ty=torch::OrderedDict<std::string, at::Tensor>::Item, _Alloc=std::allocator<torch::OrderedDict<std::string, at::Tensor>::Item>]"
C:/Users/Gopu/anaconda3/envs/torch_geometry/lib/site-packages/torch/include\torch/csrc/api/include/torch/ordered_dict.h(419): here
instantiation of "void torch::OrderedDict<Key, Value>::erase(const Key &) [with Key=std::string, Value=at::Tensor]"
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 "torch::OrderedDict<Key, Value>::Item::operator=(const torch::OrderedDict<std::string, std::shared_ptr<torch::nn::Module>>::Item &) [with Key=std::string, Value=std::shared_ptr<torch::nn::Module>]" (declared implicitly) cannot be referenced -- it is a deleted function
detected during:
instantiation of "_OutIt std::_Move_unchecked(_InIt, _InIt, _OutIt) [with _InIt=torch::OrderedDict<std::string, std::shared_ptr<torch::nn::Module>>::Item *, _OutIt=torch::OrderedDict<std::string, std::shared_ptr<torch::nn::Module>>::Item *]"
C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/include\vector(1419): here
instantiation of "std::vector<_Ty, _Alloc>::iterator std::vector<_Ty, _Alloc>::erase(std::vector<_Ty, _Alloc>::const_iterator) [with _Ty=torch::OrderedDict<std::string, std::shared_ptr<torch::nn::Module>>::Item, _Alloc=std::allocator<torch::OrderedDict<std::string, std::shared_ptr<torch::nn::Module>>::Item>]"
C:/Users/Gopu/anaconda3/envs/torch_geometry/lib/site-packages/torch/include\torch/csrc/api/include/torch/ordered_dict.h(419): here
instantiation of "void torch::OrderedDict<Key, Value>::erase(const Key &) [with Key=std::string, Value=std::shared_ptr<torch::nn::Module>]"
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 "C:/Users/Gopu/AppData/Local/Temp/tmpxft_00001354_00000000-7_scatter_cuda.cpp1.ii".
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] = '"'"'C:\\Users\\Gopu\\AppData\\Local\\Temp\\pip-install-amy5gxh5\\torch-scatter_f0827337be9443d09c6b48e753621f6e\\setup.py'"'"'; __file__='"'"'C:\\Users\\Gopu\\AppData\\Local\\Temp\\pip-install-amy5gxh5\\torch-scatter_f0827337be9443d09c6b48e753621f6e\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 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.
Upvotes: 1
Views: 1601
Reputation: 11
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
Upvotes: 1