gpt4 book ai didi

python - 在 linux 环境 pandas 中绘制错误 python ...可以保存吗?

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:18:18 25 4
gpt4 key购买 nike

<分区>

我正在尝试用 python 绘制一个 pandas 系列。然而,我不是在家用电脑上工作,而是在 linux shell 上通过网格计算工作。当我输入时:

series.plot()

我收到这个错误:

  File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pandas-0.15.0-py2.7-linux-x86_64.egg/pandas/tools/plotting.py", line 2487, in plot_series
**kwds)
File "/usr/local/lib/python2.7/dist-packages/pandas-0.15.0-py2.7-linux-x86_64.egg/pandas/tools/plotting.py", line 2293, in _plot
plot_obj.generate()
File "/usr/local/lib/python2.7/dist-packages/pandas-0.15.0-py2.7-linux-x86_64.egg/pandas/tools/plotting.py", line 919, in generate
self._setup_subplots()
File "/usr/local/lib/python2.7/dist-packages/pandas-0.15.0-py2.7-linux-x86_64.egg/pandas/tools/plotting.py", line 952, in _setup_subplots
fig = self.plt.figure(figsize=self.figsize)
File "/usr/lib/pymodules/python2.7/matplotlib/pyplot.py", line 343, in figure
**kwargs)
File "/usr/lib/pymodules/python2.7/matplotlib/backends/backend_tkagg.py", line 80, in new_figure_manager
window = Tk.Tk()
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1688, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: no display name and no $DISPLAY environment variable

有谁知道我可以做什么或我应该让我的系统管理员做什么?是否可以将绘图保存到文件中,而无需先将其置于某种显示环境中?

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com