[问题解决]Python locale error: unsupported locale setting

原文来源:https://stackoverflow.com/questions/14547631/python-locale-error-unsupported-locale-setting

安装flask包的时候,不支持语言环境,报错如下:

Traceback (most recent call last):
  File "/usr/bin/pip3", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python3/dist-packages/pip/__init__.py", line 215, in main
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib/python3.5/locale.py", line 594, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

解决方法:
依次执行一下命令:

export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales 选择en_US.UTF-8
posted @ 2019-01-23 20:07  bingo彬哥  阅读(3798)  评论(0编辑  收藏  举报
本站总访问量