【问题标题】:ImportError: DLL load failed while importing _openmp_helpers: The specified module could not be foundImportError: DLL load failed while importing _openmp_helpers: 找不到指定的模块
【发布时间】:2020-03-28 23:16:15
【问题描述】:

我想从 sklearn 模块导入一些功能:

from sklearn.preprocessing import StandardScaler

但它返回这个 ImportError :

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-3fb1a94f6848> in <module>
      3 import scipy.io
      4 from matplotlib import pyplot as plt
----> 5 from sklearn.preprocessing import StandardScaler
      6 from sklearn.decomposition import PCA
      7 

c:\users\jules\appdata\local\programs\python\python37\lib\site-packages\sklearn\__init__.py in <module>
     73     from . import __check_build
     74     from .base import clone
---> 75     from .utils._show_versions import show_versions
     76 
     77     __check_build  # avoid flakes unused variable error

c:\users\jules\appdata\local\programs\python\python37\lib\site-packages\sklearn\utils\_show_versions.py in <module>
     10 import importlib
     11 
---> 12 from ._openmp_helpers import _openmp_parallelism_enabled
     13 
     14 

ImportError: DLL load failed: Le module spécifié est introuvable.

其实我查了utils文件夹,并没有找到_openmp_helpers.pyx

最近,我必须从 macOS 更改为 Windows。我在 macOS 上没有这个问题。我使用 pip install sklearn 安装了 sklearn,我正在为这个学生项目使用 jupyter notebook。

pip -V : 19.3.1
python --version : Python 3.7.5

【问题讨论】:

  • 为了帮助您,我们需要代码。请通过编辑将其添加到问题中

标签: python powershell jupyter-notebook dllimport


【解决方案1】:

我遇到了同样的问题,并且只能通过返回到 scikit-learn 的先前版本之一(即 0.20.2,我在较旧的 python 安装中保留)来解决它。尝试降级 sklearn。

【讨论】:

    【解决方案2】:

    是的,它有效,但我认为这不是解决问题的最佳方法:不是吗?至少,它会帮助我推进我的项目,但我仍然关注其他解决方案,而不使用 Anaconda。

    【讨论】:

      猜你喜欢
      • 2020-04-10
      • 2022-06-26
      • 2020-12-04
      • 2020-07-02
      • 2020-06-30
      • 2015-12-16
      • 2019-08-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多