GEANT4 from CVMFS on LXPLUS9

Hi,
I am sourcing:

source /cvmfs/geant4.cern.ch/geant4/11.1/x86_64-centos9-gcc11-optdeb-MT/share/Geant4/geant4make/geant4make.sh

on lxplus9. However this breaks the python3 setup:

[mrettig@lxplus900 ~]$ python3
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'python3'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = '/usr/bin/python3'
  sys.base_prefix = '/build/jenkins/workspace/lcg_release_pipeline/install/Python/3.9.12/x86_64-centos9-gcc11-opt'
  sys.base_exec_prefix = '/build/jenkins/workspace/lcg_release_pipeline/install/Python/3.9.12/x86_64-centos9-gcc11-opt'
  sys.platlibdir = 'lib'
  sys.executable = '/usr/bin/python3'
  sys.prefix = '/build/jenkins/workspace/lcg_release_pipeline/install/Python/3.9.12/x86_64-centos9-gcc11-opt'
  sys.exec_prefix = '/build/jenkins/workspace/lcg_release_pipeline/install/Python/3.9.12/x86_64-centos9-gcc11-opt'
  sys.path = [
    '/build/jenkins/workspace/lcg_release_pipeline/install/Python/3.9.12/x86_64-centos9-gcc11-opt/lib/python39.zip',
    '/build/jenkins/workspace/lcg_release_pipeline/install/Python/3.9.12/x86_64-centos9-gcc11-opt/lib/python3.9',
    '/build/jenkins/workspace/lcg_release_pipeline/install/Python/3.9.12/x86_64-centos9-gcc11-opt/lib/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x00007ff84dbddf00 (most recent call first):
<no Python frame>

Is this the right place to get support for this ? Many thanks !

Hey Markus,

Just to clarify, I didn’t handle these builds, but I’m aware that the installations are based on the “geant4” external packages. When I checked the environment variables after running “geant4make.sh”, I noticed they were set up using /cvmfs/sft.cern.ch/lcg/views/LCG_geant4ext20221205/x86_64-centos9-gcc11-opt/, and it seems Python3 is included there.

To set the environment for this, I executed the following, and it resolved the Python issue for me:

source /cvmfs/sft.cern.ch/lcg/views/LCG_geant4ext20221205/x86_64-centos9-gcc11-opt/setup.sh 

Alternatively, you can use Geant4 from the LCG release:

source /cvmfs/sft.cern.ch/lcg/releases/LCG_104/Geant4/11.1.2/x86_64-el9-gcc11-opt/Geant4-env.sh 

But this one is the MT build of Geant4.

Thank you.

The first link works for me.

However, the second:
find: File system loop detected; ‘/cvmfs/sft.cern.ch/lcg/releases/LCG_104/Geant4/11.1.2/x86_64-el9-gcc11-opt/lib64/Geant4-11.1.2/Linux-g++’ is part of the same file system loop as ‘/cvmfs/sft.cern.ch/lcg/releases/LCG_104/Geant4/11.1.2/x86_64-el9-gcc11-opt/lib64’.

The second option also works, just disregard this message.

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