首先运行以下命令:conda install -c pytorch -c fastai fastai
。CCD_ 2。我导入这个:
from fastai.imports import *
我有一个error
像这样:
Traceback (most recent call last):
File "C:UsersacerDesktopReddit Botdemo.py", line 70, in <module>
from fastai.imports import *
File "C:Usersaceranaconda3libsite-packagesfastaiimports__init__.py", line 2, in <module>
from .torch import *
File "C:Usersaceranaconda3libsite-packagesfastaiimportstorch.py", line 1, in <module>
import torch, torch.nn.functional as F
File "C:Usersaceranaconda3libsite-packagestorch__init__.py", line 81, in <module>
ctypes.CDLL(dll)
File "C:Usersaceranaconda3libctypes__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
我在stackoverflow
上看了一些帖子,但无法解决这个问题。我该如何解决这个问题?请帮帮我。
如果你像我一样使用没有NVIDIA GPU卡的机器,可能会发生这种情况。conda install -c pytorch -c fastai fastai
将安装一个使用GPU的版本。
为了解决这个问题,我卸载了pytorch,然后conda使用conda install pytorch torchvision cpuonly -c pytorch.
安装了CPU版本。这对我很有效!您可以在官方网站上查看pytorch安装指南:(