Python Library Win7 -64 Bit

Thomas Jollans thomas at jollans.com
Tue Jun 15 10:09:32 EDT 2010


On 06/15/2010 02:03 PM, James Ravenscroft wrote:
> Dear All,
> 
> Before I start, I'm aware of how much of a nightmare MSys and MINGW are
> in comparison to UNIX/Linux environments, I'm a casual Ubuntu user
> myself and I wouldn't go near Windows if I didn't have to.
> 
> I'm trying to install the Python LibXML2 extensions onto my 64 bit
> Cython 2.6 setup under Windows 7. When I do a "python setup.py build -c
> mingw32",  everything starts off fine and the compilation begins.
> Distutils then returns complaining that most of the Python symbols (e.g.
> _imp_Py_NoneStruct and _imp_PyArg_ParseTuple) are undefined. This lead
> me to assume that the linker on my platform can't find a python library
> to link against. Sure enough, I looked through my build path and
> couldn't find libpython26.dll or libpython26.a anywhere. I managed to
> get hold of a libpython26 shared library file (I think I found it in my
> System32 folder) and copied it to C:\Python26\libs which is one of the
> directories on my gcc search path. However, I'm still getting the same
> rubbish about not all the python symbols being undefined.

My guess would be that you're compiling for the wrong architecture. Does
your mingw compiler produce 64-bit binaries? (the "32" in "mingw32"
would suggest otherwise)
Debian GNU/Linux has mingw-w64 package, I'd expect there to be a native
analogue on windows.

Thomas

> 
> Has anyone had any prior experience with this sort of problem or can
> anyone point me in the right direction? The only solution I could come
> up with was to compile python itself from scratch which, even on a high
> end desktop, takes hours and hours and hours... (etc) on an Msys setup.
> 
> Thanks,
> 
> James Ravenscroft
> Funky Monkey Software
> james (at) funkymonkeysoftware (dot) com




More information about the Python-list mailing list