Python 3 installation was working fine until yesterday. Then this happened today. Output from command prompt (Windows 10) when I type Python:
Fatal Python er
This may be due to an invalid value of PYTHONPATH set in your system. Unset the value of this environment variable using the following command unset PYTHONPATH This should now fix the problem. If the problem still persists, then re-install Python. Your issue should be solved now.
Adding this for people with the same issue. OP was able to find the answer here (his answer on another forum):
https://python-forum.io/Thread-Fatal-Python-error-init-sys-streams-can-t-initialize-sys-standard-streams-Attribute?page=3
Just in case if someone again faces this exact same issue I would clarify what was the problem and how it was solved.
Initially it seemed like known python bug which happens when a file is named io.py which causes conflict with standard module io, this was clearly not case here. Member @Gribouillis here pointed out to try executing python -E and it worked. Afterwards @metulburr again pointed out this behavior is not normal for fresh python installations. This clearly meant something was wrong with PYTHONPATH in environment variables.
What I did next was to remove all python paths from paths in environment variables(check @snippsat's screenshot for reference). Then uninstalled current python version. It is important to get rid of all paths to python installation before reinstalling because error occurred due to a invalid (likely due to change in installation directory) python path in paths. This completely solved the problem.
Also to reiterate what @gribouillis said it was probably bad idea to add PYTHONPATH to system in first place.