Ошибка ImportError: не удалось загрузить расширения PyTorch C.Python

Программы на Python
Ответить
Anonymous
 Ошибка ImportError: не удалось загрузить расширения PyTorch C.

Сообщение Anonymous »

У меня возникла проблема с импортом фонарика в мой проект. При попытке импортировать я получаю следующую ошибку:

Код: Выделить всё

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
Torch 2.0.0
Я попробовал переустановить torch, но это не сработало, не могу понять, в чем проблема, можете мне помочь?

Подробнее здесь: https://stackoverflow.com/questions/759 ... extensions
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Python»