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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
brightonshock
Frequent Visitor

Python in Power Bi error

Hi,

When trying to use python code in power bi and running the script i get the following error message. I have already checked that matplotlib is installed (in programe files) and checked my python version (3.8.5) so i'm not sure how to fix this. Any help appreciated!

 

Feedback Type:
Frown (Error)

Error Message:
Python script error.
<pi>Traceback (most recent call last):
File "PythonScriptWrapper.PY", line 2, in <module>
import os, uuid, matplotlib
File "C:\PROGRAM FILES\ANACONDA\lib\site-packages\matplotlib\__init__.py", line 174, in <module>
_check_versions()
File "C:\PROGRAM FILES\ANACONDA\lib\site-packages\matplotlib\__init__.py", line 159, in _check_versions
from . import ft2font
ImportError: DLL load failed while importing ft2font: The specified module could not be found.
</pi>

Stack Trace:
Host:Microsoft.PowerBI.Scripting.Python.Exceptions.PythonScriptRuntimeException
Traceback (most recent call last):
File "PythonScriptWrapper.PY", line 2, in <module>
import os, uuid, matplotlib
File "C:\PROGRAM FILES\ANACONDA\lib\site-packages\matplotlib\__init__.py", line 174, in <module>
_check_versions()
File "C:\PROGRAM FILES\ANACONDA\lib\site-packages\matplotlib\__init__.py", line 159, in _check_versions
from . import ft2font
ImportError: DLL load failed while importing ft2font: The specified module could not be found.

 

1 REPLY 1
lbendlin
Super User
Super User

Have you reinstalled the ft2font module?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.