from. import ft2font ImportError: DLL load failed: The specified module could not be found.

PyCharm runs the self-edited program ranks.py and reports an error:
from. Import ft2font
ImportError: DLL load failed: The specified module could not be found. As shown below:
Insert picture description here

Solution 1:

Search for the ft2font file and copy it to the directory where ranks.py is located as shown in the figure below. An error is still reported.
Insert picture description here
Insert picture description here

Solution 2:

pip list 

Insert picture description here
Matplotlib version 3.3.4, replaced with a lower version. problem solved.

pip uninstall matplotlib
pip install matplotlib==3.0.3

Insert picture description here

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_47542175/article/details/113856624