I installed Root 6.10/08 using homebrew. My aim is to import Root in python.
However, I think since the Python version that homebrew installed for me (as a dependency for root) is different than the system python that already exists , I’m having trouble importing root in python.
When I simply type python --version in the terminal I get this:
And, when i check for the homebrew Python by using the “brew info python” command, I get this:
python: stable 2.7.14 (bottled), HEAD Interpreted, interactive, object-oriented programming language https://www.python.org/ /usr/local/Cellar/python/2.7.14 (3,517 files, 48.4MB) * Poured from bottle on 2017-10-19 at 12:27:35 From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/python.rb ==> Dependencies Build: sphinx-doc ✘, pkg-config ✔ Required: openssl ✔ Recommended: readline ✔, sqlite ✔, gdbm ✔ Optional: sphinx-doc ✘, tcl-tk ✘, berkeley-db@4 ✘ ==> Options --with-berkeley-db@4 Build with berkeley-db@4 support --with-poll Enable select.poll, which is not fully implemented on macOS (https://bugs.python.org/issue5154) --with-quicktest Run `make quicktest` after the build (for devs; may fail) --with-sphinx-doc Build HTML documentation --with-tcl-tk Use Homebrew's Tk instead of macOS Tk (has optional Cocoa and threads support) --without-gdbm Build without gdbm support --without-readline Build without readline support --without-sqlite Build without sqlite support --HEAD Install HEAD version ==> Caveats This formula installs a python2 executable to /usr/local/bin. If you wish to have this formula's python executable in your PATH then add the following to ~/.bash_profile: export PATH="/usr/local/opt/python/libexec/bin:$PATH" Pip and setuptools have been installed. To update them pip2 install --upgrade pip setuptools You can install Python packages with pip2 install <package> They will install into the site-package directory /usr/local/lib/python2.7/site-packages See: https://docs.brew.sh/Homebrew-and-Python.html
So clearly the two pythons are different
When I open the system python by simply typing python and then then try to import root by typing import ROOT, i get this:
Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named ROOT
How do i import homebrew root from system python a.k.a Python 2.7.10 ?