[Numpy-discussion] Python 2.6 and numpy 1.3.0/1.4.0 from an extension

Charles R Harris charlesr.harris@gmail....
Mon Feb 8 12:16:59 CST 2010

On Mon, Feb 8, 2010 at 10:19 AM, Peter Notebaert <peno@telenet.be> wrote:

> I have made an extension that also uses numpy.
> I developed with Python 2.6 and numpy 1.4.0
> This works all fine.
> The problem is that users that use this extension get crahes from the
> moment they use the extension and this because of numpy. It crashes when
> numpy is initialised.
> This because those users have also Python 2.6, but with numpy 1.3.0!!!
> This because they installed both via the Pythonxy setup.
> How can this be handled that users have different versions of numpy for a
> given version of Python. Python has no problem using numpy 1.3.0 or 1.4.0,
> so how can I make this possible in my extension?
> There was a similar problem in 1.3 where it called a new function in the
API which led to segfaults when 1.3 extensions were run on older versions of
numpy. Ironically, this was fixed in 1.4 by adding another function to check
at runtime, but this will cause segfaults on 1.3. Next cycle, there should
be a warning issued, i.e., 1.5 running on 1.4 should raise an error instead
of crashing. In any case, forward compatibility isn't guaranteed between
minor version changes as the API can change. Extensions need to be
developed, or at least compiled, against the earliest version of numpy with
which they will be used. Extensions compiled again older versions of numpy
should run on newer versions.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100208/1f435edd/attachment.html 

More information about the NumPy-Discussion mailing list