# pyRoot on OS X Maverick

**URL:** <https://root-forum.cern.ch/t/pyroot-on-os-x-maverick/16820>\
**Category:** ROOT\
**Created:** [October 29, 2013, 7:32pm UTC](https://root-forum.cern.ch/t/pyroot-on-os-x-maverick/16820 "2013-10-29T19:32:10Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![dougutphy](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/258eb7/32.png) [@dougutphy](https://root-forum.cern.ch/u/dougutphy)\
**Post date:** [November 6, 2013, 8:09pm UTC](https://root-forum.cern.ch/t/pyroot-on-os-x-maverick/16820/21 "2013-11-06T20:09:35Z")

</div>

[quote=“johahe”][quote=“wlav”]  
Even more surprising, when I do:[code]\>\>\> import ROOT

> > > ROOT.gROOT.SetBatch(False)  
> > > c = TCanvas()[/code]  
> > > everything seems to work fine.[/quote]  
> > > Yes, I that works, but try to draw something to that TCanvas

```auto
import ROOT
ROOT.gROOT.SetBatch(False)
c = ROOT.TCanvas()
h = ROOT.TH1F()
h.Draw()
```

I use XQuartz 2.7.5 rc4.[/quote]

This works for me, using the same XQuartz version

---

<div class="post-metadata">

**Author:** ![jvantilb](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/ee7513/32.png) [@jvantilb](https://root-forum.cern.ch/u/jvantilb)\
**Post date:** [November 6, 2013, 8:16pm UTC](https://root-forum.cern.ch/t/pyroot-on-os-x-maverick/16820/22 "2013-11-06T20:16:08Z")

</div>

Just got a patch from Wim. It seems that PyROOT thinks it is working in batch. Therefore no windows are created. The patch is to add at the start of your script, or in a .pythonrc file:  
import ROOT  
ROOT.gROOT.SetBatch(False)  
After that you can do things like  
from ROOT import \*  
TBrowser()  
in your scripts. See [sft.its.cern.ch/jira/browse/ROOT-5673](https://sft.its.cern.ch/jira/browse/ROOT-5673)

---

<div class="post-metadata">

**Author:** ![johahe](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/johahe/32/11563_2.png) [@johahe](https://root-forum.cern.ch/u/johahe)\
**Post date:** [November 8, 2013, 8:01am UTC](https://root-forum.cern.ch/t/pyroot-on-os-x-maverick/16820/23 "2013-11-08T08:01:53Z")

</div>

I figured out a way to solve my issue of root crashing.  
It crashed because I was compiled it in my home directory without specifying etcdir.

---

<div class="post-metadata">

**Author:** ![wlav](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/w/f07891/32.png) [@wlav](https://root-forum.cern.ch/u/wlav)\
**Post date:** [November 8, 2013, 5:37pm UTC](https://root-forum.cern.ch/t/pyroot-on-os-x-maverick/16820/24 "2013-11-08T17:37:18Z")

</div>

Hi,

the issue with batch/non-batch is now fixed as well. Was an ordering problem during initialization. Beats me why it was never an issue before.

Cheers,  
Wim

[Previous page](https://root-forum.cern.ch/t/pyroot-on-os-x-maverick/16820.md?page=1)
