Hello,
I’ve been happily using ROOT through brew for some time on my mac, but recently PyROOT broke. I’m not exactly sure, and I may very well have been fiddling with other packages installed by brew to provoke it. I used to get a segfault (sorry, didn’t keep the log…) but after uninstalling ROOT and reinstalling 6.16/00 I get a python error instead:
eduroam-10-200-21-94:~/Desktop/X0 > python
Python 2.7.15 (default, Jan 12 2019, 21:07:57)
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/root/6.16.00/lib/root/ROOT.py", line 24, in <module>
import cppyy
File "/usr/local/Cellar/root/6.16.00/lib/root/cppyy.py", line 61, in <module>
import libPyROOT as _backend
ImportError: dynamic module does not define init function (initlibPyROOT)
>>>
It seems brew is quite happy with both the installation of ROOT and python (see below), and I don’t see any related issues/warnings from brew doctor
. Any ideas how I can fix this?
Best,
Christian
eduroam-10-200-21-94:~/Desktop/X0 > brew info root
root: stable 6.16.00 (bottled), HEAD
Object oriented framework for large scale data analysis
https://root.cern.ch/
/usr/local/Cellar/root/6.16.00 (5,384 files, 291MB) *
Poured from bottle on 2019-01-28 at 15:29:47
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/root.rb
==> Dependencies
Build: cmake ✔
Required: davix ✔, fftw ✔, gcc ✔, graphviz ✔, gsl ✔, libxml2 ✔, lz4 ✔, openssl ✔, pcre ✔, python ✔, tbb ✔, xrootd ✔, xz ✔
==> Options
--HEAD
Install HEAD version
==> Caveats
Because ROOT depends on several installation-dependent
environment variables to function properly, you should
add the following commands to your shell initialization
script (.bashrc/.profile/etc.), or call them directly
before using ROOT.
For bash users:
. /usr/local/bin/thisroot.sh
For zsh users:
pushd /usr/local >/dev/null; . bin/thisroot.sh; popd >/dev/null
For csh/tcsh users:
source /usr/local/bin/thisroot.csh
Emacs Lisp files have been installed to:
/usr/local/share/emacs/site-lisp/root
==> Analytics
install: 817 (30 days), 2,422 (90 days), 11,168 (365 days)
install_on_request: 761 (30 days), 2,266 (90 days), 10,217 (365 days)
build_error: 0 (30 days)
eduroam-10-200-21-94:~/Desktop/X0 > brew info python@2
python@2: stable 2.7.15 (bottled), HEAD
Interpreted, interactive, object-oriented programming language
https://www.python.org/
/usr/local/Cellar/python@2/2.7.15_2 (4,750 files, 83.8MB) *
Poured from bottle on 2019-01-21 at 23:48:42
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/python@2.rb
==> Dependencies
Build: pkg-config ✔, sphinx-doc ✘
Required: gdbm ✔, openssl ✔, readline ✔, sqlite ✔
==> Options
--HEAD
Install HEAD version
==> Caveats
Pip and setuptools have been installed. To update them
pip install --upgrade pip setuptools
You can install Python packages with
pip 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
==> Analytics
install: 175,940 (30 days), 429,498 (90 days), 2,114,588 (365 days)
install_on_request: 44,877 (30 days), 99,379 (90 days), 424,377 (365 days)
build_error: 0 (30 days)
ROOT Version: 6.16/00
Platform: Not macOS 10.14.2
Compiler: Not Apple LLVM version 10.0.0 (clang-1000.11.45.5)