2

当我尝试使用 python 语言环境时出现此错误

>>> locale.setlocale(locale.LC_ALL, 'de_DE')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 539, in setlocale
return _setlocale(category, locale)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/locale.py", line 80, in setlocale
raise Error, '_locale emulation only supports "C" locale'
ValueError: _locale emulation only supports "C" locale

我这里有所有必要的文件。http://i.imgur.com/FRRyv.png

问题出在哪里 ?

4

1 回答 1

1

您缺少_locale用于 python 安装的 C 扩展,并且它只支持C没有它的语言环境。

于 2012-08-25T17:15:45.407 回答