我尝试在命令提示符中使用
pip install pyplot
安装 pyplot,而安装过程中我错误地关闭了命令提示符。我尝试再次使用相同的命令安装 pyplot,但它没有安装。
如何安装 pyplot?
pyplot 是 matplotlib 的一部分。 为了安装 pyplot,你应该安装 matplotlib
pip install matplotlib
所以你可以“导入matplotlib.pyplot”
您可以前往https://pypi.org/project/matplotlib查看并安装您想要的版本。 然后就可以导入pylot了
from matplotlib import pyplot