pyinstaller with matplotlib get Segmentation fault

20 views
Skip to first unread message

Hongkun Liang

unread,
Feb 4, 2020, 3:32:08 AM2/4/20
to PyInstaller
Hello there,
This is Johnson and I am now using pyinstaller with matplotlib inside conda to generate the executable script.
The  setup for my conda as below, please see attached condaList for all condaList
python                    3.7.4                h265db76_1
seaborn                   0.9.0                    py37_0
matplotlib                3.1.2                    py37_1    conda-forge
matplotlib-base           3.1.2            py37h250f245_1    conda-forge

and I also attached my test.py, and this one can re-produce the error. My command to generate the executable script as below:
pyinstaller --noupx --onedir test.py

The generated script can work inside conda environment but it will report error outside of conda environment, please check error information below:

[pid 23196] open("/home/s250_dft_1/users/hongkun/CQScan/sample_input_files/dist/test/test", O_RDONLY|O_CLOEXEC)
see here
[pid 23196] open("/home/s250_dft_1/users/hongkun/CQScan/sample_input_files/dist/test/test", O_RDONLY|O_CLOEXEC)
[pid 23196] open("/home/s250_dft_1/users/hongkun/CQScan/sample_input_files/dist/test/test", O_RDONLY|O_CLOEXEC)
[pid 23196] --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_KERNEL, si_addr=0} ---
Fatal Python error: Segmentation fault

Current thread 0x00002b727b55eba0 (most recent call first):
  File "<__array_function__ internals>", line 6 in dot
  File "site-packages/matplotlib/transforms.py", line 1991 in scale
  File "site-packages/matplotlib/figure.py", line 353 in __init__
  File "site-packages/matplotlib/backend_bases.py", line 3258 in new_figure_manager
  File "site-packages/matplotlib/pyplot.py", line 545 in figure
  File "site-packages/matplotlib/pyplot.py", line 603 in gcf
  File "site-packages/matplotlib/pyplot.py", line 919 in gca
  File "site-packages/seaborn/matrix.py", line 525 in heatmap
  File "test.py", line 15 in <module>
[pid 23196] --- SIGSEGV {si_signo=SIGSEGV, si_code=SI_TKILL, si_pid=23196, si_uid=30347} ---
[pid 23196] +++ killed by SIGSEGV +++
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=23196, si_status=SIGSEGV, si_utime=168, si_stime=33}
--- SIGSEGV {si_signo=SIGSEGV, si_code=SI_TKILL, si_pid=23195, si_uid=30347} ---
+++ killed by SIGSEGV +++
Segmentation fault
Please help to give me a hand, thanks and have a nice day

Best regards

Johnson

condaList
test.py
Reply all
Reply to author
Forward
0 new messages