# PyROOT import error on MacOS X (5.15/02)

**URL:** <https://root-forum.cern.ch/t/pyroot-import-error-on-macos-x-5-15-02/4453>\
**Category:** ROOT\
**Created:** [February 23, 2007, 10:09am UTC](https://root-forum.cern.ch/t/pyroot-import-error-on-macos-x-5-15-02/4453 "2007-02-23T10:09:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![exaos](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/e/91b2a8/32.png) [@exaos](https://root-forum.cern.ch/u/exaos)\
**Post date:** [February 23, 2007, 10:09am UTC](https://root-forum.cern.ch/t/pyroot-import-error-on-macos-x-5-15-02/4453/1 "2007-02-23T10:09:51Z")

</div>

I downloaded the tar package (MacOS X PPC 10.4.8 and gcc 4.0.1, version 5.15/02) from  
[root.cern.ch/root/Version515.html](http://root.cern.ch/root/Version515.html)

After setting up the environment, I got the following error:

[code]exaos\>$ python  
Python 2.4.4 (#2, Nov 8 2006, 09:50:09)  
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin  
Type “help”, “copyright”, “credits” or “license” for more information.

> > > import ROOT  
> > > Traceback (most recent call last):  
> > > File “”, line 1, in ?  
> > > File “/Users/exaos/Opt/root/current/lib/ROOT.py”, line 83, in ?  
> > > import libPyROOT as \_root  
> > > ImportError: dlopen(/Users/exaos/Opt/root/current/lib/libPyROOT.so, 2): Library not loaded: …/libpython2.4.dylib  
> > > Referenced from: /Users/exaos/Opt/root/current/lib/libPyROOT.so  
> > > Reason: image not found  
> > > [/code]

What’s the matter? I hope there are some description for MacOS X platform (PPC).

---

<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:** [February 27, 2007, 12:12am UTC](https://root-forum.cern.ch/t/pyroot-import-error-on-macos-x-5-15-02/4453/2 "2007-02-27T00:12:25Z")

</div>

Hi,

[quote] 2): Library not loaded: …/libpython2.4.dylib  
Referenced from: /Users/exaos/Opt/root/current/lib/libPyROOT.so  
Reason: image not found[/quote]  
the library “…/libpython2.4.dylib” is not found from the current path. Apparently, [libPyROOT.so](http://libPyROOT.so) was linked with that relative path (see "otool -L $ROOTSYS/lib/libPyROOT.so). Did you supply this to “configure”? If so, could you reconfigure with an absolute path to the python installation, and rebuild?

Cheers,  
Wim
