# Trouble importing pyROOT on Mac OS X 10.11.1

**URL:** <https://root-forum.cern.ch/t/trouble-importing-pyroot-on-mac-os-x-10-11-1/21000>\
**Category:** ROOT\
**Created:** [April 20, 2016, 3:11am UTC](https://root-forum.cern.ch/t/trouble-importing-pyroot-on-mac-os-x-10-11-1/21000 "2016-04-20T03:11:35Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![edwrdg13](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/4491bb/32.png) [@edwrdg13](https://root-forum.cern.ch/u/edwrdg13)\
**Post date:** [April 20, 2016, 5:42pm UTC](https://root-forum.cern.ch/t/trouble-importing-pyroot-on-mac-os-x-10-11-1/21000/8 "2016-04-20T17:42:19Z")

</div>

Hi,

typing ‘which python’ returns: `dhcp-18-189-16-11:~ edward$ which python
/Library/Frameworks/Python.framework/Versions/2.7/bin/python`

> [@](#):
>
> What you have to do, is check what `which python` gives you, and if that is not the system one (as you seem to want for this setup), then add ‘/Library/Frameworks/Python.framework/Versions/2.7/bin’ to PATH (and ‘/Library/Frameworks/Python.framework/Versions/2.7/lib’ to (DY)LD\_LIBRARY\_PATH.

I’ve attempted to do this. My bash file is now:

[code]# Setting PATH for Python 2.7

# The orginal version is saved in .bash\_profile.pysave

PATH=“/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}”  
export PATH  
export LD\_LIBRARY\_PATH=/Library/Frameworks/Python.framework/Versions/2.7/lib

#ROOT  
export ROOTSYS=/root  
export PATH=$ROOTSYS/bin:$PATH  
export LD\_LIBRARY\_PATH=$ROOTSYS/lib:$LD\_LIBRARY\_PATH

#PYROOT  
export PYTHONDIR=/Library/Frameworks/Python.framework/Versions/2.7/bin/  
export PATH=$ROOTSYS/bin:$PYTHONDIR/bin:$PATH  
export LD\_LIBRARY\_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$LD\_LIBRARY\_PATH  
export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH  
[/code]

Trying to import ROOT still returns the same error: `>>> import ROOT
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6`

Is there anything else that you suggest I do?

Thanks,

Edward

---

_[View the full topic](https://root-forum.cern.ch/t/trouble-importing-pyroot-on-mac-os-x-10-11-1/21000)._
