SingleZombie / DL-Demos

Demos for deep learning
357 stars 88 forks source link

ModuleNotFoundError: No module named 'torch._C' #27

Open linlone opened 11 months ago

linlone commented 11 months ago

》pip show torch Name: torch Version: 1.13.0 Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration Home-page: https://pytorch.org/ Author: PyTorch Team Author-email: packages@pytorch.org License: BSD-3 Location: c:\python310\lib\site-packages Requires: typing-extensions Required-by: torchaudio, torchdata, torchtext, torchvision

》pip show torchtext Name: torchtext Version: 0.14.0 Summary: Text utilities and datasets for PyTorch Home-page: https://github.com/pytorch/text Author: PyTorch core devs and James Bradbury Author-email: jekbradbury@gmail.com License: BSD Location: c:\python310\lib\site-packages Requires: numpy, requests, torch, tqdm Required-by:

》python dldemos\Transformer\train.py Traceback (most recent call last): File "D:\IDEA_workshop\deep_learning\deep_learning-Demos\dldemos\Transformer\train.py", line 4, in import torch.nn as nn File "C:\Python310\lib\site-packages\torch\nn__init.py", line 1, in from .modules import * # noqa: F403 File "C:\Python310\lib\site-packages\torch\nn\modules\init__.py", line 1, in from .module import Module File "C:\Python310\lib\site-packages\torch\nn\modules\module.py", line 8, in from ..parameter import Parameter File "C:\Python310\lib\site-packages\torch\nn\parameter.py", line 2, in from torch._C import _disabled_torch_function_impl ModuleNotFoundError: No module named 'torch._C'