Problem building Python extension

David Cournapeau cournape at gmail.com
Fri Feb 13 12:15:03 CET 2009


On Fri, Feb 13, 2009 at 7:58 PM,  <martijnsteenwijk at gmail.com> wrote:
> On 13 feb, 10:53, David Cournapeau <courn... at gmail.com> wrote:
>> On Fri, Feb 13, 2009 at 6:30 PM,  <martijnsteenw... at gmail.com> wrote:
>> > Hi all,
>>
>> > I'm trying to build my first python extensionon a win32 system. I
>> > followed the description inhttp://starship.python.net/crew/mwh/toext/your-first-extension.html,
>> > but after running
>>
>> > C:\Python26\python first-setup.py build_ext -i
>>
>> > nothing seems to happen and no file first.pyd is produced.
>>
>> > The result from the cmd is the following:
>> > running build_ext
>> > building `first` extension
>> > error: None
>>
>> It is a bug in distutils - you reminded me that I did not report it :)
>> . IIRC, it is caused by the lack of a recognized installation VS 2008.
>> You should either install VS 2008 (the express vesion is free) or make
>> sure your VS 2008 is correctly installed.
>>
>> Building python 2.6 extensions with mingw is possible as well, but I
>> think you need to build your own mingw (because python 2.6 requires
>> msvcr90.dll) - maybe recent mingw have msvcrt90.dll included.
>>
>> cheers,
>>
>> David
>
> Thanks a lot for your reply. I downloaded & installed Visual C# 2008
> express, but unfortunately this doesn't change anything in running the
> setup file. Unfortunately, still no pyd file is produced...

I am not 100 % confident, but I think the problem is that for Visual
Studio express, you need to build the extension in a Visual Studio
shell (in the VS 2008 express menu). If that still does not work, I
will check on a windows VM (I need to do the bug report anyway).

cheers,

David



More information about the Python-list mailing list