mkl-service 包无法导入,因此 Intel(R) MKL 初始化确保其在 Gnu 时的条件下正确的开箱即用操作

当我直接通过终端运行 python 代码时,它给了我这个错误,我已经尝试重新安装 numpy 并且它没有工作!

我尝试安装 mlk 服务返回相同的错误。有人能帮我吗 ?

UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu 
OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
  from . import _distributor_init
Traceback (most recent call last):
  File "c:Usersteste.userDesktopProject-pythonteste.py", line 4, in <module>
    import pandas as pd
  File "C:Usersteste.userAnaconda3libsite-packagespandas__init__.py", line 16, in <module>
    raise ImportError(
ImportError: Unable to import required dependencies:
numpy:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

    https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  * The Python version is: Python3.9 from "C:Usersteste.userAnaconda3python.exe"
  * The NumPy version is: "1.21.5"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found.
stack overflow mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu
原文答案
author avatar

接受的答案

可以通过强制重新安装 numpy 来重置包配置来解决。

conda install numpy --force-reinstall

答案:

作者头像

我可以通过运行以下命令来卸载并重新安装软件包来修复它

pip uninstall matplotlib
pip uninstall pillow
pip uninstall numpy
pip install matplotlib
pip install pillow
pip install numpy