# Trouble importing pyroot in OSX 10.9

**URL:** <https://root-forum.cern.ch/t/trouble-importing-pyroot-in-osx-10-9/19596>\
**Category:** ROOT\
**Created:** [July 23, 2015, 10:08pm UTC](https://root-forum.cern.ch/t/trouble-importing-pyroot-in-osx-10-9/19596 "2015-07-23T22:08:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ExtremeMango](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/58f4c7/32.png) [@ExtremeMango](https://root-forum.cern.ch/u/ExtremeMango)\
**Post date:** [July 23, 2015, 10:08pm UTC](https://root-forum.cern.ch/t/trouble-importing-pyroot-in-osx-10-9/19596/1 "2015-07-23T22:08:05Z")

</div>

So I found a post that is very similar in here.

> [@Trouble importing pyROOT on OSX 10.9 Mavericks](https://root-forum.cern.ch/t/trouble-importing-pyroot-on-osx-10-9-mavericks/17287/1):
>
> Hi everyone! I’ve followed the thread laid out here: [[root.cern.ch/phpBB3/viewtopic.p](http://root.cern.ch/phpBB3/viewtopic.p) … 9ae8a01de1]([pyRoot on OS X Maverick](https://root-forum.cern.ch/t/pyroot-on-os-x-maverick/16820/1) and ROOT appears to work just fine - I’ve tried out the $ROOTSYS/tutorials and all of them appear to be working. This is my setup: ROOT 5.34/14 (v5-34-14@v5-34-14, Dec 16 2013, 12:23:58 on macosx64) However, when trying to run pyroot, i.e. import ROOT in a python session, python dies right away: Python 2.7.6 |Anaconda 1.9.0 (x86\_64)| (default, Jan 10 2014, 11:23:15) …

My error message :

> > > import ROOT  
> > > Fatal Python error: PyThreadState\_Get: no current thread  
> > > Abort trap: 6

I believe my problem is exactly the same too. The default python i use is not the same as the python that root tries to grab when I configure root.(root goes into /usr/local/Frameworks/Python.framework/Versions/2.7/Python when my default python is /opt/local/bin/python)  
I wonder if there a way for me to specify the python when I configure root? Sorry if this is a silly question. A total Beginner here.  
I have tried 😊 ./configure --with-python=/opt/local/bin/python, but it gives me  
Invalid option ‘–with-python=/opt/local/bin/python’.

I checked out the second comment in the post, but that library that the person switched out doesn’t exist in my case, the problem seems to be rather that the wrong python is used to install root.

dhcp-v015-178:/ yvonne$ otool -L /usr/local/Cellar/root/5.34.26/lib/root/libPyROOT.so  
/usr/local/Cellar/root/5.34.26/lib/root/libPyROOT.so:  
/usr/local/lib/root/libPyROOT.so (compatibility version 0.0.0, current version 0.0.0)  
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)  
/usr/local/Cellar/root/5.34.26/lib/root/libCore.so (compatibility version 0.0.0, current version 0.0.0)  
/usr/local/Cellar/root/5.34.26/lib/root/libCint.so (compatibility version 0.0.0, current version 0.0.0)  
/usr/local/Cellar/root/5.34.26/lib/root/libRIO.so (compatibility version 0.0.0, current version 0.0.0)  
/usr/local/Cellar/root/5.34.26/lib/root/libTree.so (compatibility version 0.0.0, current version 0.0.0)  
/usr/local/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)  
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)  
dhcp-v015-178:/ yvonne$ which python

Anyways, any help would be appreciated. If you can point me towards some other posts I would be really grateful too.

---

<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:** [July 28, 2015, 6:27pm UTC](https://root-forum.cern.ch/t/trouble-importing-pyroot-in-osx-10-9/19596/2 "2015-07-28T18:27:22Z")

</div>

Use --with-python-incdir, --with-python-libdir to point to your local python and make sure it’s the first in PATH when configuring. Alternatively, ROOT is installable through portage, since you’re using that already anyway.
