我无法导入 torchvision

发布于 2025-01-15 20:48:44 字数 254 浏览 1 评论 0原文

我安装了torchvision0.12.0,python3.8,我的操作系统是Windows。 我成功导入了 torch,但无法导入 torchvision 并出现此错误。

ImportError

导入 _imaging 时 DLL 加载失败: 文件“C:\Users'MyName'\Documents\GitHub\pytorch-cifar\main.py”,第 8 行,位于 import torchvision

有没有人可以解决这个问题?

I installed torchvision0.12.0, python3.8 and my OS is Windows.
I succeeded in importing torch, but I couldn't import torchvision and getting this error.

ImportError

DLL load failed while importing _imaging:
File "C:\Users'MyName'\Documents\GitHub\pytorch-cifar\main.py", line 8, in
import torchvision

Is there someone who can solve this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

So尛奶瓶 2025-01-22 20:48:44

这可能是由于torch和torchvision版本不兼容造成的。您可以通过以下链接获取您想要的信息:

对应的torchvision版本和支持的Python版本

This may be due to incompatible versions of torch and torchvision.You can get the information you want through the following link:

the corresponding torchvision versions and supported Python versions

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文