By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,386 Members | 1,676 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,386 IT Pros & Developers. It's quick & easy.

Trouble installing numeric

P: n/a
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.

--
"Don't take life so serious, son - it ain't nohow permanent." -
Porkypine
http://www.cs.hmc.edu/~cweisige
Jul 18 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Chris Weisiger wrote:
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
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
Jul 18 '05 #2

P: n/a
On 1/29/05 11:38 PM, Robert Kern wrote:
Chris Weisiger wrote:
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.
<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?

--
"Don't take life so serious, son - it ain't nohow permanent." -
Porkypine
http://www.cs.hmc.edu/~cweisige
Jul 18 '05 #3

P: n/a
Chris Weisiger wrote:
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
rk***@ucsd.edu

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
Jul 18 '05 #4

P: n/a
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.

Jul 18 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.