ImportError: /home/szakirov/build/lib/libPyROOT.so: undefined symbol: PyUnicodeUCS4_FromString

Hello, my system is running scientific linux 7

[szakirov@localhost ~]$ uname -a
Linux localhost.localdomain 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 13:12:24 CST 2018 x86_64 x86_64 x86_64 GNU/Linux

root version 6.13.03

I am running a certain analysis and I’m running into this problem

[szakirov@localhost nu_65274589]$ enrico_lc nu_65274589.conf
Traceback (most recent call last):
File “/home/szakirov/Desktop/SRMP/enrico/bin/enrico_lc”, line 6, in
import enrico.lightcurve as lightcurve
File “/home/szakirov/Desktop/SRMP/enrico/enrico/lightcurve.py”, line 4, in
import ROOT
File “/home/szakirov/build/lib/ROOT.py”, line 24, in
import cppyy
File “/home/szakirov/build/lib/cppyy.py”, line 61, in
import libPyROOT as _backend
ImportError: /home/szakirov/build/lib/libPyROOT.so: undefined symbol: PyUnicodeUCS4_FromString

I’m not entirely sure what the problem is but can you help me figure it out?
Is it somehow due to a change in python because of the fermi science tools because I run fermisetup in order to use enrico?

[szakirov@localhost nu_65274589]$ which python
~/anaconda2/bin/python
[szakirov@localhost nu_65274589]$ fermisetup
[szakirov@localhost nu_65274589]$ which python
~/Desktop/SRMP/ScienceTools-v11r5p3-fssc-20180124-x86_64-unknown-linux-gnu-libc2.17/x86_64-unknown-linux-gnu-libc2.17/bin/python

fermisetup is basically
alias fermisetup=" $FERMI_DIR/fermi-init.sh"

this is my .bashrc

source /home/szakirov/build/bin/thisroot.sh
export PATH=/home/szakirov/anaconda2/bin:$PATH
export DYLD_INSERT_LIBRARIES=$FERMI_DIR/lib/libf2c.so

export FERMI_DIR=/home/szakirov/Desktop/SRMP/ScienceTools-v11r5p3-fssc-20180124-x86_64-unknown-linux-gnu-libc2.17/x86_64-unknown-linux-gnu-libc2.17
alias fermisetup=“source $FERMI_DIR/fermi-init.sh”

export ENRICO_DIR=/home/szakirov/Desktop/SRMP/enrico
source $ENRICO_DIR/enrico-init.sh

If you compile ROOT and you want to link against anaconda python, you must use the GCC that is distributed by anaconda to compile ROOT. I also recommend you to search the forum before posting a question, since plenty of people already asked this question before.

I figured out I was installing against anaconda while I needed to install against the python in my Fermi Science tools that I forgot to set in terminal. Thank you for the help

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