-k_93g
Last Updated: January 10, 2017
·
70.85K
· masnun
2c87e8db57897b08332340b2c4b508ff

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

12 Responses
Add your response

1016
302317 221196234596260 5571903 n

Thanks a lot!

over 1 year ago ·
5135

Thanks, it worked for me on .profile

over 1 year ago ·
11282
Fabri

Thanks, sir!

over 1 year ago ·
13445
Avatar

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)

over 1 year ago ·
16415
2a917d503643d71813813908f501cdcb

It does help on Mac. (OSX 10.9.4-Anaconda 2.0.1) :-)

over 1 year ago ·
18217
None

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

over 1 year ago ·
18228
2c87e8db57897b08332340b2c4b508ff

The ".bash_profile" is in "~" or your home directory. You can just type:

$ vim ~/.bash_profile

To have it open in Vim, for example.

over 1 year ago ·
20832
None

It worked.

over 1 year ago ·
24899
None

After opening Vim how do one add the lines? Please

over 1 year ago ·
27753

Worked, thank you.

10 months ago ·
27776

Thanks! Worked for me :)

9 months ago ·
28171

Thanks a million :+1:

6 months ago ·