Kevin Ar18 wrote:
> Are there any step by step instructions for installing Cython with Microsoft 
> Visual C++ 2008 Express Edition?
> I just get install errors.

IIRC Python 2.5.x's distutils do not support MSVC 2008 of any kind, just 
2003 and 2005. Python 2.6 (now in rc status) does support it.

> After manually editing msvccompiler.py, I got farther:
>     def initialize(self):
>         self.__paths = []
>         if os.environ.has_key("DISTUTILS_USE_SDK") and 
> os.environ.has_key("MSSdk") and self.find_exe("cl.exe"):
>             # Assume that the SDK set up everything alright; don't try to be
>             # smarter
>             self.cc = "cl.exe"
>             self.linker = "link.exe"
>             self.lib = "lib.exe"
>             self.rc = "rc.exe"
>             self.mc = "mc.exe"
>         else:
> to:
>     def initialize(self):
>         self.__paths = []
>         if True:
>             # Assume that the SDK set up everything alright; don't try to be
>             # smarter
>             self.cc = "C:\\Program Files (x86)\\Microsoft Visual Studio 
> 9.0\\VC\\bin\\cl.exe"
>             self.linker = "C:\\Program Files (x86)\\Microsoft Visual Studio 
> 9.0\\VC\\bin\\link.exe"
>             self.lib = "C:\\Program Files (x86)\\Microsoft Visual Studio 
> 9.0\\VC\\bin\\lib.exe"
>             self.rc = "C:\\Program Files\\Microsoft 
> SDKs\\Windows\\v6.0A\\bin\\RC.exe"
>             self.mc = "C:\\Program Files (x86)\\Microsoft Visual Studio 
> 9.0\\VC\\bin\\mc.exe"
>         else:
> 
> 
> Note: I can't actually find mc.exe in MSVC 2008.  Is this bad?

Maybe :)

According to 
http://msdn.microsoft.com/en-us/library/aa385638(VS.85).aspx mc.exe is 
the message compiler, which might or might be not required to build DLLs 
on Windows. It might be that the Express edition of 2008 does not 
include it, but I do not have a MSVC 2008 professional handy at this 
moment, but I can likely check later.

> ...and here's the latest error:
> C:\...\Cython-0.9.8.1.1>python setup.py install
> Compiling module Cython.Plex.Scanners ...
> running install
> running build
> running build_py
> running build_ext
> building 'Cython.Plex.Scanners' extension
> C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\cl.exe /c /nologo 
> /Ox
> /MD /W3 /GS- /DNDEBUG "-IC:\Program Files\Python 2.5.2\include" "-IC:\Program 
> Fi
> les\Python 2.5.2\PC" /TcC:\...\Cython-0.9.8.1.1\Cython\Plex\Scanners.c
> /Fobuild\temp.win32-2.5\Release\...\Cython-0.9.8.1.1\Cython\Plex\Scanners.obj
> Scanners.c
> c:\program files\python 2.5.2\include\pyconfig.h(61) : fatal error C1083: 
> Cannot
>  open include file: 'io.h': No such file or directory
> error: command '"C:\Program Files (x86)\Microsoft Visual Studio 
> 9.0\VC\bin\cl.ex
> e"' failed with exit status 2
> 
> 
> Been working at it for hours now...   at least I've gotten a little farther.

This is probably due to 2008 not being supported by Python 2.5. Some 
people out there have patches for MSVC 2008 and Python 2.5.2, but you 
have to Google for them since I did not bookmark those when I last came 
across them. I have not looked at pyconfig.h, so I might be completely 
wrong here.

Did you build Python yourself or did you use an installer? If you used a 
binary build with MSVC 2005 I would not be surprised that even after 
building the extension it might still blow up on loading due to ABI 
breakage.

Cheers,

Michael

> _________________________________________________________________
> Want to do more with Windows Live? Learn “10 hidden secrets” from Jamie.
> http://windowslive.com/connect/post/jamiethomson.spaces.live.com-Blog-cns!550F681DAD532637!5295.entry?ocid=TXT_TAGLM_WL_domore_092008
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to