_ROOT Version:6.26/10
_Platform: Windows 10 with WSL2- Ubuntu-22.04.1
_Compiler:g++
When I try to call import ROOT from python3 in VS Code terminal it says that ROOT module does not exist until I manually run thisroot.sh
This is very strange, in fact I checked a lot of things like:
python version is the same of ROOT
root-config command works
if I call root in the terminal it opens root (I’ve added the source command into bashrc)
It seems all ok but it dows not work… any suggestion?
The problem could be that, in the VSCode terminal, ROOT is not sourced correctly. You can open that terminal and check that these two environment variables are set correctly (they are set by source thisroot.sh):
Ok I checked and, despite both $PYTHONPATH and $ROOTSYS were set correctly it didn’t work.
I’ve searched through other programs and found that one of them changed the $RPYTHONPATH (don’t know why the command echo kept to schow me the root’s one).
Removing this program I have solved the problem.