[SciPy-User] scipy.weave bugs?

Dan Goodman dg.gmane@thesamovar....
Tue Dec 29 11:48:45 CST 2009


Hi,

I used to use scipy.weave.inline a lot, but recently I can't get it to 
work. It seems that the bugs I come across are documented, and in some 
cases even marked as fixed, but still recur in the latest versions of 
scipy. For example, with MSVC 2008 Express installed I try this:

from scipy import weave
weave.inline('int x=1;', [])

and get compile errors about __attribute__ identifier. From what I've 
read online, this is a GCC specific thing that breaks MSVC. If I try:

from numpy import zeros
from scipy import weave
x = zeros(10)
weave.inline('int i=1;', ['x'], type_converters=weave.converters.blitz, 
compiler='msvc')

I get a Python exception:

AttributeError: 'array_info' object has no attribute 'msvc_msg'

If I try GCC instead:

from numpy import zeros
from scipy import weave
x = zeros(10)
weave.inline('for(int i=0;i<10;i++) x(i)+=1.0;', ['x'], 
type_converters=weave.converters.blitz, compiler='gcc')

I get errors about 'labs' is not a member of 'std'. This appears to be a 
known problem with scipy with gcc-4.3 and is marked as fixed in 0.7.1 
but the problem is still there.

As well as that, I have another problem on another computer (which I 
don't have access to right now) where I have a user name with a space in 
it, and that causes several problems (although I think these problems 
are the fault of distutils and nothing to do with scipy). I found a way 
to work around that though by changing the environment variable for 
USERNAME from "Dan Goodman" to "DanGoo~1".

In other words, the whole situation with scipy.weave seems to be a mess, 
and in fact I can't get my code to work at all. I think downgrading to 
GCC version 4.2 would probably work, but I had some trouble working out 
how to do that on Windows with Python(x,y).

My question is, are the scipy developers aware of these problems and is 
there a schedule for getting them fixed? Having a functional scipy.weave 
is quite important to me, so I'm happy to help on testing solutions.

Dan Goodman

Versions for reference:

OS: WinXP SP3
MSVC: 2008 Express (CL ver 15.00.30729.01)
Python(x,y): 2.6.2.0 including:
Scipy: 0.7.1 (updated from 0.7.0 in Python(x,y) I think)
Numpy: 1.3.0
Python: 2.6.2.0
GCC: 4.4.0 (included as part of MinGW 4.4.0)



More information about the SciPy-User mailing list