Skip to main content
 首页 » 编程设计

python之从 matplotlib 导入 ft2font : "ImportError: DLL load failed: The specified procedure could not be found."

2025年05月04日10think

我有 Windows 7。

由于某些原因,f2tfont.cpp 在安装 matplotlib(通过 pip)时没有编译,因此,matplotlib 安装失败。此外,matplotlib installer找不到 Python 安装。

查看评论 here有关该问题的更多详细信息。

请您参考如下方法:

以下这些命令对我有用。我认为问题出在新的 matplotlib 版本 3.3.1 上。我降级到 matplotlib 3.0.3。

我卸载了较新的版本,然后重新打开命令提示符并安装了 matplotlib 3.0.3。它对我有用。我不确定它是否适合你,所以我建议查看 discussion .

pip uninstall matplotlib 
pip install matplotlib==3.0.3