我最近将Anaconda安装到我的系统(Win10)中,并在conda中创建了一个虚拟环境,以安装多个软件包和依赖项,以便将其连接到Power BI,因此我可以运行Python脚本。
在该虚拟环境中,我安装了Python 3.6和许多其他依赖项。多次运行脚本后,我还安装了conda install -c intel mkl-service
,但似乎Numpy存在问题。我检查了Numpy版本1.19.1,并说需要Python 3.6或更高版本。
有趣的是,在Jupyter上一切正常(使用相同的环境内核),但是在Power BI中却没有
不确定如何进行操作,也许通过pip卸载Numpy并通过conda重新安装它?
任何建议都会有所帮助
这是错误:
Please note and check the following:
* The Python version is: Python3.6 from "C:\Users\creyes\Anaconda3\envs\myenv\python.exe"
* The NumPy version is: "1.19.1"
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: No se puede encontrar el módulo especificado.
Details:
DataSourceKind=Python
DataSourcePath=Python
Message=Python script error.
C:\Users\creyes\Anaconda3\envs\myenv\lib\site-packages\numpy\__init__.py:138: 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 "PythonScriptWrapper.PY", line 2, in <module>
import os, pandas, matplotlib
File "C:\Users\creyes\Anaconda3\envs\myenv\lib\site-packages\pandas\__init__.py", line 17, in <module>
"Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
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 NumP...
ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonScriptRuntimeException