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

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.

Microsoft.PowerBI.Scripting.Python.Exceptions.PythonScriptRuntimeException-Transforming with python

Facing error while trying to transform data in powerbi using python script. 

For initial script just tries to print string

print('done')

But this fails statin below error. Have installed Python version 3.7.4 with anaconda environment.

Have PowerBi Version: 2.75.5649.582 64-bit (November, 2019)

Have tried uninstalling and reinstalling pandas and matplotlib but no luck.

 

DataSource.Error: ADO.NET: Python script error.
Traceback (most recent call last):
File "PythonScriptWrapper.PY", line 2, in <module>
import os, pandas, matplotlib
File "C:\Users\gunjansa\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\__init__.py", line 17, in <module>
"Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
ImportError: Unable to import required dependencies:
numpy: DLL load failed: The specified module could not be found.

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
File "C:\Users\gunjansa\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\__init__.py", line 17, in <module>
"Unable to import required dependencies:\n" + "\n".join(missing_dependencies)
ImportError: Unable to import required dependencies:
numpy: DLL load failed: The specified module could not be found.

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

Status: New
Comments
v-qiuyu-msft
Community Support

Hi @gunjansa_ms

 

I would suggest you install python without anaconda environment, install pandas and matplotlib packages, then specify the python directory for the Power BI desktop to see if the same issue occurs. See: https://docs.microsoft.com/en-us/power-bi/desktop-python-scripts

 

q1.PNG

 

 

 

Best Regards,
Qiuyun Yu