cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Waa302
New Member

Error when connecting python to PBI

 
Hi, Despite the fact that I do have Python installed when I'm trying to connect it to PBI I get an error message:
 
Unable to connect:

Details: "ADO.NET: Python script error.
Traceback (most recent call last):
  File "PythonScriptWrapper.PY", line 2, in <module>
    import os, pandas, matplotlib.pyplot
  File "C:\USERS\WAA302\APPDATA\LOCAL\CONTINUUM\ANACONDA3_5.3.1\lib\site-packages\pandas\__init__.py", line 19, in <module>
    "Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['numpy']
"

Can anyone help please?
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Waa302
New Member

Re: Error when connecting python to PBI

As I found out yestreday the issue was due to Power Bi not supporting Python 3.7. i had to created new env for py36 and it worked form there!

 

Thank you

View solution in original post

15 REPLIES 15
Super User IV
Super User IV

Re: Error when connecting python to PBI

From what I am seeing in your error message, it looks like you are missing a Python package "numpy".


---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

Waa302
New Member

Re: Error when connecting python to PBI

Which doesn't make sense as I have it installed :

 

Capture.PNG

Minseven Helper I
Helper I

Re: Error when connecting python to PBI

is you PATH environment match what you have in your options?

to check your environement:

1) Open the Python Shell and

2) type:

import sys
print(sys.exec_prefix)

 

Waa302
New Member

Re: Error when connecting python to PBI

Yes it is the same :

 

Capture.PNGCapture.PNG

Microsoft
Microsoft

Re: Error when connecting python to PBI

Hi @Waa302,

 

Since you have two different release of Python, I'm afraid the Numpy is in Python37 rather than in the Anaconda. Please check out. You can do it like below.

pip list -v

Error-when-connecting-python-to-PBI

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Waa302
New Member

Re: Error when connecting python to PBI

As I found out yestreday the issue was due to Power Bi not supporting Python 3.7. i had to created new env for py36 and it worked form there!

 

Thank you

View solution in original post

jcsy_
Frequent Visitor

Re: Error when connecting python to PBI

Hi,

 

I have installed Python3.6 together with pandas, numpy in the same folder but this error below still persist.

What else could have caused this error, please advise.

 

 

DataSource.Error: ADO.NET: Python script error.
Traceback (most recent call last):
File "PythonScriptWrapper.PY", line 2, in <module>
import os, pandas, matplotlib
ModuleNotFoundError: No module named 'matplotlib'

Details:
DataSourceKind=Python
DataSourcePath=Python
Message=Python script error.
Traceback (most recent call last):
File "PythonScriptWrapper.PY", line 2, in <module>
import os, pandas, matplotlib
ModuleNotFoundError: No module named 'matplotlib'

ErrorCode=-2147467259
ExceptionType=Microsoft.PowerBI.Scripting.Python.Exceptions.PythonScriptRuntimeException

 

 

 

fredysarmiento1
New Member

Re: Error when connecting python to PBI

hi, is actually Power BI now supporting  Pyhton 3.7 I am having the sam error.

Details: "ADO.NET: Python script error.
Traceback (most recent call last):
File "PythonScriptWrapper.PY", line 4, in <module>
import matplotlib.pyplot
File "C:\USERS\SARMIENTOF\APPDATA\ROAMING\CONTINUUM\ANACONDA3\lib\site-packages\matplotlib\pyplot.py", line 32, in <module>
import matplotlib.colorbar
File "C:\USERS\SARMIENTOF\APPDATA\ROAMING\CONTINUUM\ANACONDA3\lib\site-packages\matplotlib\colorbar.py", line 32, in <module>
import matplotlib.contour as contour
File "C:\USERS\SARMIENTOF\APPDATA\ROAMING\CONTINUUM\ANACONDA3\lib\site-packages\matplotlib\contour.py", line 18, in <module>
import matplotlib.font_manager as font_manager
File "C:\USERS\SARMIENTOF\APPDATA\ROAMING\CONTINUUM\ANACONDA3\lib\site-packages\matplotlib\font_manager.py", line 48, in <module>
from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
ImportError: DLL load failed: The specified module could not be found.
"

Microsoft
Microsoft

Re: Error when connecting python to PBI

Hi, did we find solution for htis?

I am having similar error. And how do we create environment for 3.6 and link it to powerbi?

Helpful resources

Announcements
Announcing the New Spanish Forum

Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

April 2020 Community Highlights

April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors