[Glitch?] Python has just stopped working

eryk sun eryksun at gmail.com
Tue Feb 16 15:59:58 EST 2016


On Tue, Feb 16, 2016 at 10:19 AM, Theo Hamilton <theohamilton at gmail.com> wrote:
> Whenever I run python (3.5), I get the following message:
>
> Fatal Python error: Py_initialize: unable to load the file system codec
> ImportError: No module named 'encodings'
>
> Current thread 0x00002168 (most recent call first):

The interpreter can't find the standard library, which is a symptom of
having PYTHONHOME set to some other directory:

    C:\>set PYTHONHOME=C:\
    C:\>py -3.5
    Fatal Python error: Py_Initialize: unable to load the file system codec
    ImportError: No module named 'encodings'

    Current thread 0x00000940 (most recent call first):

Generally this environment variable is unnecessary for normal use and
shouldn't be set permanently.


More information about the Python-list mailing list