Hello everybody,
I have only recently started to use NGSolve. I followed the instructions in the Documentation and compiled everything myself.
Now, I seem to have a problem with Python. For example, the Python code test.py
import matplotlib.pyplot as plt
plt.plot([1, 2, 3])
plt.show()
works fine if I call it with Python. As soon as I call it with netgen, I get the error
NETGEN-6.2-dev
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
optfile ./ng.opt does not exist - using default values
togl-version : 2
loading ngsolve library
NGSolve-6.2.2001-62-gaed90e28
Using Lapack
Including sparse direct solver UMFPACK
Running parallel using 4 thread(s)
importing NGSolve-6.2.2001-62-gaed90e28
(should) load python file 'test.py'
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 2811, in plot
return gca().plot(
File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 935, in gca
return gcf().gca(**kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 578, in gcf
return figure()
File "/usr/lib/python3/dist-packages/matplotlib/pyplot.py", line 525, in figure
**kwargs)
File "/usr/lib/python3/dist-packages/matplotlib/backend_bases.py", line 3218, in new_figure_manager
return cls.new_figure_manager_given_figure(num, fig)
File "/usr/lib/python3/dist-packages/matplotlib/backends/_backend_tk.py", line 1008, in new_figure_manager_given_figure
window = Tk.Tk(className="matplotlib")
File "/usr/lib/python3.7/tkinter/__init__.py", line 2018, in __init__
baseName = os.path.basename(sys.argv[0])
IndexError: list index out of range
Finished executing test.py
Thank you for using NGSolve
For example, when I uncomment the plotting routine in the python example adaptive.py, the same
thing happens. What am I doing wrong?
All the best,
Michael