Trouble installing numeric

C

Chris Weisiger

I'm trying to install numeric on my MacOS X box using Darwin, with the
eventual goal of satisfying all of PyGame's dependencies so I can
finally start working on my semester project. I would be using MacPython,
except that I can't seem to get its Package Manager to work. Anyway,
when I try to install numeric, I get the following error:

[HMC-58-125:~/proj/Numeric-23.7] chriswei% sudo ./setup.py install
Password:
running install
running build
running build_py
running build_ext
building 'lapack_lite' extension
gcc -Wl,-F. -Wl,-F. -bundle -framework Python build/temp.darwin-7.6.0-
Power_Macintosh-2.3/Src/lapack_litemodule.o build/temp.darwin-7.6.0-
Power_Macintosh-2.3/Src/blas_lite.o build/temp.darwin-7.6.0-Power_
Macintosh-2.3/Src/f2c_lite.o build/temp.darwin-7.6.0-Power_Macintosh-2.3/
Src/zlapack_lite.o build/temp.darwin-7.6.0-Power_Macintosh-2.3/Src/
dlapack_lite.o -L/usr/lib/atlas -llapack -lcblas -lf77blas -latlas -lg2c -
o build/lib.darwin-7.6.0-Power_Macintosh-2.3/lapack_lite.so -framework
vecLib
ld: can't locate file for: -llapack
error: command 'gcc' failed with exit status 1

Previously it had been complaining about a missing directory '/usr/lib/
atlas', but I just created that (without any idea what it wanted it for
or why it couldn't create it itself, natch). From what I've found online,
it's now having problems because a linear algebra module it needs (
lapack) can't be found. However, isn't numeric supposed to have its own
"light" linear algebra code? Looking in setup.py, I found the following
section:

# delete all but the first one in this list if using your own LAPACK/
BLAS
sourcelist = [os.path.join('Src', 'lapack_litemodule.c'),
# os.path.join('Src', 'blas_lite.c'),
# os.path.join('Src', 'f2c_lite.c'),
# os.path.join('Src', 'zlapack_lite.c'),
# os.path.join('Src', 'dlapack_lite.c')
] ]

I tried uncommenting the lines, but no dice.

I've also installed the numarray module; it claims to be a descendant of
numeric that should be usable for the same thing. If it turns out that I
can't use numeric, for whatever reason, does anyone have advice for
getting numarray to work with pygame?

Thanks for any help you can provide. If I can't get this working soon,
I'll have to return to using C++ for this project. I know that at least
works.
 
R

Robert Kern

Chris said:
I'm trying to install numeric on my MacOS X box using Darwin, with the
eventual goal of satisfying all of PyGame's dependencies so I can
finally start working on my semester project. I would be using MacPython,
except that I can't seem to get its Package Manager to work. Anyway,
when I try to install numeric, I get the following error:

[HMC-58-125:~/proj/Numeric-23.7] chriswei% sudo ./setup.py install
Password:
running install
running build
running build_py
running build_ext
building 'lapack_lite' extension
gcc -Wl,-F. -Wl,-F. -bundle -framework Python build/temp.darwin-7.6.0-
Power_Macintosh-2.3/Src/lapack_litemodule.o build/temp.darwin-7.6.0-
Power_Macintosh-2.3/Src/blas_lite.o build/temp.darwin-7.6.0-Power_
Macintosh-2.3/Src/f2c_lite.o build/temp.darwin-7.6.0-Power_Macintosh-2.3/
Src/zlapack_lite.o build/temp.darwin-7.6.0-Power_Macintosh-2.3/Src/
dlapack_lite.o -L/usr/lib/atlas -llapack -lcblas -lf77blas -latlas -lg2c -
o build/lib.darwin-7.6.0-Power_Macintosh-2.3/lapack_lite.so -framework
vecLib
ld: can't locate file for: -llapack
error: command 'gcc' failed with exit status 1

Previously it had been complaining about a missing directory '/usr/lib/
atlas', but I just created that (without any idea what it wanted it for
or why it couldn't create it itself, natch).

You can delete it. That is the directory specified by default to look
for the ATLAS libraries which are a portable optimized LAPACK and BLAS.
You don't need it on the Mac because you have vecLib, which is an
Apple-provided version of ATLAS, pre-installed.
From what I've found online,
it's now having problems because a linear algebra module it needs (
lapack) can't be found. However, isn't numeric supposed to have its own
"light" linear algebra code?

Yes, however, the ATLAS or vecLib libraries will be much, much faster.
Looking in setup.py, I found the following
section:

# delete all but the first one in this list if using your own LAPACK/
BLAS
sourcelist = [os.path.join('Src', 'lapack_litemodule.c'),
# os.path.join('Src', 'blas_lite.c'),
# os.path.join('Src', 'f2c_lite.c'),
# os.path.join('Src', 'zlapack_lite.c'),
# os.path.join('Src', 'dlapack_lite.c')
] ]

I tried uncommenting the lines, but no dice.

Also modify the library_dirs_list and libraries_list variables, but keep
these *_lite.c files commented out.

library_dirs_list = []
libraries_list = []

That way, Numeric will just pick up vecLib.

This is fixed in CVS.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
C

Chris Weisiger

<snip>
This is fixed in CVS.

Thanks; I've now successfully installed Numeric, as well as all of the
other dependencies listed for PyGame. However, PyGame appears to still
not be working. When I try to run the program at the top of this page:
http://www.pygame.org/docs/tut/tom/games2.html
I get the following error:

% python main.py
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort

Is this a problem with PyGame or with something else? I can run a simple
Hello World program, so I'm assuming that Python itself is fine. Any
ideas?
 
R

Robert Kern

Chris said:
Thanks; I've now successfully installed Numeric, as well as all of the
other dependencies listed for PyGame. However, PyGame appears to still
not be working. When I try to run the program at the top of this page:
http://www.pygame.org/docs/tut/tom/games2.html
I get the following error:

% python main.py
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort

A couple things:

* Are you sure you are using the same python executable that you
compiled the extension modules against?

* If you aren't using the X11 versions of SDL et al., then you need to
run your scripts with pythonw, which will run the framework's
interpreter in such a way that it can communicate with the native window
server. This shouldn't give you the error above, though.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
K

Kamilche

Are you using Python 2.3? Pygame doesn't work with 2.4, unfortunately.
It's the reason I removed 2.4 from my machine. I'll upgrade once PyGame
upgrades.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top