Failed to load PyTorch C extensions:
ivi-42 opened this issue · 2 comments
raceback (most recent call last):
File "C:\Users\user\PycharmProjects\pythonProject19\HOF.py", line 1, in
import galai as gal
File "C:\Users\user\PycharmProjects\pythonProject19\venv\lib\site-packages\galai_init_.py", line 1, in
from galai.model import Model
File "C:\Users\user\PycharmProjects\pythonProject19\venv\lib\site-packages\galai\model.py", line 2, in
import torch
File "C:\Users\user\PycharmProjects\pythonProject19\venv\lib\site-packages\torch_init_.py", line 209, in
raise ImportError(textwrap.dedent('''
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.
I get this problem eheh, what should I do? Sorry for my incompetence
It seems that either your pytorch
installation is broken or that you're running python
from the same directory where you downloaded pytorch
's source code.
- can you check if your
pytorch
works correctly by runningpython -c "import torch"
? - can you make sure there's no directory named
torch
in the directory you run yourpython
from?