Hi,
I’m trying to install and gnuradio for the first time. I’ve read the
instructions on the InstallingGR page of the gnuradio.org 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
folder:
$ 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/init.py”,
line 27, in
from gnuradio_core import *
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/gr/gnuradio_core.py”,
line 23, in
from gnuradio_core_runtime import *
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/gr/gnuradio_core_runtime.py”,
line 26, in
_gnuradio_core_runtime = swig_import_helper()
File
“/usr/local/lib/python2.7/dist-packages/gnuradio/gr/gnuradio_core_runtime.py”,
line 22, in swig_import_helper
_mod = imp.load_module(‘_gnuradio_core_runtime’, fp, pathname,
description)
ImportError: dynamic module does not define init function
(init_gnuradio_core_runtime)
I’m a python novice and I don’t know what to try next - any advice would
be much appreciated.
Thanks,
Gareth