Scikit learn 导入sklearn时导入恐怖

Scikit learn 导入sklearn时导入恐怖,scikit-learn,python-3.7,importerror,Scikit Learn,Python 3.7,Importerror,我正在使用python 3.7 最近,我在导入sklearn模块时开始出现此错误。 我在Jupyter笔记本、Python空闲、Pycharm虚拟环境中也遇到同样的错误 >>> import sklearn Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\aditya\AppData\Roaming\Python\Pytho

我正在使用python 3.7 最近,我在导入sklearn模块时开始出现此错误。 我在Jupyter笔记本、Python空闲、Pycharm虚拟环境中也遇到同样的错误

>>> import sklearn
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\aditya\AppData\Roaming\Python\Python37\site-packages\sklearn\__init__.py", line 75, in <module>
    from .utils._show_versions import show_versions
  File "C:\Users\aditya\AppData\Roaming\Python\Python37\site-packages\sklearn\utils\_show_versions.py", line 12, in <module>
    from ._openmp_helpers import _openmp_parallelism_enabled
ImportError: DLL load failed: The specified module could not be found.
导入sklearn 回溯(最近一次呼叫最后一次): 文件“”,第1行,在 文件“C:\Users\aditya\AppData\Roaming\Python37\site packages\sklearn\ \uuuuu init\uuuuu.py”,第75行,在 从.utils.\u显示\u版本导入显示\u版本 文件“C:\Users\aditya\AppData\Roaming\Python37\site packages\sklearn\utils\\u show\u versions.py”,中第12行 从。openmp\U帮助程序导入\U openmp\U并行性\U已启用 ImportError:DLL加载失败:找不到指定的模块。 我也尝试过重新安装。 之后,我复制了另一个没有问题的项目的sklearn of venv的内容。这东西用了好几次。但现在它又不起作用了


注:pandas、numpy、scipy等均已安装,工作状态绝对良好。几天前,Sklearn也工作正常

这是scikit learn 0.22.0的包装中的一个问题,将在0.22.1(下周发布)中解决。该问题的跟踪地址为:github.com/scikit-learn/scikit-learn/issues/15899。有两种可能的解决方法:

  • 默认情况下,从conda forge安装scikit learn(conda包括缺少的dll):
    conda安装conda forge::scikit learn
  • 安装具有openmp库()的VC++

安装旧版本的sklearn怎么样?