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".


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

Not the Power BI thought police...

I have 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 v-jiascu-msft
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 gunjansa_ms
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
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors