原文来源: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
原文地址:https://www.cnblogs.com/everfight/p/locale_error.html
时间: 2024-11-05 18:58:10