【问题标题】:However, import sklearn still gives me error. More details are given below. How do i resolve this?但是, import sklearn 仍然给我错误。更多细节如下。我该如何解决这个问题?
【发布时间】:2020-03-31 01:08:00
【问题描述】:

我在 windows 7 上使用 python3.6(python3.8 之前尝试过同样的问题)。我已经安装了 joblib==0.14.0、numpy==1.17.4、scikit-learn==0.22 和 scipy ==1.3.3 用于某些机器学习项目。

我尝试导入 sklearn 时收到的错误消息是:

    from ._openmp_helpers import _openmp_parallelism_enabled
ImportError: DLL load failed: The specified module could not be found.

请告知如何解决这个问题?

谢谢。

【问题讨论】:

  • 尝试安装MS C++ 2019。它会解决你的问题。但首先,尝试使用 64 位版本的 Python。恐怕您使用的是 32 位版本。
  • 此打包问题正在被跟踪:github.com/scikit-learn/scikit-learn/issues/15899 同时您可以从 conda-forge 安装 scikt-learn:conda install conda-forge::scikit-learn

标签: python-3.x scikit-learn openmp


【解决方案1】:

因此它可能与缺少 OpenMP 相关,我们认为快速解决方法是安装 VC++(2015、2017、2019):https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads。选择系统架构(32 位 -> x86;64 位 -> x64)

更多信息将在此处提供:https://github.com/scikit-learn/scikit-learn/issues/15899

【讨论】:

    猜你喜欢
    • 2023-01-07
    • 2015-06-13
    • 2013-11-23
    • 2021-07-01
    • 1970-01-01
    • 2016-02-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多