[Numpy-discussion] Installing python/Numeric/ScientificPython

Joseph Mack NA3T jmack@wm7d....
Wed Mar 28 11:11:05 CDT 2007


Dear List,

 	I'm not a python programmer, but am familiar with 
installing programs on Linux. I'm installing some python 
packages for a user.

 	The app calls Numeric/ScientificPython. I have a 
separate install in ~ so as not to overwrite the 
standard install while I'm getting it working. The app 
calls my local python.

zzz@amber:~/src/py_proj> head -1 ncf_info.py
#!/home/zzz/usr/bin/python

 	The architecture is ia64, Altix, 2.6.16, gcc-3.4.6.

 	With the out-of-the-box (standard options in 
../configure) python install, I get the error

zzz@amber:~/src/py_proj> ./ncf_info.py area/01.ncf
Traceback (most recent call last):
   File "./ncf_info.py", line 2, in ?
     from Numeric import *
   File "/home/zzz/usr//lib/python2.4/site-packages/Numeric/Numeric.py", line 91, in ?
     import multiarray
ImportError: /home/zzz/usr/lib/python2.4/site-packages/Numeric/multiarray.so: undefined symbol: _Py_RefTotal

I assume then that all the libraries have been found, but 
there is an undefined variable. I can't find *Py_RefTotal* 
anywhere in Numeric or in the app, so I can't find where its 
being called from (to turn it off if possible). However the 
Python build has several defines, including -DPy_REF_DEBUG 
and -DPy_TRACE_REFS (Misc/SpecialBuilds.txt). I can't find 
anyway of turning these on with ./configure, so have 
manually added the $DEFS to the Makefile. Now I don't get 
the error anymore but I get a long list of alloc/free 
debugging with the application run.

 	I asked the local zpug people for advise and got the 
following build script

zzz@amber:~/src/Python-2.4.4/objdir> more build.sh
#!/bin/bash

PREFIX=/home/zzz/usr/
OPTS="-Wall -O2 -D_GNU_SOURCE -fPIC"
OPTS_C="--with-threads --with-pymalloc --prefix=$PREFIX --enable-shared --enable-unicode=ucs4"
BLDLIBRARY="-Xlinker -rpath -Xlinker $PREFIX/lib -L. -lpython2.4"
env OPT="$OPTS" ../configure $OPTS_C
make OPT="$OPTS" BLDLIBRARY="$BLDLIBRARY"



This doesn't seem very different to the setup I had with 
the standard configure, and it gives the same undefined 
symbol error.

I don't know that the app needs to know the the RefTotal, so 
I'd be happy to have it switched off.

Alternately I don't understand the various defines in 
SpecialBuilds.txt and how they interact. Can I define 
_Py_RefTotal without getting the debugging output?

Thanks Joe

-- 
Joseph Mack NA3T EME(B,D), FM05lw North Carolina
jmack (at) wm7d (dot) net - azimuthal equidistant map
generator at http://www.wm7d.net/azproj.shtml
Homepage http://www.austintek.com/ It's GNU/Linux!


More information about the Numpy-discussion mailing list