On Sep 30, 2008, at 11:50 AM, Thomas S. wrote:
I tried to install GNU Radio on 10.5.5, but it didn’t work. Shortly
after the install, I had a HD crash, and thus have to start from
scratch at some point. I can write down what I am doing for others, if
that would be helpful?
Can’t hurt; I’m always in favor of other OSX users providing input as
to how well GR / USRP is working for them, or that functionality broke
on the latest system update, or whatever. We’re testing GR / USRPs in
our labs on both PPC and Intel Macs, running 10.4 and 10.5, and it
really seems as though updating to 10.5.5 causes fusb to work
intermittently. Bad Apple …
One question that I remember I had during the install: Which python
should I use? While installing some of the port packages, port
automatically installed an additional python, and thus I had two
pythons, both 2.5, installed, and I think that this was one of the
conflicts that I had at the end. Since Mac OS X already comes with
2.5, I think port should not reinstall one, though how can I force
port to do so?
Here’s -much- more info than you asked for on how Python works on
OSX …
Mac OS X 10.4 comes with Python 2.3. 10.5 comes with 2.5. MacPorts
(and Fink) provide the latest 2.5.X release, which Apple generally
doesn’t even with system updates. I know from discussions with
MacPorts developers that they try to stay away from Apple’s pre-
installed packages as much as possible, relying on them only when
there is no other choice. Since Python can reasonably easily be
compiled / installed on OSX, with or without Framework, MacPorts makes
all Python packages dependent on their own version of Python (I tried
to convince them that it would be desirable to have a “+apple”
variable to use Apple’s provided Python, but none of the MP developers
liked that idea). MacPorts also includes a package called
“python_select” which allows choosing which version to use (Apple’s,
Fink’s, MacPort’s, self-installed, whatever).
Having multiple versions of Python installed is OK, so long as the
environment PATH and PYTHONPATH are set correctly to point to the same
Python version scripts. For example, if the first Python in the PATH
is 2.3, and the PYTHONPATH includes directories for 2.5, then that
will be a problem. I include in my ~/.bash_login file something like:
+++++++++
export PYTHON_VERSION=python -V 2>&1 | sed -e 's@\.@ @2' | awk '{ print $2 }'
export PYTHON_ROOT=which python | sed -e 's@/bin/python@@g'
PYTHONPATH=${PYTHON_ROOT}/lib/python${PYTHON_VERSION}/site-packages
for GNU Radio default prefix;
change “/usr/local” to reflect the correct configure prefix
if [ ${PYTHON_ROOT} != “/usr/local” ]; then
PYTHONPATH=${PYTHONPATH}:/usr/local/lib/python${PYTHON_VERSION}/
site-packages
fi
export PYTHONPATH
+++++++++
which, of course, depends on the installed version of Python not
changing … else one would need to “source ~/.bash_login” to get
these environment variables updated. IIRC, for non-Framework installs
of Python, the default (intrinsic) PYTHONPATH includes ‘${PYTHON_ROOT}/
lib/python${PYTHON_VERSION}/site-packages’. For the Framework version
on OSX, this is NOT included by default because the Python binary
“knows” about the Framework install location and looks there instead.
Hence this particular part of the PYTHONPATH must be included on OSX.
I submitted a quick and simple patch to MacPorts for the default
Python configure script that added this path, but it was rejected.
Instead, they decided to link the ‘site-packages’ directories from the
Framework to the one above.
Hope that’s clearer than mud. - MLD