scikit-hep / root_pandas

A Python module for conveniently loading/saving ROOT files as pandas DataFrames
MIT License
109 stars 35 forks source link

ROOT 6.12 #53

Closed ftoralesacosta closed 6 years ago

ftoralesacosta commented 6 years ago

I am having trouble running this on root 6.12. When attempting to import root_pandas I get the following error

ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/root_numpy-4.7.3-py2.7-macosx-10.13-x86_64.egg/root_numpy/_librootnumpy.so, 2): Library not loaded: /opt/local/libexec/root6/lib/root/libCore.6.10.so Referenced from: /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/root_numpy-4.7.3-py2.7-macosx-10.13-x86_64.egg/root_numpy/_librootnumpy.so Reason: image not found

Since I am on 6.12 I instead have a libCor.6.12.so file, but am not sure how to fix this.

chrisburr commented 6 years ago

I think this is actually an issue with root_numpy. Does python -c "import root_numpy" give the same error?

Assuming this is the case:

  1. How did you install ROOT and root_numpy/root_pandas?
  2. What is the output of which python (replace python if you use a different command)?
  3. If you're using pip, try reinstalling with the --no-binary option to force root_numpy to be compiled. You can do this using something like:
python -m pip uninstall root_numpy root_pandas
python -m pip install --user --no-binary root_numpy root_pandas
ftoralesacosta commented 6 years ago

Thanks for the feedback, you're right, its something related to my root_numpy install.

I installed ROOT with macports and installed root_numpy with pip.

Which python results in 2.7:

opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python

After uninstalling both, and attempting to install root_numpy with --no-binary, I run into:

fatal error: 'VecCore/VecCore' /root/Math/Types.h:22:10: fatal error: 'VecCore/VecCore' file not found

include <VecCore/VecCore>

This is obviously unrelated to root_pandas, however. Thanks very much for the help

chrisburr commented 6 years ago

I haven't used macports and I tend not to use root on macOS but perhaps running this_root.sh first will help:

source $(dirname $(which root))/this_root.sh
python -m pip uninstall root_numpy root_pandas
python -m pip install --user --no-binary root_numpy root_pandas

(I'm closing as this but if you find a solution please report back incase anyone finds this issue in the future.)

ftoralesacosta commented 6 years ago

Hi,

So I solved the problem by uninstalling root with macports, and then installing it from the root git repository. I then installed root_numpy and root_pandas as @chrisburr described and everything works now.

Thanks again for the help.