为什么CUDA不适合与EasyOrocr一起使用?

发布于 2025-01-31 12:46:22 字数 433 浏览 5 评论 0原文

根据 pytorch 我在cmd

pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113

​/I.SSTATIC.NET/XOQDX.PNG“ rel =” nofollow noreferrer“>

但是库达仍然没有。有人可以帮我吗?

import torch
print(torch.cuda.is_available())

输出将为false

According to Pytorch I used this command in cmd

pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113

enter image description here

enter image description here

But CUDA still unavailable. Could someone help me, please?

import torch
print(torch.cuda.is_available())

The output will be False

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

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

发布评论

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

评论(3

浮萍、无处依 2025-02-07 12:46:23

我遇到了同样的问题,对我来说,解决方案是卸载Pytorch并使用CUDA 12.1安装夜间版本。我正在使用CUDA工具包12.3。

运行此操作并查看它是否比更新驱动程序更小:

pip uninstall torch

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121

只需确保您的Pytorch版本支持您相应的CUDA工具包,并且都不会使其他版本不匹配。如果这无济于事,请参阅 @trsvchn 关于更新驱动程序的响应=“ https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html” rel =“ nofollow noreferrer”>系统要求。

弄清楚我什么时候做:

python
>>> import torch
>>> torch.__version__
'2.1.2+cpu'

...并意识到我有CPU版本...

I had this same issue, and the fix for me was uninstalling Pytorch and installing the Nightlys version with CUDA 12.1. I am using the CUDA Toolkit 12.3.

Run this and see if it's a smaller issue than updating drivers:

pip uninstall torch

pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121

Just make sure your Pytorch version supports your corresponding CUDA Toolkit version, and neither mismatches the other. If this doesn't help, see the response from @trsvchn about updating drivers, or check if you meet the system requirements.

Figured out when I did:

python
>>> import torch
>>> torch.__version__
'2.1.2+cpu'

...and realized that I had the CPU version...

偏爱自由 2025-02-07 12:46:23

您必须首先更新驱动程序:

这是NVIDIA网站的概念图

“在此处输入图像说明”

这是另一个:

nofollow noreferrer”> “在此处 cuda兼容性

You have to update driver first:

Here is a concept diagram from nvidia website

enter image description here

Here is another one:

enter image description here

More at CUDA Compatibility

我的奇迹 2025-02-07 12:46:23

您仍然必须安装 cuda-toolkit cudnn 在您的机器上

You still have to install cuda-toolkit and cudnn on your machine

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