【问题标题】:What is the >>Qt platform plugin "windows"<<, and why does it keep giving me an error?什么是>>Qt平台插件“windows”<<,为什么它一直给我一个错误?
【发布时间】:2021-08-17 07:15:27
【问题描述】:

我在制作图表时遇到了 VScode 和 Anaconda 的问题。我想绘制数据图表,但不断出现错误。我已经在下面显示了代码和错误。

代码:

import matplotlib.pyplot as plt
plt.plot([1, 2, 3, 4])
plt.ylabel('some numbers')
plt.show()

错误:

PS C:\Users\...\Documents\GitHub\Modelling-Cell-Growth-in-CFU> & C:/Users/.../Anaconda3/envs/rstudio/python.exe c:/Users/.../Documents/GitHub/Modelling-Cell-Growth-in-CFU/test.py      
This application failed to start because it could not find or load the Qt platform plugin "windows"
in "".

Available platform plugins are: minimal, offscreen, windows.

Reinstalling the application may fix this problem.

这个错误是什么意思?我能做些什么呢?我该如何解决?

额外信息:我正在使用 VScode 和 Anaconda。我也在用windows。

【问题讨论】:

  • 您尝试过建议的分辨率吗?例如重新安装conda环境?另外 - 您显示的提示看起来没有激活 conda 环境,因此可能是路径设置不正确。
  • @LudvigH ,我已经通过 Conda 访问了它。我可以保证这是通过 conda 实现的。我确实按照说明进行操作,但它不起作用......
  • 好的。您是否尝试重新安装 conda 环境?一个可能的错误原因是您混合了 pip 和 conda 安装,因此您的路径不正确。参见例如forum.qt.io/topic/93085/qt-python-development-pyside2/9

标签: python visual-studio matplotlib anaconda conda


【解决方案1】:

正如@LudvigH 所说,主要问题是路径错误。在尝试解决所有路径问题后,什么都不会发生,所以我不得不删除任何归因于 Anaconda 和 Python 的东西。我与香草蟒、它的点子和蟒蛇有一些混淆的路径。

全新下载解决了这个问题,现在可以正常工作了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-02-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-11
    • 2019-08-19
    • 2012-05-16
    相关资源
    最近更新 更多