小编Cor*_*nna的帖子

ImportError:无法加载 PyTorch C 扩展

我在将 torch 导入到我的项目中时遇到问题,当我尝试导入它时,出现以下错误:

ImportError: Failed to load PyTorch C extensions:
     It appears that PyTorch has loaded the `torch/_C` folder
     of the PyTorch repository rather than the C extensions which
     are expected in the `torch._C` namespace. This can occur when
     using the `install` workflow. e.g.
         $ python setup.py install && python -c "import torch"

     This error can generally be solved using the `develop` workflow
         $ python setup.py develop && python -c "import torch" # This should succeed
     or by running Python …
Run Code Online (Sandbox Code Playgroud)

python torch

10
推荐指数
1
解决办法
4174
查看次数

标签 统计

python ×1

torch ×1