godot-python icon indicating copy to clipboard operation
godot-python copied to clipboard

Segmentation fault while using matplotlib under Linux

Open d-sacre opened this issue 2 years ago • 0 comments

For a data evaluation software, I need among others the matplotlib module. The necessary installation was done according to the information in the READ.ME. After successful installation, running the project in Godot lead to numerous indescriptive error messages. Running a test Python script containing a matplotlib example in a terminal with the following command

PATH/TO/PROJECT/addons/pythonscript/x11-64/bin/python3.8 /PATH/TO/FILE.py

led to the error message

Xlib: request 55 length 16 would exceed buffer size. Segmentation fault (core dumped)

Changing plt.show() to plt.savefig(FILENAME) did not change the result.

The error seems to be related to an issue with different xlib being present on the system (system specific and the ones shipped with the PythonScript addon).

Information for Reproduction

Prerequisites

Commands used for Python Module Installation (Step-by-Step)

  1. Navigate to correct folder cd PATH/TO/PROJECT/addons/pythonscript/x11-64/bin/
  2. Make Python executable runnable chmod u+x ./python3.8
  3. Make sure pip is installed ./python3.8 -m ensurepip
  4. Install the required modules ./python3.8 -m pip install numpy scipy matplotlib

d-sacre avatar Mar 29 '23 12:03 d-sacre