【问题标题】:ImportError: dll load failed while importing _openmp_helpers: The specified module could not be found while importing sklearn packageImportError: dll load failed while importing _openmp_helpers: The specified module can not be found while importing sklearn package
【发布时间】:2020-04-10 03:40:30
【问题描述】:

导入 sklearn

版本--3.8.0 64位

Traceback(最近一次调用最后一次): 文件“”,第 1 行,在 导入sklearn 文件“C:\Users\SAI-PC\AppData\Local\Programs\Python\Python38\lib\site-packages\sklearn__init__.py”,第 75 行,在 从 .utils._show_versions 导入 show_versions 文件“C:\Users\SAI-PC\AppData\Local\Programs\Python\Python38\lib\site-packages\sklearn\utils_show_versions.py”,第 12 行,在 从 ._openmp_helpers 导入 _openmp_parallelism_enabled ImportError: DLL load failed while importing _openmp_helpers: 找不到指定的模块。

【问题讨论】:

  • 在 IDLE 中努力解决它,但没有得到纠正。最后通过安装 anaconda IDE 和使用 jupyter notebook 克服了它。

标签: python-3.x scikit-learn openmp dllimport sklearn-pandas


【解决方案1】:

我面临着完全相同的问题。 我有 Python 版本:3.7.4 和 scikit-learn 版本:0.22。 我通过使用以下命令将 scikit-learn 降级到旧版本来解决这个问题:

pip install --upgrade scikit-learn==0.21.3

就在我项目的虚拟环境中,我降级了 sklearn 库。 这可能会有所帮助。 如果有人有更优化的解决方案,欢迎分享。

【讨论】:

    【解决方案2】:

    在 IDLE 中努力解决它,但没有得到纠正。最后通过安装 anaconda IDE 和使用 jupyter notebook 克服了它。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-06-14
      • 1970-01-01
      • 2021-11-07
      • 1970-01-01
      • 1970-01-01
      • 2020-11-24
      • 1970-01-01
      • 2020-03-28
      相关资源
      最近更新 更多