当前位置:   article > 正文

ImportError: /home/yukang/anaconda3/envs/fsgan/lib/python3.9/site-packages/torch/lib/libtorch_cuda_c_undefined symbol: cudagraphretainuserobject, versi

undefined symbol: cudagraphretainuserobject, version libcudart.so.11.0

ImportError: /home/yukang/anaconda3/envs/fsgan/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined symbol: cudaGraphRetainUserObject, version libcudart.so.11.0

问题描述:

Traceback (most recent call last):
  File "/data/dev/projects/fsgan/download_fsgan_models.py", line 8, in <module>
    from fsgan.utils.utils import download_from_url
  File "/data/dev/projects/fsgan/fsgan/utils/utils.py", line 6, in <module>
    import torch
  File "/home/yukang/anaconda3/envs/fsgan/lib/python3.9/site-packages/torch/__init__.py", line 192, in <module>
    from torch._C import *  # noqa: F403
ImportError: /home/yukang/anaconda3/envs/fsgan/lib/python3.9/site-packages/torch/lib/libtorch_cuda_cpp.so: undefined symbol: cudaGraphRetainUserObject, version libcudart.so.11.0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

解题思路一:

问题是因为 anaconda 的人写了一些错误的包装。

conda uninstall pytorch
conda uninstall libtorch
pip uninstall torch
pip uninstall torch # yes twice
  • 1
  • 2
  • 3
  • 4

然后现在使用 pytorch.org 中的命令全新安装 pytorch

不是(conda install pytorch)而是下面的指令。
conda install pytorch cuda80 -c soumith
  • 1
  • 2

已解决。 {\Huge \color{red}已解决。} 已解决。

参考链接:https://github.com/pytorch/pytorch/issues/2091


创作不易,观众老爷们请留步… 动起可爱的小手,点个赞再走呗 (๑◕ܫ←๑)
欢迎大家关注笔者,你的关注是我持续更博的最大动力


原创文章,转载告知,盗版必究



在这里插入图片描述


在这里插入图片描述
♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠ ⊕ ♠

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/木道寻08/article/detail/939981
推荐阅读
相关标签
  

闽ICP备14008679号