ROOTpy绘图示例不起作用

时间:2015-09-18 11:08:45

标签: python root-framework pyroot rootpy

我试图运行关于如何通过rootpy documentation的matplotlib绘制ROOT直方图的示例。

这导致了一个相当模糊的错误:

import rootpy.plotting.root2matplotlib as rplt
  File "/Users/pigard/ROOT/install/lib/ROOT.py", line 301, in _importhook
return _orig_ihook( name, *args, **kwds )
  File "/usr/local/lib/python2.7/site-packages/rootpy/plotting/__init__.py", line 12, in <module>
from .hist import Hist, Hist1D, Hist2D, Hist3D, Efficiency, HistStack, histogram
  File "/Users/pigard/ROOT/install/lib/ROOT.py", line 301, in _importhook
return _orig_ihook( name, *args, **kwds )
  File "/usr/local/lib/python2.7/site-packages/rootpy/plotting/hist.py", line 2251, in <module>
snake_case_methods(cls)
  File "/usr/local/lib/python2.7/site-packages/rootpy/decorators.py", line 143, in snake_case_methods
members = inspect.getmembers(root_base)
  File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/inspect.py", line 253, in getmembers
value = getattr(object, key)
SystemError: error return without exception set

我使用ROOT6在OS X 10.10上运行。对我来说似乎有点奇怪的一件事是在堆栈跟踪的最后一行引用/usr/local/Cellar/,而前面的行引用/usr/local/lib/

但是,我没有遇到运行pyROOT的任何其他问题,所以它看起来不像是一个错误的库问题。

1 个答案:

答案 0 :(得分:1)

尝试使用较新的ROOT6标签。我遇到了同样的问题并向ROOT开发人员报告并修复了它:

https://sft.its.cern.ch/jira/browse/ROOT-7336