[Glitch?] Python has just stopped working

eryk sun eryksun at gmail.com
Thu Feb 23 06:17:02 EST 2017


On Thu, Feb 23, 2017 at 8:14 AM,  <tomasz.wisniewski.gm at gmail.com> wrote:
> W dniu wtorek, 16 lutego 2016 21:09:50 UTC+1 użytkownik Theo Hamilton napisał:
>> I woke up two days ago to find out that python literally won't work any
>> more. I have looked everywhere, asked multiple Stack Overflow questions,
>> and am ready to give up. 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):
>>
>> If there's anything you know that I could do to fix this, then please tell
>> me. I've tried uninstalling and reparing, so it's not those. Thanks!
>
> You have to set your PYTHONHOME variable in Windows. for example
>
> PYTHONHOME='E:\Python36'
>
> I had the same problem and this worked.

This variable should not be needed and never set permanently. If
standard CPython can't start without PYTHONHOME, then there's
something wrong with your installation. Run

    set PYTHONHOME=

to clear it in the current command prompt, and then try to run Python.



More information about the Python-list mailing list