LoginSignup
1
2

More than 3 years have passed since last update.

torchvisionをインポートする際にundefined symbolエラーが発生する

Posted at

問題

pytorch1.1.0でtorchvision0.3.0をインポートするとエラーが発生する.

ImportError: myenv/lib/python3.7/site-packages/torchvision/_C.cpython-37m-x86_64-linux-gnu.so: undefined symbol: _ZN3c107Warning4warnENS_14SourceLocationENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

解決方法

それぞれをアンインストールし,再びインストールし直す.
何が起きているかはわからないがとりあえず解決した.バージョンは自分にあったものを.
参考

$conda uninstall pytorch
$conda uninstall torchvision

$conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=9.0 -c pytorch
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2