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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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