Segmentation fault on saving
moldyn-nagel opened this issue · 6 comments
OS: Debian 10, 4.19
Python: 3.7.3
viscm: 0.9 (master-branch)
matplotlib: 3.1.1
numpy: 1.16.2
colorspacious: 1.1.2
Running viscm in edit mode, I am not able to save it. Either via 'save'-button nor via 'File>Export .py'. It crashes with the statement 'segmentation fault'.
This behavior is independent on how viscm is called via $ python -m viscm
, $ python -m viscm edit
or $ python -m viscm edit path/to/file.jscm
.
How did you install python, numpy, and Matplotlib? Getting segmentation faults suggests that something is wrong in the c-extensions.
Thank you for your fast reply, python via debian package manager, numpy and matplotlib via python -m pip install --user ...
due to missing admin privileges. Btw. python is "using" gcc 8.3.0.
Can you reproduce this without viscm (just saving a Matplotlib figure)?
Can you un-install the --user
installed Matplotlib and try in a venv instead
If you do
python -m venv /path/to/venv
. /path/to/venv/bin/activate
pip install --upgrade pip
pip install matplotlib
pip install -e path/to/viscm
?
I am concerned there is some ABI miss-match between the debian system packages and Matplotilb wheel.
Can you reproduce this without viscm (just saving a Matplotlib figure)?
I do not face any issues there, e.g.
import matplotlib.pyplot as plt
fig = plt.figure()
plt.plot([1, 2, 1])
fig.savefig('test.pdf')
works correctly.
Can you un-install the
--user
installed Matplotlib and try in a venv instead
I can test it on Monday, python3-venv needs to be reinstalled but the admin already left for weekend.
Within the venv viscm seems to work flawless. Thank you for your help!
P.S.: Additional to your commands I needed to install PyQt5 and scipy:
pip install PyQt5
pip install scipy
Great, I'm glad that got sorted.
This further re-enforces my view that --user
is a miss-feature of pip
in the scientific python space (or really anything with complied extensions).