首页 > 代码库 > Python Issue: ValueError unknown locale: UTF-8 on OS X (Spyder)

Python Issue: ValueError unknown locale: UTF-8 on OS X (Spyder)

In your bash_profile you lack of something.

add 

export LANG="en_US.UTF-8"

export LC_COLLATE="en_US.UTF-8"

export LC_CTYPE="en_US.UTF-8"

export LC_MESSAGES="en_US.UTF-8"

export LC_MONETARY="en_US.UTF-8"

export LC_NUMERIC="en_US.UTF-8"

export LC_TIME="en_US.UTF-8"

export LC_ALL=

Python Issue: ValueError unknown locale: UTF-8 on OS X (Spyder)