Failed to import libcppyy3_9. Please check that ROOT has been built for Python 3.9

Hello,

I am new to ROOT. Currently, I am using anaconda to run PyROOT. However, I keep running into this error message: “Failed to import libcppyy3_9. Please check that ROOT has been built for Python 3.9”.

From there, I checked both versions for ROOT(root-config --python-version [3.10.4]) and Python3 (sudo python3.10 --version[Python 3.10.6]).

However, I still receive the same message below:

ImportError: Failed to import libcppyy3_9. Please check that ROOT has been built for Python 3.9.

Is there something that I might be missing for PyROOT to run?

Regards,

Xavier

_ROOT Version: 6.24/06
_Platform:Ubuntu 22.04.2 LTS
Compiler: Not Provided

In your anaconda environment, check: python --version ; python3 --version

In the base anaconda environment, the version is python/python3: Python 3.9.16

Sorry, In mypython3 environment it is Python 3.11.0

Ok. Thank you! I will make sure to do that now.

root-config --python-version: 3.11.0
python --version: Python 3.11.1

I got it to work. Thank you so much for your guidance. The only thing that is happening is receiving the message below in PyROOT:

The kernel appears to have died. It will restart automatically.