[triangle-zpug] Installing python/Numeric/ScientificPython

Mark R. Biggers biggers at utsl.com
Tue Mar 27 17:35:16 CEST 2007


Hi Joe,

Bring this question to the TriZPUG meeting, and I am sure someone can
personally assist you in getting this resolved.

In my experience building Python 2.x to a "non-standard" (*not* /usr, or
/usr/local) location, the resulting 'python' will not be clued into where
its shared libraries are installed.  The Python 2.x build does not use
'libtool' (one option).  The main Py Makefile doesn't define gcc-linker
info, neccessary for 'python' to find shared-libs.

Here's the Python-build trick (defn of BLDLIBRARY), but it really does
require at least a base understanding of how gcc/ld finds shared libs...

 # in a "shell-script", or copy+paste to a shell:

 PREFIX=/opt   ## or /home/zzz/usr, or....

 OPTS="-Wall -O2 -march=i686 -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"

 cd Python-2.4.4
 env OPT="$OPTS" ./configure $OPTS_C

 make OPT="$OPTS" BLDLIBRARY="$BLDLIBRARY"

I hope this helps.
----mark

Joseph Mack NA3T writes:
 > 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 and with the 
 > out-of-the-box python install gets the error
 > 
 > zzz at 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
 > 




More information about the TriZPUG mailing list