【问题标题】:Error : OSError: [WinError 126] Le module spécifié est introuvable错误:OSError:[WinError 126] Le module spécifié est introuvable
【发布时间】:2020-05-06 16:08:14
【问题描述】:

我正在尝试在虚拟环境中的 Windows 10 上安装 pytorch,但出现此错误:


(test) C:\Users\Emmanuelle>py
Python 3.7.7 (default, May  6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32

Warning:
This Python interpreter is in a conda environment, but the environment has
not been activated.  Libraries may fail to load.  To activate this environment
please see https://conda.io/activation

Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Emmanuelle\Anaconda3\lib\site-packages\torch\__init__.py", line 81, in <module>
    ctypes.CDLL(dll)
  File "C:\Users\Emmanuelle\Anaconda3\lib\ctypes\__init__.py", line 364, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Le module spécifié est introuvable

我该如何处理?

【问题讨论】:

    标签: python deep-learning pytorch ddl torchvision


    【解决方案1】:

    您的环境有问题。 根据 errortraceback 显示您的 conda 环境未激活使用 conda activate 激活环境。

    如果您使用的是 pipenv 或 virtualenv,请确保您使用 pip 下载 pytorch

    【讨论】:

    • @我使用 conda 激活它,但问题仍然存在
    • 你在使用“conda install -c pytorch pytorch”
    猜你喜欢
    • 2016-12-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-18
    • 2020-10-15
    • 2020-08-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多