distutils bdist_wininst failure on Linux

Steven D'Aprano steve+comp.lang.python at pearwood.info
Thu Feb 23 19:11:11 EST 2012


On Thu, 23 Feb 2012 07:09:35 -0800, jmfauth wrote:

> On 23 fév, 15:06, Steven D'Aprano <steve
> +comp.lang.pyt... at pearwood.info> wrote:
>> Following instructions here:
>>
>> http://docs.python.org/py3k/distutils/builtdist.html#creating-
windows...
>>
>> I am trying to create a Windows installer for a pure-module
>> distribution using Python 3.2. I get a "LookupError: unknown encoding:
>> mbcs"
[...]
>> How do I fix this, and is it a bug in distutils?
> 
> Because the 'mbcs' codec is missing in your Linux, :-)

Well duh :-)

This is a bug in distutils. Prompted by your comment I expanded my search 
terms and found this bug report:

http://bugs.python.org/issue10945

The problem is that mbcs is not a real codec, it means "whatever codec is 
currently configured in Windows". So it doesn't exist on non-Windows 
platforms. But distutils bdist_wininst is explicitly documented as 
working on non-Windows platforms. Hence, it's a bug.


-- 
Steven



More information about the Python-list mailing list