# Import ROOT error

**URL:** <https://root-forum.cern.ch/t/import-root-error/14636>\
**Category:** ROOT\
**Created:** [July 25, 2012, 2:15pm UTC](https://root-forum.cern.ch/t/import-root-error/14636 "2012-07-25T14:15:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmccartin](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/ad7895/32.png) [@jmccartin](https://root-forum.cern.ch/u/jmccartin)\
**Post date:** [July 25, 2012, 2:15pm UTC](https://root-forum.cern.ch/t/import-root-error/14636/1 "2012-07-25T14:15:56Z")

</div>

Hi,

I’m getting a ImportError: No module named ROOT message when I try and run pyROOT, which is also happening in the python interactive mode. I’ve seen many a topic on this, but none of the solutions helped me with my problem. Here are my paths as defined in my bashrc:

export ROOTSYS=/opt/root  
export LD\_LIBRARY\_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$LD\_LIBRARY\_PATH  
export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH  
export PATH=${PATH}:${ROOTSYS}/bin

I’m running ROOT 5.34/01, Python 2.7.2+, GCC 4.6.1 on Linux Mint/Ubuntu.

I’ve also tried to source $ROOTSYS/bin/thisroot.sh, without any luck. Does anyone have any suggestions on what I might do next to diagnose my problem?

---

<div class="post-metadata">

**Author:** ![Pepe\_Le\_Pew](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/pepe_le_pew/32/12365_2.png) [@Pepe\_Le\_Pew](https://root-forum.cern.ch/u/Pepe_Le_Pew)\
**Post date:** [July 25, 2012, 2:34pm UTC](https://root-forum.cern.ch/t/import-root-error/14636/2 "2012-07-25T14:34:26Z")

</div>

You can test an existing ROOT installation if it provides python bindings. Try “root-config --features” and see if the output contains “python”, or try “root-config --has-python” and see if you get “yes”.  
If your current ROOT installation does not provide python bindings, you need to rebuild it from scratch, configuring it with “–enable-python” (note: “binary” and “development” packages of python \>= 2.2 required). After the “configure” step, make sure that the “config.log” file contains “Result: Enabled support for … python, …” somewhere near its end.

---

<div class="post-metadata">

**Author:** ![jmccartin](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/ad7895/32.png) [@jmccartin](https://root-forum.cern.ch/u/jmccartin)\
**Post date:** [July 25, 2012, 4:08pm UTC](https://root-forum.cern.ch/t/import-root-error/14636/3 "2012-07-25T16:08:10Z")

</div>

[quote=“Pepe Le Pew”]You can test an existing ROOT installation if it provides python bindings. Try “root-config --features” and see if the output contains “python”, or try “root-config --has-python” and see if you get “yes”.  
If your current ROOT installation does not provide python bindings, you need to rebuild it from scratch, configuring it with “–enable-python” (note: “binary” and “development” packages of python \>= 2.2 required). After the “configure” step, make sure that the “config.log” file contains “Result: Enabled support for … python, …” somewhere near its end.[/quote]

Thanks, I noticed that python bindings were not enabled, even though they were enabled by default at the configure time. Python-dev was not installed, so the configure must have skipped this step (I got no warning or error however!). Everything appears to be working now though.
