python locale.Error: unsupported locale setting Posted on 2018-06-08 如果在 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.