我使用
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
安装火炬,当我尝试导入它时,我看到错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "Anacondat Path\envs\EnvName\Lib\site-packages\torch\__init__.py", line 137, in <module>
raise err
OSError: [WinError 127] The specified procedure could not be found. Error loading "Anacondat Path\envs\EnvName\Lib\site-packages\torch\lib\c10_cuda.dll" or one of its dependencies.
如果您使用的是 CPU,请激活 conda 环境并运行:
pip3 install torch torchvision torchaudio
如果您在 GPU 上运行:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118