Re: [SciPy-user] weave and mingw on win xp sp2 bug?
![](https://secure.gravatar.com/avatar/2dcf327ab027f0f97a2536955463e23c.jpg?s=120&d=mm&r=g)
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? <!-- /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times New Roman";} a:link, span.MsoHyperlink {color:blue;text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple;text-decoration:underline;} span.EmailStyle17 {font-family:Arial;color:windowtext;} _filtered {margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 {} --> 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. ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
![](https://secure.gravatar.com/avatar/5b373ce32dc6aa8cf2769b3d470d6e29.jpg?s=120&d=mm&r=g)
-----Original Message----- From: scipy-user-bounces@scipy.org [mailto:scipy-user-bounces@scipy.org] On Behalf Of Michael ODonnell Sent: Saturday, December 29, 2007 6:04 PM To: SciPy Users List
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.
I managed to run/compile my Time Wrapping function with weave and python 2.4.4 an hour ago. Although the weave.tests continues to show ugly "Permission Denied" message I had no problem with my func. (and like most windows users I don't care about that message! Its windows! ;) ) As I remember it is the python24.a file in 2.4.4 that makes the whole difference because gcc don't know anything about Microsoft lib files. Anyhow here is a brief state of my system: - scipy 0.6.0 - numpy 1.0.4 - Python in c:\python24 (no spaces in path! Its important) - environment variables: python_lib = c:\Python24\libs\python24.a pythonpath = c:\Python24;C:\PROGRAM FILES\Pyrex-0.9.6.4; swig_lib = C:\PROGRAM FILES\swingwin-1.3.27\python python_include = C:\Python24\include; path = C:\MINGW\BIN;C:\CYGWIN\BIN; C:\PROGRAM FILES\swingwin- 1.3.27\python;c:\python24 p.s: I saw some posts about cleaning up weave.tests in scipy-dev these days. I hope they take a look at weave.example directory.
participants (2)
-
mani sabri
-
Michael ODonnell