我在将 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 from a different directory.
Not only with importing torch into your project but also with other libraries using it as a dependency.
Python 3.10.10
手电筒 2.0.0
我试过重新安装手电筒但是没有用,我不知道是什么问题,你能帮我吗?