Hi sorry I did not reply about your inquiry of using weave. It took me quite a bit of time to get this to work and I never got any responses. Unfortunately, I am heading out the door so I will keep this extremely short until I can provide a more complete response tonight or tomorrow morning. I was able to get weave inline to work using python 2.5.1 and mingw 5.0.3. The path to this needs to be added to your pythonpath variable and you need to specify 'gcc' as your compiler. I also worked with VS2003 and VS2005 Express. And I worked with python 2.4.1 and 2.4.4. None of these combinations worked. There was also a problem in numpy with finding the python.exe file. I cannot remember if this error was given with VS compiler or both VS and MingW.

Anyhow, hopefully this will help you out and you can upgrade. I will provide all my notes on what I  tried and what I was able to get to work ASAP (tonight or tomorrow).


mike


----- Original Message ----
From: mani sabri <mani.sabri@gmail.com>
To: scipy-user@scipy.org
Sent: Saturday, December 29, 2007 1:28:51 AM
Subject: [SciPy-user] weave and mingw on win xp sp2 bug?

Hi

Happy holidays

I’m using python 2.4.4 , scipy 0.6.0 , numpy 1.0.4  and mingw gcc 3.4.5 on win xp sp2

When I try to run a weave example (e.x array3d.py) from “C:\PROGRAM FILES\Python24\Lib\site-packages\scipy\weave\examples” I have the following typical output:

 

numpy:

[[[ 0  1  2  3]

  [ 4  5  6  7]

  [ 8  9 10 11]]

 

 [[12 13 14 15]

  [16 17 18 19]

  [20 21 22 23]]]

 

Pure Inline:

<weave: compiling>

Found executable C:\MINGW\BIN\g++.exe

g++.exe: C:\program: No such file or directory

g++.exe: files\Python24\lib\site-packages\scipy\weave\scxx\weave_imp.cpp: No such file or directory

g++.exe: files\python24\lib\site-packages\scipy\weave\scxx\weave_imp.o: No such file or directory

g++.exe: no input files

 

And This trace back:

 

CompileError: error: Command "g++ -mno-cygwin -O2 -Wall -I"C:\program files\Python24\lib\site-packages\scipy\weave" -I"C:\program files\Python24\lib\site-packages\scipy\weave\scxx" -I"C:\program files\Python24\lib\site-packages\numpy\core\include" -I"C:\program files\Python24\include" -I"C:\program files\Python24\PC" -c C:\program files\Python24\lib\site-packages\scipy\weave\scxx\weave_imp.cpp -o c:\docume~1\man\locals~1\temp\man\python24_intermediate\compiler_12e837eb1ea3ab5199fbcc0e83015e3f\Release\program files\python24\lib\site-packages\scipy\weave\scxx\weave_imp.o" failed with exit status 1

 

IMHO When I put quotes around –c argument  in above command (-c “C:\program files\Python24\lib\site-packages\scipy\weave\scxx\weave_imp.cpp”) every thing is fine.

Can anyone help me to hack this around?

 

Cheers

Mani.

 

 




Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.