torch geometric 설치 에러: OSError: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

잠만보 석사생·2022년 11월 15일
0

에러 이유:

PyTorch (GPU & CPU) 버전이 둘 다 설치되어있거나 여러 CUDA 버전이 설치되어 있는 경우다. 보통 conda install을 하면 gpu 하고 cpu버전이 둘다 설치되서 torch geometric에서는 충돌을 일으킨다.

따라서 binaries로 설치하면 더 좋다.

anaconda 안에 있는 torch 관련된거 전부 삭제

conda 가상환경 위치가 아래와 같을 시
/home/anaconda3/envs/python-3.9

$ cd /home/anaconda3/envs/python-3.9/lib/python3.9/site-packages
$ rm -rf torch*

torch+gpu/cpu 조합으로 설치

torch 1.12.0 + gpu 조합으로 설치시...

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

출처:
https://stackoverflow.com/questions/69952475/how-to-solve-the-pytorch-geometric-install-error-undefined-symbol-zn5torch3ji/73876857#73876857

https://github.com/pyg-team/pytorch_geometric/issues/999#issuecomment-593482341

profile
생명공학을 전공했지만 AI에 관심있는 사람

0개의 댓글