"Segmentation fault" when using pyroot and matplotlib

Dear experts,
I have a script using both PyROOT and matplotlib to make plots, but I get a “segmentation fault” error. The error could be reproduced using the following scripts:

#!/usr/bin/env python3
import matplotlib.pyplot as plt
from ROOT import TChain

ch = TChain('P')

Is there a fix? Thanks.

I’m using the ROOT at lxplus7 from cvmfs by:
source /cvmfs/sft.cern.ch/lcg/releases/LCG_103/ROOT/6.28.00/x86_64-centos7-gcc12-opt/ROOT-env.sh

ROOT Version: 6.28.00
Platform: x86_64-centos7-gcc12-opt
Compiler: x86_64-centos7-gcc12-opt


Do you also get the crash if you do not import mathplotlib ?
Does it crash on the TChain line ?
May be @vpadulan can help.

Thanks. No crash without importing matlabplot. In the example code, it crashes actually in the from ROOT import TChain line. And if I move the matplotlib line after importing TChain but before using the TChain, it crashes at the last line (ch = TChain('P')).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.