Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I am new to Power BI and I have been trying to run a python script to load data. However, when I run a simple script, I am getting the following error:
Code:
Error:
Details: "ADO.NET: Python script error.
<pi>C:\Users\sdingari\Anaconda3\envs\mybi\lib\site-packages\numpy\__init__.py:148: 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\sdingari\Anaconda3\envs\mybi\lib\site-packages\matplotlib\__init__.py", line 109, in <module>
from . import _api, _version, cbook, docstring, rcsetup
File "C:\Users\sdingari\Anaconda3\envs\mybi\lib\site-packages\matplotlib\rcsetup.py", line 27, in <module>
from matplotlib.colors import Colormap, is_color_like
File "C:\Users\sdingari\Anaconda3\envs\mybi\lib\site-packages\matplotlib\colors.py", line 51, in <module>
from PIL import Image
File "C:\Users\sdingari\Anaconda3\envs\mybi\lib\site-packages\PIL\Image.py", line 89, in <module>
from . import _imaging as core
ImportError: DLL load failed while importing _imaging: The specified module could not be found.
</pi>"
I created an environment in anaconda and I am using that environment as my home directory in PowerBI.
I have mkl-service and pillow installed in my anaconda enviroment, now sure why there is an error.
Any help is greatly appreciated.
Thanks a lot.
Hi @Anonymous ,
Thanks a lot for the response.
I was able to fix the issue by following these steps:
- Open anaconda prompt and activate the environment that is being used
- Start PowerBI from the anaconda environment by typing "Program Files\Microsoft Power BI Desktop\bin\PBIDesktop.exe" (This is the path where my PowerBI app is)
- Once PowerBI app opens, check the python paths and run the script
It created the datasets in the script without any errors.
Hi @ceeva ,
So far, not all python packages are supported by power bi.,"mkl-service" python package is not supported by power bi.
If you would like to request support of a Python package not found in below list, please submit your request to Power BI Ideas
For more details, you can read related document: Learn which Python packages are supported - Power BI | Microsoft Learn
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.