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

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/917e6367-f687-4ed9-ada3-e60ebf7ec1b2%40googlegroups.com.

Attachment: condaList
Description: Binary data

import numpy as np
import cv2,re,gzip,os,sys
import seaborn as sns; 
import binascii
import faulthandler
faulthandler.enable()


sns.set()
from pylab import savefig
maxRows = 561
maxCols = 461
faultDensityImg = np.zeros((maxRows,maxCols),dtype=np.float)
print ("see here") 
ax = sns.heatmap(faultDensityImg, vmin=0, vmax=1,cmap='hot_r')
print ("see here0") 
fig = ax.get_figure()
print ("see here1") 
fig.savefig('./faultDensityHeatMap.png')	

Reply via email to