[Pythonmac-SIG] Installing numpy on mach-o python

Marcelinus Prastawa prastawa@cs.unc.edu
Wed, 2 Jan 2002 16:21:23 -0500


You could shift some of the blame to Apple on this one. :)
This happened to someone else before...

Starting from 10.1 Mac OS X has two different namespace settings: flat and 
two-level. Unfortunately, I think that Python 2.1 is not set to handle 
this properly by default...

Possible solutions:

Get Python 2.2 -- and if you ever need to deal with small matrices, I 
recommend Numeric 20.3 (there are bug fixes too).

Modify /usr/local/lib/python2.1/config/Makefile so that the variables 
LDSHARED and BLDSHARED are set to:
$(CC) $(LDFLAGS) -bundle -undefined error -bundle_loader 
/usr/local/bin/python2.1
(this will give you two-level namespace extensions)
or
$(CC) $(LDFLAGS) -flat_namespace -bundle -undefined suppress
(this will give you flat namespace extensions)
You may need to change /usr/local to the location of your Python 
installation. If you are going to write your own extensions to Numeric, 
you probably want to build it as a two-level namespace extension. 
Otherwise you could get name clashes...

Marcel

On Wednesday, January 2, 2002, at 03:48 , Chris Lee wrote:

>
> Numeric version 20.0
> Python version 2.1
>
> running setup_all.py install results in error messages like...
>
> cc -bundle -undefined suppress build/temp.darwin-1.4-Power Macintosh-2.1/
> _numpymodule.o build/temp.darwin-1.4-Power Macintosh-2.1/arrayobject.o 
> build/temp.darwin-1.4-Power Macintosh-2.1/ufuncobject.o -o 
> build/lib.darwin-1.4-Power Macintosh-2.1/_numpy.so
> /usr/bin/ld: -undefined error must be used when -twolevel_namespace is in 
> effect
> error: command 'cc' failed with exit status 1
>
> and numerous skip messages like...
>
> skipping Src/arrayobject.c (build/temp.darwin-1.4-Power 
> Macintosh-2.1/arrayobject.o up-to-date)
>
>
> I think the main problem is that I know enough about unix to be dangerous 
> and not to usefull
>
> cheers
> chris