build fails if TKinter is missing (it should be optional)
Closed this issue · 3 comments
PhilipDeegan commented
Some python scripts are run during build to generate somethings used later in testing.
solution is
import matplotlib
matplotlib.use("Agg") # for systems without GUI
error
Traceback (most recent call last):
File "/path/to/phare/tests/amr/data/field/coarsening/test_coarsen_field.py", line 14, in <module>
from pyphare.pharesee.hierarchy import FieldData
File "/path/to/phare/pyphare/pyphare/pharesee/hierarchy.py", line 11, in <module>
import matplotlib.pyplot as plt
File "/home/deegan/.local/lib/python3.9/site-packages/matplotlib/pyplot.py", line 2500, in <module>
switch_backend(rcParams["backend"])
File "/home/deegan/.local/lib/python3.9/site-packages/matplotlib/pyplot.py", line 285, in switch_backend
raise ImportError(
ImportError: Cannot load backend 'TkAgg' which requires the 'tk' interactive framework, as 'headless' is currently running
nicolasaunai commented
could you be more specific about the context in which you got this error?
PhilipDeegan commented
this is during cmake config generating test data
it's possible we want to move the import of pyplot
PhilipDeegan commented