使用 xlwings 时的 Matplotlib 问题 - 无法加载 Qt 平台插件

Matplotlib issue when using xlwings - cannot load Qt platform plugin

当尝试按照示例 http://docs.xlwings.org/en/stable/matplotlib.html 使用 matplot 库将绘图嵌入 excel sheet 时,从 VBA 调用它时出现以下错误。

---------------------------
Error
---------------------------
This application failed to start because it could not find or load the Qt platform plugin "windows"
in "".

Available platform plugins are: direct2d, minimal, offscreen, windows.

Reinstalling the application may fix this problem.

Press Ctrl+C to copy this message to the clipboard.
---------------------------
OK   
---------------------------

有人遇到过这个吗? 我正在使用: 蟒蛇 3-5.2.0 Python 3.6.5 64 位 Qt 5.9.4 PyQt5 5.9.2

回答我自己的问题...

我的路径发生冲突导致脚本选择了错误的 .dll。

在CMD中解决运行: where Qt5Core.dll

就我而言,我得到了两个结果。

C:\Program Files\Conda\Anaconda3\Library\bin\Qt5Core.dll An\Another\Location\Qt5Core.dll

从我的路径中删除 An\Another\Location 解决了这个问题。