I installed root using the Pacman package manager and pyroot seems to work fine in python when no virtual envorinment is activated:
➜ root git:(master) ✗ python3
Python 3.11.8 (main, Feb 12 2024, 14:50:05) [GCC 13.2.1 20230801] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
>>>
However if I activate a virtial environment, python is not able to find it:
➜ root git:(master) ✗ source .venv/bin/activate
(.venv) ➜ root git:(master) ✗ which python3
/popos/home/caspar/Documents-old/code/root/.venv/bin/python3
(.venv) ➜ root git:(master) ✗ python3
Python 3.11.8 (main, Feb 12 2024, 14:50:05) [GCC 13.2.1 20230801] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ROOT'
>>>
Does anyone know how to resolve this? I saw that using thisroot.sh
seems to be discontinued.
ROOT Version: 6.30.02-2
Platform: Arch Linux x86_64 6.7.9-arch1-1
Compiler: Python 3.11.8-1