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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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