python locale.Error: unsupported locale setting

Posted in :

如果在 linux/MacOS 下執行 python 遇到這一個 Error:

locale.Error: unsupported locale setting

解法:

Run following commands

export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales

It will solve this.

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *