matplotlib ImportError:导入 _cext 时 DLL 加载失败

qas*_*100 7 python matplotlib pycharm

Matplotlib 问题

如何在导入 matplotlib 时消除此错误(实际上matplotlib.pyplot)?

ImportError: DLL load failed while importing _cext: The specified module could not be found
Run Code Online (Sandbox Code Playgroud)

这些是重新安装 Windows 10 后新安装的 Python 和 Pycharm。我使用的是 Python 3.11.2 和 Pycharm Community Edition 2022.3.3

在重新安装 Windows 之前我没有遇到此问题。我很可能一直在使用较旧版本的 Python 和 Pycharm,但并没有太旧(不记得具体是哪一个),大约有六到八个月的历史。

dec*_*eze 4

打开 Windows PowerShell 并使用:

pip install msvc-runtime
Run Code Online (Sandbox Code Playgroud)