Hello
I recently got rootpy working, but had issues with root_numpy. I just got a new laptop (OS X) and I’ve been installing everything fresh. I’m not able to run any of the plotting examples, but I’m not quite sure what the problem is.
For example:
rootpy$ python examples/plotting/plot_matplotlib_graph.py
...
Traceback (most recent call last):
File "examples/plotting/plot_matplotlib_graph.py", line 18, in <module>
import rootpy.plotting.root2matplotlib as rplt
File "/Library/Python/2.7/site-packages/rootpy/plotting/root2matplotlib.py", line 5, in <module>
ROOT.kTRUE
File "/Users/cranmer/projects/roostats/root-v5-34/lib/ROOT.py", line 438, in __getattr1
self.__finalSetup()
File "/Library/Python/2.7/site-packages/rootpy/defaults.py", line 129, in wrapFinalSetup
configure_defaults()
File "/Library/Python/2.7/site-packages/rootpy/defaults.py", line 87, in configure_defaults
init()
File "/Library/Python/2.7/site-packages/rootpy/interactive/rootwait.py", line 34, in fetch_vars
_processRootEvents = getattr(ROOT.PyGUIThread, "_Thread__target", None)
File "/Users/cranmer/projects/roostats/root-v5-34/lib/ROOT.py", line 469, in __getattr2
attr = _root.LookupRootEntity( name )
AttributeError: PyGUIThread
when I try to run the import lines of that example directly, I see:
>>> import rootpy.plotting.root2matplotlib as rplt
WARNING:rootpy.interactive.rootwait] unable to access ROOT's GUI thread either because PyROOT's finalSetup() was called while in batch mode or because PyROOT is using the new PyOS_InputHook based mechanism that is not yet supported in rootpy (PyConfig.StartGuiThread == 'inputhook' or gSystem.InheritsFrom('TMacOSXSystem')). wait() etc. will instead call raw_input() and wait for [Enter]
A similar problem:
rootpy$ python
Python 2.7.5 (default, Sep 12 2013, 21:33:34)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import rootpy
>>> rootpy.log.basic_config_colorized()
>>> from rootpy.plotting import F1, Hist, HistStack, Graph, Canvas, set_style
rootpy/compiled.py:8: UserWarning: Module rootpy was already imported from rootpy/__init__.pyc, but /Library/Python/2.7/site-packages is being added to sys.path
import pkg_resources
Details on my configuration
Currenlty I have
rootpy$ python --version
Python 2.7.5
rootpy$ pip -V
pip 1.5.4 from /Library/Python/2.7/site-packages (python 2.7)
rootpy$ which root
/Users/cranmer/projects/roostats/root-v5-34/bin/root
rootpy$ python
Python 2.7.5 (default, Sep 12 2013, 21:33:34)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
>>> import rootpy
>>> import root_numpy
>>> root_numpy.__version__
'3.2.0'
>>> import matplotlib
>>> matplotlib.__version__
‘1.3.1'
Installation issue: When I tried
rootpy$ sudo python setup.py install
ROOT cannot be imported. Is ROOT installed with PyROOT enabled?
I’m not sure what the issue is there since I definitely have pyroot enabled.
So instead I did
sudo pip install rootpy
which installed
rootpy-0.7.1.tar.gz
which seems to be the same as what I have from git.
Thanks
Kyle