Skip to content

Commit

Permalink
[FIX] matplotlib error in headless mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mhorn11 committed Jan 2, 2024
1 parent 2e0a4b2 commit 590103a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions excalibur/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import matplotlib
matplotlib.use('tkagg') # prevent issues of cv2 in combination with Qt platform plugin "xcb"
try:
import matplotlib
matplotlib.use('tkagg') # prevent issues with cv2 in combination with the Qt platform plugin "xcb"
except ImportError:
import warnings
warnings.warn("Could not set matplotlib backend to 'tkagg'. This might cause issues with cv2 in combination with the Qt platform plugin 'xcb'.")

__version__ = '0.2.0'
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
checkerboard==0.2.4
cvxopt==1.3.1
cvxpy==1.3.1
matplotlib==3.7.4
motion3d>=0.1
networkx==3.1
numpy>=1.24
Expand Down

0 comments on commit 590103a

Please sign in to comment.