我刚刚开始在 windows 子系统 ubuntu 上的 python3 中使用 fenics,当我打开第一个标题文件时,我收到了这个错误。
Solving linear variational problem. Traceback (most recent call last):
File "ft01_poisson.py", line 39, in <module> plot(u) File "/usr/lib
/python3/dist-packages/dolfin/common/plotting.py", line 438, in plot
return _plot_matplotlib(object, mesh, kwargs) File "/usr/lib/python3/dist-packages/dolfin/common/plotting.py", line 281, in _plot_matplotlib
ax = plt.gca() File "/usr/lib/python3/dist-packages/matplotlib
/pyplot.py", line 962, in gca return gcf().gca(**kwargs) File "/usr/lib
/python3/dist-packages/matplotlib/pyplot.py", line 592, in gcf return
figure() File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line
539, in figure **kwargs) File "/usr/lib/python3/dist-packages/matplotlib/backend_bases.py", line 171, in new_figure_manager return cls.new_figure_manager_given_figure(num, fig) File "/usr/lib/python3/dist-packages/matplotlib/backends/backend_tkagg.py", line 1049, in new_figure_manager_given_figure window = Tk.Tk(className="matplotlib") File "/usr/lib/python3.6/tkinter/__init__.py", line 2020, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable
这里有什么问题?
我在 ubunto 终端上轻松打开 windows 文件也有一些问题。有什么简单的方法可以做到这一点吗?