raise ValueError, ‘unknown locale: %s’ % localename

raise ValueError, 'unknown locale: %s' % localename

 

在执行Django的命令来同步数据库的时候

python manage.py syncdb

 

出现上面的错误,因此有人建议使用下面的命令,但是还是出错,

 

export LC_CTYPE="UTF-8"

 

错误是:

 

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)

-bash: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8)

 

最终解决方案是:

export LC_CTYPE="en_US.UTF-8"

版权所有,禁止转载. 如需转载,请先征得博主的同意,并且表明文章出处,否则按侵权处理.

    分享到:

Leave a Reply

Your email address will not be published. Required fields are marked *