LastMinuteFlashcards
LastMinuteFlashcards copied to clipboard
windows python 3.6.3 ,encoding problem
my python version is 3.6.3.,and my system is windows. when i print import sys; sys.getdefaultencoding; python show 'utf-8' but i still get the error'Encoding not satisfied, please run 'export PYTHONIOENCODING=UTF-8' before runnin g this python script'.
Never run it on Windows before. But according to the official document, on 3.6 on Windows, PYTHONIOENCODING
is ignored in a console unless PYTHONLEGACYWINDOWSSTDIO
is also specified.
So you can try to set PYTHONLEGACYWINDOWSSTDIO
too.
BTW, use sys.stdout.encoding
instead of sys.getdefaultencoding
to check.