原文來源: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