Installing new modules


I am trying to install new modules into my gnu radio tree. I have MAC
OSX 10.5.5 but on a G4 PPC. Following instructions online that use
MacPorts, I have been able to successfully run built-in scripts and
verify that all required components of GNU radio are working. However,
when compiling and running the example gr-how-to… I ran into some
interesting problems. First, looking at the output of the make install
I see that the module gets installed in the /opt/local/Library/
gnuradio directory. When I try to run the simple script
it fails saying that module howto is no found. Looking at

bash-3.2$ echo $PYTHONPATH

I can solve the problem by moving the installed components under the /
Frameworks/Python.framework/ tree to /usr/local/lib/python2.6/site-
packages/, but that is a hacked up method that whenever I write my
code or change it, I have to worry about copying before I am sure that
the new module is what is going to be used.

So I edited, what I think is the appropriate portion of my ./bashrc
file as follows

export PYTHON_VERSION=python -V 2>&1 | sed -e '[email protected]\[email protected] @2' | awk '{ print $2 }'
export PYTHON_ROOT=which python | sed -e '[email protected]/bin/[email protected]@g'
export PYTHONPATH=${PYTHON_ROOT}/lib/python${PYTHON_VERSION}/site-
if [ ${PYTHON_ROOT} != “/usr/include” ]; then
export PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python$
export PYTHONPATH=${PYTHONPATH}:/opt/local/Library/Frameworks/
Python.framework/Versions/2.6/lib/python2.6/site-packages <— added
by me.

However, even this doesnt help if I do a new make install (and now the
$PYTHONPATH includes the directory with the installed files).

So I searched on the gnu radio mailing list, and it appears it has
something to do with multiple versions of python installed. I know
that I had previous installed python and so when I do a which python

bash-3.2$ which python

and my $PATH variable is not pointing to where the Macport has
installed python2.6.

echo $PATH

What do I have to change (in the configure files or at a larger scale
on my system) to make sure my make install puts the new module in the
same place the GNU radio is looking at?

Thank you.


Hi Affan - Glad to hear you’re up and running, and using PPC and
10.5. If you’re planning on using a USRP, I hope you have a USB 2.0
adapter … those older PPC Macs didn’t do USB 2.0 very well.

Hmm … that’s all quite strange; by default how-to is installed into /
usr/local , with the python stuff being in /usr/local/lib/
python{version}/site-packages , and {version} being 2.5 or 2.6 or
whatever. Unless you specifically told configure to install in a
strange location (e.g, via ‘configure --prefix={somewhere}’), then the
only way how-to could be installed elsewhere is via symlink(s).

Can you reply with the following (off list, for now; we can summarize
if it’s important):

  • What is the command you used to configure the how-to module?

  • Can you return the full output of ‘make -n install’ from the how-to.

  • Can you run the following and return their outputs?

    ls -ld /usr/local
    ls -ld /usr/local/lib
    ls -ld /usr/local/lib/python2.6
    ls -ld /usr/local/lib/python2.6/site-packages
    ls -l which python

  • MLD

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs