conda 가상환경에서 torch geometric 설치 및 에러 해결

잠만보 AI·2022년 11월 15일
0

문제:

https://www.kaggle.com/code/kilogrand/graph-neural-network-in-nlp/notebook

위에서 나온 GNN-NLP 코드 구현을 하고자 하는데 torch geometric이 매번 말썽이였다. 이 문제를 해결해서 기록하고자 글로 남긴다.

에러1: OSError

해결법: 아래 링크에서 해결했다

https://velog.io/@seanko29/torch-geometric-설치-에러-OSError-undefined-symbol-ZN5torch3jit17parseSchemaOrNameERKNSt7cxx1112basicstringIcSt11chartraitsIcESaIcEEE

그래도 안된다면....

글쓴이의 환경세팅과 같은 사람을 위해 requirements.txt를 추출했다. 아래 코드를 긁어서 requirements.txt로 만든다음 가상환경을 세팅해서 설치하자.

conda create --name <env> --file requirements.txt

# 예시
conda create --name pyg37 --file requirements.txt

환경 세팅:

  • python 3.7
  • pytorch 1.12.0
  • cuda 11.3.0, cudnn = 8.3.2
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64
_libgcc_mutex=0.1=main
_openmp_mutex=5.1=1_gnu
anyio=3.5.0=py37h06a4308_0
argon2-cffi=21.3.0=pyhd3eb1b0_0
argon2-cffi-bindings=21.2.0=py37h7f8727e_0
attrs=21.4.0=pyhd3eb1b0_0
babel=2.9.1=pyhd3eb1b0_0
backcall=0.2.0=pyhd3eb1b0_0
beautifulsoup4=4.11.1=py37h06a4308_0
blas=1.0=mkl
bleach=4.1.0=pyhd3eb1b0_0
blis=0.7.9=pypi_0
brotlipy=0.7.0=py37h27cfd23_1003
bzip2=1.0.8=h7b6447c_0
ca-certificates=2022.10.11=h06a4308_0
catalogue=2.0.8=pypi_0
certifi=2022.9.24=py37h06a4308_0
cffi=1.15.1=py37h74dc2b5_0
charset-normalizer=2.1.1=pypi_0
click=8.1.3=pypi_0
confection=0.0.3=pypi_0
cryptography=38.0.1=py37h9ce1e76_0
cudatoolkit=11.3.1=h2bc3f7f_2
cycler=0.11.0=pypi_0
cymem=2.0.7=pypi_0
dbus=1.13.18=hb2f20db_0
debugpy=1.6.3=pypi_0
decorator=5.1.1=pyhd3eb1b0_0
defusedxml=0.7.1=pyhd3eb1b0_0
entrypoints=0.4=py37h06a4308_0
expat=2.4.9=h6a678d5_0
ffmpeg=4.3=hf484d3e_0
fontconfig=2.13.1=hef1e5e3_1
fonttools=4.38.0=pypi_0
freetype=2.12.1=h4a9f257_0
giflib=5.2.1=h7b6447c_0
glib=2.69.1=h4ff587b_1
gmp=6.2.1=h295c915_3
gnutls=3.6.15=he1e5248_0
gst-plugins-base=1.14.0=h8213a91_2
gstreamer=1.14.0=h28cd5cc_2
icu=58.2=he6710b0_3
idna=3.4=py37h06a4308_0
importlib-metadata=4.11.3=py37h06a4308_0
importlib_metadata=4.11.3=hd3eb1b0_0
importlib_resources=5.2.0=pyhd3eb1b0_1
intel-openmp=2021.4.0=h06a4308_3561
ipykernel=6.16.2=pypi_0
ipython=7.34.0=pypi_0
ipython_genutils=0.2.0=pyhd3eb1b0_1
ipywidgets=7.6.5=pyhd3eb1b0_1
jedi=0.18.1=py37h06a4308_1
jinja2=3.1.2=py37h06a4308_0
joblib=1.2.0=pypi_0
jpeg=9e=h7f8727e_0
json5=0.9.6=pyhd3eb1b0_0
jsonschema=4.16.0=py37h06a4308_0
jupyter=1.0.0=py37h06a4308_8
jupyter-client=7.4.5=pypi_0
jupyter_client=7.3.5=py37h06a4308_0
jupyter_console=6.4.3=pyhd3eb1b0_0
jupyter_contrib_core=0.4.0=pyhd8ed1ab_0
jupyter_contrib_nbextensions=0.5.1=pyhd8ed1ab_2
jupyter_core=4.11.2=py37h06a4308_0
jupyter_highlight_selected_word=0.2.0=py37_1000
jupyter_latex_envs=1.4.6=pyhd8ed1ab_1002
jupyter_nbextensions_configurator=0.4.1=pyhd8ed1ab_2
jupyter_server=1.18.1=py37h06a4308_0
jupyterlab=3.4.4=py37h06a4308_0
jupyterlab_pygments=0.1.2=py_0
jupyterlab_server=2.15.2=py37h06a4308_0
jupyterlab_widgets=1.0.0=pyhd3eb1b0_1
kiwisolver=1.4.4=pypi_0
krb5=1.19.2=hac12032_0
lame=3.100=h7b6447c_0
langcodes=3.3.0=pypi_0
lcms2=2.12=h3be6417_0
ld_impl_linux-64=2.38=h1181459_1
lerc=3.0=h295c915_0
libclang=10.0.1=default_hb85057a_2
libdeflate=1.8=h7f8727e_5
libedit=3.1.20210910=h7f8727e_0
libevent=2.1.12=h8f2d780_0
libffi=3.3=he6710b0_2
libgcc-ng=11.2.0=h1234567_1
libgomp=11.2.0=h1234567_1
libiconv=1.16=h7f8727e_2
libidn2=2.3.2=h7f8727e_0
libllvm10=10.0.1=hbcb73fb_5
libpng=1.6.37=hbc83047_0
libpq=12.9=h16c4e8d_3
libsodium=1.0.18=h7b6447c_0
libstdcxx-ng=11.2.0=h1234567_1
libtasn1=4.16.0=h27cfd23_0
libtiff=4.4.0=hecacb30_1
libunistring=0.9.10=h27cfd23_0
libuuid=1.41.5=h5eee18b_0
libwebp=1.2.4=h11a3e52_0
libwebp-base=1.2.4=h5eee18b_0
libxcb=1.15=h7f8727e_0
libxkbcommon=1.0.1=hfa300c1_0
libxml2=2.9.14=h74e7548_0
libxslt=1.1.35=h4e12654_0
lxml=4.9.1=py37h1edc446_0
lz4-c=1.9.3=h295c915_1
markupsafe=2.1.1=py37h7f8727e_0
matplotlib=3.5.3=pypi_0
matplotlib-inline=0.1.6=py37h06a4308_0
mistune=0.8.4=py37h14c3975_1001
mkl=2021.4.0=h06a4308_640
mkl-service=2.4.0=py37h7f8727e_0
mkl_fft=1.3.1=py37hd3c417c_0
mkl_random=1.2.2=py37h51133e4_0
murmurhash=1.0.9=pypi_0
nbclassic=0.4.8=py37h06a4308_0
nbclient=0.5.13=py37h06a4308_0
nbconvert=6.5.4=py37h06a4308_0
nbformat=5.5.0=py37h06a4308_0
ncurses=6.3=h5eee18b_3
nest-asyncio=1.5.6=pypi_0
nettle=3.7.3=hbbd107a_1
notebook=6.5.2=py37h06a4308_0
notebook-shim=0.2.2=py37h06a4308_0
nspr=4.33=h295c915_0
nss=3.74=h0370c37_0
numpy=1.21.6=pypi_0
numpy-base=1.21.5=py37ha15fc14_3
nvidia-cublas-cu11=11.10.3.66=pypi_0
nvidia-cuda-nvrtc-cu11=11.7.99=pypi_0
nvidia-cuda-runtime-cu11=11.7.99=pypi_0
nvidia-cudnn-cu11=8.5.0.96=pypi_0
openh264=2.1.1=h4ff587b_0
openssl=1.1.1s=h7f8727e_0
packaging=21.3=pyhd3eb1b0_0
pandas=1.3.5=pypi_0
pandocfilters=1.5.0=pyhd3eb1b0_0
parso=0.8.3=pyhd3eb1b0_0
pathy=0.7.1=pypi_0
pcre=8.45=h295c915_0
pexpect=4.8.0=pyhd3eb1b0_3
pickleshare=0.7.5=pyhd3eb1b0_1003
pillow=9.2.0=py37hace64e9_1
pip=22.2.2=py37h06a4308_0
pkgutil-resolve-name=1.3.10=py37h06a4308_0
ply=3.11=py37_0
preshed=3.0.8=pypi_0
prometheus_client=0.14.1=py37h06a4308_0
prompt-toolkit=3.0.32=pypi_0
prompt_toolkit=3.0.20=hd3eb1b0_0
psutil=5.9.4=pypi_0
ptyprocess=0.7.0=pyhd3eb1b0_2
pycparser=2.21=pyhd3eb1b0_0
pydantic=1.10.2=pypi_0
pygments=2.13.0=pypi_0
pyopenssl=22.0.0=pyhd3eb1b0_0
pyparsing=3.0.9=py37h06a4308_0
pyqt=5.15.7=py37h6a678d5_1
pyqt5-sip=12.11.0=py37h6a678d5_1
pyrsistent=0.18.0=py37heee7806_0
pysocks=1.7.1=py37_1
python=3.7.15=haa1d7c7_0
python-dateutil=2.8.2=pyhd3eb1b0_0
python-fastjsonschema=2.16.2=py37h06a4308_0
pytorch=1.12.0=py3.7_cuda11.3_cudnn8.3.2_0
pytorch-mutex=1.0=cuda
pytz=2022.6=pypi_0
pyyaml=5.1.2=py37h516909a_1
pyzmq=24.0.1=pypi_0
qt-main=5.15.2=h327a75a_7
qt-webengine=5.15.9=hd2b0992_4
qtconsole=5.3.2=py37h06a4308_0
qtpy=2.2.0=py37h06a4308_0
qtwebkit=5.212=h4eab89a_4
readline=8.2=h5eee18b_0
requests=2.28.1=py37h06a4308_0
scikit-learn=1.0.2=pypi_0
scipy=1.7.3=pypi_0
send2trash=1.8.0=pyhd3eb1b0_1
setuptools=65.5.0=py37h06a4308_0
sip=6.6.2=py37h6a678d5_0
six=1.16.0=pyhd3eb1b0_1
smart-open=5.2.1=pypi_0
sniffio=1.2.0=py37h06a4308_1
soupsieve=2.3.2.post1=py37h06a4308_0
spacy=3.4.3=pypi_0
spacy-legacy=3.0.10=pypi_0
spacy-loggers=1.0.3=pypi_0
sqlite=3.39.3=h5082296_0
srsly=2.4.5=pypi_0
terminado=0.13.1=py37h06a4308_0
thinc=8.1.5=pypi_0
threadpoolctl=3.1.0=pypi_0
tinycss2=1.2.1=py37h06a4308_0
tk=8.6.12=h1ccaba5_0
toml=0.10.2=pyhd3eb1b0_0
torch=1.13.0=pypi_0
torch-geometric=2.1.0.post1=pypi_0
torch-scatter=2.0.9=pypi_0
torch-sparse=0.6.14=pypi_0
torchaudio=0.12.0=py37_cu113
torchvision=0.13.0=py37_cu113
tornado=6.2=py37h5eee18b_0
tqdm=4.64.1=pypi_0
traitlets=5.5.0=pypi_0
typer=0.7.0=pypi_0
typing-extensions=4.1.1=pypi_0
typing_extensions=4.3.0=py37h06a4308_0
urllib3=1.26.12=py37h06a4308_0
wasabi=0.10.1=pypi_0
wcwidth=0.2.5=pyhd3eb1b0_0
webencodings=0.5.1=py37_1
websocket-client=0.58.0=py37h06a4308_4
wheel=0.37.1=pyhd3eb1b0_0
widgetsnbextension=3.5.2=py37h06a4308_0
xz=5.2.6=h5eee18b_0
yaml=0.2.5=h7f98852_2
zeromq=4.3.4=h2531618_0
zipp=3.8.0=py37h06a4308_0
zlib=1.2.13=h5eee18b_0
zstd=1.5.2=ha4553b6_0
profile
생명공학을 전공했지만 AI에 관심있는 사람

0개의 댓글