Question about Python on Mac

E

elventear

Hello,

I am working with Python 2.4.3 built from source courtesy of Fink. So
far so good, until now. I want to use a module called GMPY
(http://gmpy.sf.net/). I am able to build correctly the module, but
once I try to import it I get the following error:

ImportError: Failure linking new module: gmpy.so: Symbol not found:
___gmpn_sub_nc
Referenced from: /sw/lib/libgmp.3.dylib
Expected in: dynamic lookup

The weird thing is that just for kicks I tried building with Python
that comes with MacOSX (py2.3) and it works. It builds and it loads
fine. Anybody have an idea why this would happen? Any ideas how to
solve this? In the worse case scenario, can I use the binary (gmpy.so)
built with against Python 2.3 with Python 2.4.3 (It seems to load
correctly but I don't know if I should expect any meltdowns later on)

I would appreciate any suggestions.

Thanks.
 
E

elventear

The weird thing is that just for kicks I tried building with Python
that comes with MacOSX (py2.3) and it works. It builds and it loads
fine. Anybody have an idea why this would happen? Any ideas how to
solve this? In the worse case scenario, can I use the binary (gmpy.so)
built with against Python 2.3 with Python 2.4.3 (It seems to load
correctly but I don't know if I should expect any meltdowns later on)

First of all I have to correct myself and say that the latest version
offered in Fink is 2.4.2. I decided to try with binary build of
MacPython 2.4.3 available on Python.org and it also works. Weird.

Could this be related to some bug in Python 2.4.2?

Thanks.
 
J

James Stroud

elventear said:
Hello,

I am working with Python 2.4.3 built from source courtesy of Fink. So
far so good, until now. I want to use a module called GMPY
(http://gmpy.sf.net/). I am able to build correctly the module, but
once I try to import it I get the following error:

ImportError: Failure linking new module: gmpy.so: Symbol not found:
___gmpn_sub_nc
Referenced from: /sw/lib/libgmp.3.dylib
Expected in: dynamic lookup

The weird thing is that just for kicks I tried building with Python
that comes with MacOSX (py2.3) and it works. It builds and it loads
fine. Anybody have an idea why this would happen? Any ideas how to
solve this? In the worse case scenario, can I use the binary (gmpy.so)
built with against Python 2.3 with Python 2.4.3 (It seems to load
correctly but I don't know if I should expect any meltdowns later on)

I would appreciate any suggestions.

Thanks.
I think fink is not detecting the gmp (GNU multiple precision arithmetic
library) dependency.

Try:

% fink install gmp

Then try building gmpy with /sw/bin/python.

James

--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095

http://www.jamesstroud.com/
 
E

elventear

James said:
I think fink is not detecting the gmp (GNU multiple precision arithmetic
library) dependency.

Try:

% fink install gmp

Then try building gmpy with /sw/bin/python.

I think I didn't explain myself very well. gmp is already installed in
my computer; when building gmpy it links against libgmp without
problems. But when doing import gmpy is that Fink's Python complains
like I've mentioned before.

But if I build gmpy (Using setup.py), using Python 2.4.3 works fine.

Pepe
 

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,780
Messages
2,569,608
Members
45,250
Latest member
Charlesreero

Latest Threads

Top