Installation problem using build-gnuradio script


I’m trying to install and gnuradio for the first time. I’ve read the
instructions on the InstallingGR page of the and opted to
use the build-gnuradio script. I’m using Ubuntu 12.10 64 bit.

The script ran with no errors. However, when I try to run
gnuradio-companion I get an error “dynamic module does not define init
function” - “cannot import gnuradio”.

I’ve found references to similar problems on the internet but have not
been able to solve the problem in my case.

I think my PYTHONPATH is setup correctly and points to the correct

$ cat ~/.bashrc | grep PYTHONPATH
export PYTHONPATH=/usr/loca/lib/python2.7/dist-packages

$ ls /usr/local/lib/python2.7/dist-packages/
baz gnuradio grc_gnuradio gruel osmosdr

While I have other versions of python installed, running python from
bash finds 2.7.3:

$ python -V
Python 2.7.3

The problem appears to be with importing “gr”:

$ python2 -c “from gnuradio import gr”
Traceback (most recent call last):
File “”, line 1, in
File “/usr/local/lib/python2.7/dist-packages/gnuradio/gr/”,
line 27, in
from gnuradio_core import *
line 23, in
from gnuradio_core_runtime import *
line 26, in
_gnuradio_core_runtime = swig_import_helper()
line 22, in swig_import_helper
_mod = imp.load_module(‘_gnuradio_core_runtime’, fp, pathname,

ImportError: dynamic module does not define init function

I’m a python novice and I don’t know what to try next - any advice would
be much appreciated.