Home | News | Documentation | Download

A problem of pyroot in sublime text3: "root-config: command not found"

I’m using ROOT 6.22.02 on Ubuntu 18.04.5, and I want to edit some pyROOT codes on Sublime Text 3. To build the code, I created a Sublime Text 3’s build configuration as below:

{
 "cmd": ["/bin/bash", "My_ROOT's_Directory/bin/thisroot.sh", "/usr/bin/python", "-u", "$file"],
 "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
 "selector": "source.python"
}

But under this build configuration, once I build the code, it would throw an error:

My_ROOT's_Directory/bin/thisroot.sh: line 196: root-config: command not found
[Finished in 0.0s]

I installed ROOT by CMake, and I didn’t change any configuration(just by default), I’m not sure if there was anything wrong during my installation. And I’ll be appreciated if someone could solve my problem.:slight_smile:

(A little detail: For my convenience, I add

source $HOME/My_ROOT's_Directory/bin/thisroot.sh

at the end of ‘~/.bashrc’ )

ROOT Version: 6.22.02
Platform: Ubuntu 18.04.5
Compiler: Not Provided


Not sure this is a valid PATH… Does it work in bash?

This is a just a simplification of my installation path, and I’m sure the original path works in bash( it’s too long ), otherwise it would throw ‘no module name ROOT’ error…

I’ve solved this problem by editing ~/.bashrc file. It automatically added several lines of codes which prevented sublime text3 working…