0
votes

while running a program in python the following error message occurred.

Traceback (most recent call last): File "C:\Users\Student\AppData\Local\Programs\Python\Python38-32\python\cos.py", line 7, in import matplotlib.pyplot as plt File "C:\Users\Student\AppData\Local\Programs\Python\Python38-32\lib\site-packages\matplotlib_init_.py", line 174, in check_versions() File "C:\Users\Student\AppData\Local\Programs\Python\Python38-32\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
Welcome to StackOverflow, please include your code as a minimal reproducible example - William Baker Morrison

1 Answers

0
votes

This error message means that (f2tfont.cpp does not compile) First

pip uninstall matplotlib 
pip install -U matplotlib==3.2.0rc1

If this does not work out

You need to have Visual Studio c++ in Your System.

Install Visual Studio 2019 with c++ distributions .

i hope this will fix your error