I installed Matplotlib package last month which enables me to use Matplotlib, numpy and pylab in Windows10 Python 3.8.1. However, yesterday it suddenly broke down with error message:
“>>>import matplotlib.pyplot as plt
Traceback (most recent call last):
File “”, line 1, in
File “C:\Users\Yiji Tang\AppData\Local\Programs\Python\Python38-32\lib\site-packages\matplotlib_init_.py”, line 174, in check_versions()
File "C:\Users\Yiji Tang\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."
When I tried to use import Matplotlib.pyplot as plt or import pylab, the error messages are same.
Discussions are welcome.
Yiji Tang
Thanks for your suggestion. It looks unbelievable because Microsoft Visual C++ Redistributable Package is with respect to C++ and Microsoft company, which has nothing to do with Python. I will come to Visual C++ website to have a try, because having C++ compiler on Windows 10 is also useful.
Thanks for the suggestion. I can now import Matplotlib again. The interface session is as follows:
import numpy as np
import pylab
Matplotlib is building the font cache; this may take a moment.
import matplotlib.pyplot as plt
Although my PC is AMD x64-based processor and I installed x86 version of Visual C++ Redistributive package by mistake, it still works.
I appreciate very much the suggestion given by Menno.
Yiji Tang