Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all,
I tried to import data using python script on Power BI deskptop (last update was on 8 Dec 20) following the guidance provided here and received the following error message:
Details: "ADO.NET: Python script error.
C:\ProgramData\Anaconda3\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:\ProgramData\Anaconda3\lib\site-packages\pandas\__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.8 from "C:\ProgramData\Anaconda3\python.exe"
* The NumPy version is: "1.19.2"
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.
"
Before trying to run the script on PBI, I sucessfully instanlled the necessary packages (pandas and matplotlib) using Anaconda Prompt (Anaconda3), tested the script and worked, and applied all relevant settings to enable python scripting (File > Options and settings > Options > Python scripting where python home directory was correctly detected, and IDEs were on the Default OS program for .PY files). The versions I'm using is conda 4.9.2 and Python 3.8.5.
Not sure if I missed something here as I am a beginner in python, however, any advice would be more than welcome.
Thanks,
K
Hi @KosKoul
Did you install numpy?
The error message says it can't find it.
regards
Phil
Proud to be a Super User!
Thanks Phil,
Yes, I forgot to mention that numpy seems to be installed and the version is 1.19.2 as noted on the notification (that was checked on Anaconda Powershell Prompt):
.
That was tested as well before I tried to run the script in PBI.
Thanks,
K
Did you manage to find the solution to this problem? I am having the same issue.
Thanks,
AV
I think so.
WinPython solution with a minor edit.
Step by step procedure:
Python home directory as something like C:\WPy64-3770\python-3.7.7.amd64
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |