Mac OS X: ValueError: unknown locale: UTF-8 in Python
If you have faced the error on MacOS X, here's the quick fix - add these lines to your ~/.bash_profile:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
Written by Abu Ashraf Masnun
Related protips
13 Responses
Thanks a lot!
Thanks, it worked for me on .profile
Thanks, sir!
Nice solved a problem with kivy packaging for Mac OSX, which halted because of this error (OSX 10.9.2 / Python 2.7.6 / PyInstaller 2.1)
It does help on Mac. (OSX 10.9.4-Anaconda 2.0.1) :-)
Hey. I have heard this for million times "If you have faced the error on MacOS X, here's the quick fix - add these lines to your ~/.bash_profile:" but how to? I'm very newbie please tell me very step by step. I'm using OS X yosemite
The ".bash_profile" is in "~" or your home directory. You can just type:
$ vim ~/.bash_profile
To have it open in Vim, for example.
It worked.
After opening Vim how do one add the lines? Please
Worked, thank you.
Thanks! Worked for me :)
Thanks a million :+1:
Thanks!!