I had to format my laptop and now get this error when I try to run a python script that used to work before I reinstalled everything.
Traceback (most recent call last):
File "/home/jimmy/.MC-TOOLS//bin/mctal2root", line 11, in <module>
ModuleNotFoundError: No module named 'ROOT'
I’ve found several threads like this here, but they all say I have to run
thisroot.sh script, which I don’t have since I installed ROOT on my Fedora 33 (linux distro) from system repositories.
Can you help me with this, please?
is ROOT installed correctly? E.g. can you start the ROOT prompt with the
Do you have different Python versions installed on your system? Could it be that the ROOT you installed is meant e.g. for Python 3 and you started a Python 2 interpreter?
As you say, it should be enough to install the ROOT Fedora package via
dnf or similar to have it up and running, that’s how we build our Fedora Docker images for example.
That’s a test you could do, in fact: start a Fedora Docker container and install ROOT in it, and see if it works there. If yes, there is something broken in your environment.
Yes, root itself works fine. I can launch it from the terminal and it correctly executes macros.
Do you have different Python versions installed on your system?
I don’t know how to check that.
This is the first time I read about this…
dnf list installed "python*" or similar.
In case it helps, here is the recipe we use to create ROOT’s Fedora Docker images. I see that among the packages we install there is a
python3-root, maybe that’s what you are missing?
Ok, maybe this can help:
$ python --version
That missing package caused the issue!
Thank you! Now everything works fine.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.