[Python-Dev] What's required to keep OS/2 support in Python 3.3

Paul Smedley paul at smedley.id.au
Fri Jan 6 22:52:36 CET 2012


Hi Antoine,
On 07/01/12 06:58, Antoine Pitrou wrote:
> On Sat, 07 Jan 2012 06:28:00 +1030
> Paul Smedley<paul at smedley.id.au>  wrote:
>>
>> I now have a dll and exe - however when it tried to build the modules,
>> it dies with:
>> Could not find platform independent libraries<prefix>
>> Could not find platform dependent libraries<exec_prefix>
>> Consider setting $PYTHONHOME to<prefix>[:<exec_prefix>]
>> Fatal Python error: Py_Initialize: Unable to get the locale encoding
>
> I would look at this line:
>
>> LookupError: no codec search functions registered: can't find encoding
>
> Normally the standard codec search function is registered when
> importing the "encodings" module (see Lib/encodings/__init__.py), which
> is done at the end of _PyCodecRegistry_Init() in Python/codecs.c.
> There's this comment there:
>
>              /* Ignore ImportErrors... this is done so that
>                 distributions can disable the encodings package. Note
>                 that other errors are not masked, e.g. SystemErrors
>                 raised to inform the user of an error in the Python
>                 configuration are still reported back to the user. */
>
> For the purpose of debugging you could *not* ignore the error and
> instead print it out or bail out.
Thanks - commenting out the ImportErrors block, I get:
ImportError: No module named encodings

So seems it's not finding modules - possibly related to the warnings about:
 >> Could not find platform independent libraries<prefix>
 >> Could not find platform dependent libraries<exec_prefix>

Seems getenv() may not be working correctly...



More information about the Python-Dev mailing list