473,394 Members | 1,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Question about Python on Mac

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.

May 19 '06 #1
3 1137
On 2006-05-19 16:19:51 -0500, "elventear" <el*******@gmail.com> said:
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.

May 20 '06 #2
elventear wrote:
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/
May 21 '06 #3
James Stroud wrote:
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

May 21 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Anon | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello all I am a beginner teaching myself python, and I am enjoying it immensely :) As a language it is great, I real treat to study, I actually...
4
by: Jeffrey Borkent | last post by:
Hi There, I have an open source program which i am trying to add to. class classname(member,member) def __init__(self,list) self.__list = list self.refresh = 360
0
by: bwaha | last post by:
I've posted this question to comp.graphics.apps.gnuplot too but given that this python group may also comprise a lot of gnuplot users, and is far more active, I've posted this question here too. My...
65
by: Steven Watanabe | last post by:
I know that the standard idioms for clearing a list are: (1) mylist = (2) del mylist I guess I'm not in the "slicing frame of mind", as someone put it, but can someone explain what the...
17
by: Eric_Dexter | last post by:
def simplecsdtoorc(filename): file = open(filename,"r") alllines = file.read_until("</CsInstruments>") pattern1 = re.compile("</") orcfilename = filename + "orc" for line in alllines: if not...
4
by: Martitza | last post by:
Hi. I work for a small company (actually in process of forming) interested in embedding or extending python as part of our commercial non-open-source product. We have legal counsel, but are...
5
by: Steven W. Orr | last post by:
I'm trying again, since no response indicates that I'm not providing enough info. I have module M1 which has the following line in it: StartTime = safe_dict_get ( dic, 'starttime',...
0
by: Stodge | last post by:
Hi folks, new to Boost Python and struggling to build a prototype at work. I thought I'd start with a conceptual question to help clarify my understanding. I already have a basic prototype working...
0
by: Ohad Frand | last post by:
Hi Thanks a lot for your reply I think the main uses for it is to study the language and to see that I didn't miss anything else or that something is changed from one version to another. The...
1
by: SimonPalmer | last post by:
Apologies in advance if this is either a) the wrong board or b) been answered a million times elsewhere, but... I have been given an assignment to get a python module up and running behind an...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.