Is PyROOT enabled by default on OSX?

Hi,
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?

thanks!
:slight_smile:

p.s. I am using Python 3.4

Hi,

not sure about what Macports does, but you can get ROOT binaries, sources and build instructions here root.cern.ch/building-root

Cheers,
Danilo

The default variants have a [+] on them. Assuming you didn’t specify any variants yourself, MacPorts should have installed python 2.7 with ROOT.py 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.
Homepage: root.cern.ch/

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+
Maintainers: mojca@macports.org[/quote]

Note that you should “select” the right python (the python 2.7 binary from Macports, not from OSX):
https://stackoverflow.com/questions/8201760/how-to-macports-select-python#18056046

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.

Cheers,
Wim