# Python ./top\_block.py error

**URL:** <https://www.ruby-forum.com/t/python-top-block-py-error/232767>\
**Category:** GNU Radio\
**Created:** [October 27, 2014, 9:51am UTC](https://www.ruby-forum.com/t/python-top-block-py-error/232767 "2014-10-27T09:51:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [October 27, 2014, 9:51am UTC](https://www.ruby-forum.com/t/python-top-block-py-error/232767/1 "2014-10-27T09:51:46Z")

</div>

Hi, I get this error when trying to run python ./top\_block.py

python ./top\_block.py  
Traceback (most recent call last):  
File “./top\_block.py”, line 8, in   
from gnuradio import analog  
ImportError: No module named gnuradio

Do I have to run the python code from a specific dorectory? or set  
variables to gnuradio? or is this another error?

I’m running gnuradio on macports osx 10.10
