ctypes version mismatch

Paul McNett p at ulmcnett.com
Sat Aug 30 02:44:44 CEST 2008


Thomas Heller wrote:
> Paul McNett schrieb:
>> Anyone have anything to suggest on this error:
>>
>> {{{
>> Traceback (most recent call last):
>>    File "shutter_studio.py", line 41, in <module>
>>    File "App.pyo", line 25, in <module>
>>    File "ui\__init__.pyo", line 23, in <module>
>>    File "ui\FrmProductionOrders.pyo", line 10, in <module>
>>    File "ui\PagEditProductionOrders.pyo", line 8, in <module>
>>    File "ui\GrdProductionOrderOpenings.pyo", line 5, in <module>
>>    File "ui\DlgEditProductionOrderOpening.pyo", line 17, in <module>
>>    File "ui\ShutterCanvas.pyo", line 9, in <module>
>>    File "wx\lib\floatcanvas\FloatCanvas.pyo", line 6, in <module>
>>    File "numpy\__init__.pyo", line 46, in <module>
>>    File "numpy\ctypeslib.pyo", line 9, in <module>
>>    File "ctypes\__init__.pyo", line 20, in <module>
>> Exception: ('Version number mismatch', '1.0.2', '1.0.3')
>> }}}
>>
>> I just updated from python 2.5.1 to 2.5.2, and wxPython 2.8.7.1 to
>> 2.8.8.1. The issue is only in the py2exe-built app, not when running the
>> script from the command line.
> 
> I guess you should remove the build and dist directories and rebuild
> your app - this is always a good idea when something goes wrong, not only
> after upgrading Python or Python packages.

Thanks for responding (and thanks for starting py2exe!). Yes, my build 
script always wipes out the build and dist directories first.

The problem turned out to be (it was right there in the traceback, but I 
glossed over it at first) that numpy includes their own ctypeslib, and 
*that* version was 1.0.2. Now, I'm still not sure why it mattered in the 
exe but not running just the script, but upgrading numpy resolved the issue.

Paul



More information about the Python-list mailing list