Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to resolve the issue ”No module named 'torch._C'“ #18

Open
linlone opened this issue Sep 13, 2023 · 0 comments
Open

how to resolve the issue ”No module named 'torch._C'“ #18

linlone opened this issue Sep 13, 2023 · 0 comments

Comments

@linlone
Copy link

linlone commented Sep 13, 2023

`
》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: [email protected]
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: [email protected]
License: BSD
Location: c:\python310\lib\site-packages
Requires: numpy, requests, torch, tqdm
Required-by:

》python train.py
Traceback (most recent call last):
File "D:\IDEA_workshop\Transformer_study\transformer-PyTorch Implementation of [Attention Is All You Need]\train.py", line 9, in
from torch import nn, optim
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'`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant