This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients eamanu, p-ganssle, vstinner, xtreak
Date 2019-02-12.10:57:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
A workaround is the usage of -I option:

vstinner@apu$ PYTHONPATH=: python3 -c ""
Fatal Python error: init_sys_streams: can't initialize sys standard streams
Traceback (most recent call last):
  File "/usr/lib64/python3.7/", line 52, in <module>
  File "/tmp/demo/", line 1, in <module>
Exception: Hi
Aborted (core dumped)

vstinner@apu$ PYTHONPATH=: python3 -I -c ""
<it works as expected>

A long term solution would to enable -I behavior by default: don't add the current directory to sys.path when using -c CMD.
Date User Action Args
2019-02-12 10:57:04vstinnersetrecipients: + vstinner, p-ganssle, eamanu, xtreak
2019-02-12 10:57:04vstinnersetmessageid: <>
2019-02-12 10:57:04vstinnerlinkissue35969 messages
2019-02-12 10:57:04vstinnercreate