"may indicate binary incompatibility"

1,090 views
Skip to first unread message

Jon Olav Vik

unread,
Mar 18, 2010, 4:20:51 AM3/18/10
to cython-users
I installed the Enthought Python Distribution 6.1 on my 32-bit Windows
XP system. Now when I import my module written in Cython, I get these
warnings:

In [39]: from cvodeint import core
d:\svn\cigene\compbio\cgpsandbox\cvodeint\__init__.py:1:
RuntimeWarning: numpy.dtype size changed, may indicate binary
incompatibility
from core import *
d:\svn\cigene\compbio\cgpsandbox\cvodeint\__init__.py:1:
RuntimeWarning: numpy.flatiter size changed, may indicate binary
incompatibility
from core import *

I tried recompiling my module, but still get the warning. Should I
worry? EPD 6.1 includes Numpy 1.4, which is probably what Cython
complains about.

Eventually I found this thread:
http://thread.gmane.org/gmane.comp.python.numeric.general/35748/focus=35784
Does this mean that I should recompile/reinstall Cython?

Regards,
Jon Olav

Robert Bradshaw

unread,
Mar 18, 2010, 4:27:29 AM3/18/10
to cython...@googlegroups.com
On Mar 18, 2010, at 1:20 AM, Jon Olav Vik wrote:

> I installed the Enthought Python Distribution 6.1 on my 32-bit Windows
> XP system. Now when I import my module written in Cython, I get these
> warnings:
>
> In [39]: from cvodeint import core
> d:\svn\cigene\compbio\cgpsandbox\cvodeint\__init__.py:1:
> RuntimeWarning: numpy.dtype size changed, may indicate binary
> incompatibility
> from core import *
> d:\svn\cigene\compbio\cgpsandbox\cvodeint\__init__.py:1:
> RuntimeWarning: numpy.flatiter size changed, may indicate binary
> incompatibility
> from core import *
>
> I tried recompiling my module, but still get the warning. Should I
> worry? EPD 6.1 includes Numpy 1.4, which is probably what Cython
> complains about.

These warnings come when your runtime version of NumPy differs from
the NumPy you compiled your Cython module against. Are you sure it's
picking up the same NumPy when you compile cvodeint?

- Robert


Jon Olav Vik

unread,
Mar 18, 2010, 5:55:32 AM3/18/10
to cython-users
On Mar 18, 9:27 am, Robert Bradshaw <rober...@math.washington.edu>
wrote:

> On Mar 18, 2010, at 1:20 AM, Jon Olav Vik wrote:
> > RuntimeWarning: numpy.dtype size changed, may indicate binary
> > incompatibility

> These warnings come when your runtime version of NumPy differs from  


> the NumPy you compiled your Cython module against. Are you sure it's  
> picking up the same NumPy when you compile cvodeint?

Yes, it's using -IC:\Python26\lib\site-packages\numpy\core\include -IC:
\Python26\include flags when compiling, and those directories and the
files in site-packages\numpy all have the date of the EPD
installation.

However, I think my problem is solved now. I thought I had wiped
build/ and all relevant *.pyd, *.c files, but having recompiled my
module yet again, tests seem to work out fine.

Also, thank you very much for clarifying what the error message means.
I was worried I'd have to downgrade Numpy.

(Boring details: What may have happened is this: I keep my Cython
source code in separate directories, and on Linux I symlink the .so
files into somewhere in my PYTHONPATH. However, I keep my code in SVN,
and when I check out a symlink on Windows it turns into a plain text
file with e.g. "link ../cvodeint/core.so". I then have to manually
copy over *.pyd files on Windows, and it is easy to forget to fix them
all when needed.)

Best regards,
Jon Olav

Reply all
Reply to author
Forward
0 new messages