Is PyROOT enabled by default on OSX?

I have installed root on OSX using Macports by typing

which installed the newest version 6.06/06 and everything works. But how do I know if PyROOT is enabled? Because importing ROOT gives an error inside python. How can I enable it?


p.s. I am using Python 3.4


not sure about what Macports does, but you can get ROOT binaries, sources and build instructions here


The default variants have a [+] on them. Assuming you didn’t specify any variants yourself, MacPorts should have installed python 2.7 with and all the stuff done properly.

[quote]$ port info root6
root6 @6.06.08 (science)
Variants: avahi, clang34, clang35, clang36, clang37, clang38, [+]cocoa, [+]cxx14, debug, fftw3, fitsio, gcc47, gcc48,
gcc49, gcc5, [+]gcc6, [+]graphviz, [+]gsl, [+]http, ldap, mariadb, [+]minuit2, mysql, mysql51, mysql55,
mysql56, odbc, [+]opengl, percona, postgresql90, postgresql92, pythia, python26, [+]python27, python33,
python34, qt4, [+]roofit, [+]soversion, sqlite3, [+]ssl, [+]tmva, valgrind, vc, x11, [+]xml, xrootd

Description: The ROOT system provides a set of frameworks with all the functionality needed to handle and analyze large
amounts of data in a very efficient way.

Build Dependencies: cmake, gcc6
Library Dependencies: expat, gmp, giflib, jpeg, libpng, lzma, ocaml, ocaml-ctypes, ocaml-findlib, pcre, tiff, zlib, xz, python27,
libgcc, graphviz, gsl, openssl, libxml2
Runtime Dependencies: root_select
Platforms: darwin
License: LGPL-2.1+

Note that you should “select” the right python (the python 2.7 binary from Macports, not from OSX):

If you want to use PyROOT with 3.4, you should uninstall root6 and install root6 +python34, then “select” the Macports-provided python 3.4.

Aside, python3 is fully supported (in the sense that it passes all roottest tests) only since a couple of months. I haven’t kept up with the release schedule, but you may want to check whether 6.06 is recent enough.