Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
po
Post Prodigy
Post Prodigy

Power bi + python machine learning

hi,

 

trying to run  example in

 

https://www.absentdata.com/power-bi/python-machine-learning-in-power-bi/

 

getting message below.

 

have python installed and pointed options/settings to folder python installed.

 

Any thoughts how to resolve.

ADO.NET: Python script error. Traceback (most recent call last): File "PythonScriptWrapper.PY", line 14, in <module> from sklearn.model_selection import train_test_split File "D:\PYTHON\lib\site-packages\sklearn\__init__.py", line 134, in <module> from .base import clone File "D:\PYTHON\lib\site-packages\sklearn\base.py", line 13, in <module> from .utils.fixes import signature File "D:\PYTHON\lib\site-packages\sklearn\utils\__init__.py", line 10, in <module> from .validation import (as_float_array, File "D:\PYTHON\lib\site-packages\sklearn\utils\validation.py", line 18, in <module> from ..utils.fixes import signature File "D:\PYTHON\lib\site-packages\sklearn\utils\fixes.py", line 144, in <module> from scipy.sparse.linalg import lsqr as sparse_lsqr # noqa File "D:\PYTHON\lib\site-packages\scipy\sparse\linalg\__init__.py", line 114, in <module> from .isolve import * File "D:\PYTHON\lib\site-packages\scipy\sparse\linalg\isolve\__init__.py", line 6, in <module> from .iterative import * File "D:\PYTHON\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 10, in <module> from . import _iterative ImportError: DLL load failed: The specified module could not be found.
6 REPLIES 6
v-yuta-msft
Community Support
Community Support

@po ,

 

Please check if you have installed the site-packages below:

numpy
pandas
sklearn
scipy

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi,

 

Thanks for reply.

 

All these packages installed.DataSource.Error: ADO.NET: Python script error.
Traceback (most recent call last):
File "PythonScriptWrapper.PY", line 14, in <module>
from sklearn.model_selection import train_test_split
File "D:\PYTHON\lib\site-packages\sklearn\model_selection\__init__.py", line 19, in <module>
from ._validation import cross_val_score
File "D:\PYTHON\lib\site-packages\sklearn\model_selection\_validation.py", line 29, in <module>
from ..metrics.scorer import check_scoring, _check_multimetric_scoring
File "D:\PYTHON\lib\site-packages\sklearn\metrics\__init__.py", line 33, in <module>
from . import cluster

 

 

v-yuta-msft
Community Support
Community Support

@po ,

 

So this issue is not related with power bi. I guess you have installed sevaral versions of python, please click Environment Variables-> Users Variables-> Path and check which version has been configured to CMD. Also check in which version you have installed the packages above.

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Believe 2 versions 

 

1 installed as part of visual studio - guess installed by default as part of vstudio and another d:\python 

 

power bi pointed to D:\python and this in the path and have went to D:\python scripts and ran pip installl for all the packages you mentioned and it says already satisfied thus assuming all installed to area pwer bi needs

v-yuta-msft
Community Support
Community Support

@po ,

 

It's weird. Have you checked if the packages above are in the site-package folder in the "D:\python" version?

 

Regards,

Jimmy Tao

They are in 

 

D:\PYTHON\Lib\site-packages

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.