1.在Python\Lib\site-packages目录下创建一个sitecustomize.py文件
源代码:
  import sys
  sys.setdefaultencoding('utf-8')

2.验证。
打开IDLE,在里面输入:
  import sys
  sys.getdefaultencoding()

3.得到结果:
  utf-8

相关文章:

  • 2021-10-31
  • 2022-12-23
  • 2022-01-03
  • 2022-12-23
  • 2022-01-03
猜你喜欢
  • 2022-12-23
  • 2022-01-10
  • 2021-07-01
  • 2022-01-07
  • 2021-07-18
  • 2021-11-20
相关资源
相似解决方案