from . import ft2font ImportError: DLL load failed: 找不到指定的模块。

PyCharm运行自编程序ranks.py 报错:
from . import ft2font
ImportError: DLL load failed: 找不到指定的模块。如下图:
在这里插入图片描述

解决办法1:

搜索ft2font文件,复制到 ranks.py 所在目录下如下图,依然报错。
在这里插入图片描述
在这里插入图片描述

解决办法2:

pip list 

在这里插入图片描述
matplotlib版本3.3.4,替换为低版本。问题解决。

pip uninstall matplotlib
pip install matplotlib==3.0.3

在这里插入图片描述

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_47542175/article/details/113856624
今日推荐