【发布时间】: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