Pelican 3.3 pelican-quickstart error "ValueError: unknown locale: UTF-8"
Solution 1:
You could try a solution posted here or here. Basically, add some lines to your ~/.bash_profile:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
There is an outstanding bug report related to this issue. It appears that Python makes some assumptions about the format of locale names that aren't universally valid. Explicitly setting these environment vars is basically just a workaround for that bug.
[Edit:] As @asmeurer correctly points out, the above fix assumes English and the U.S. You should really pick your preferred locale from the list given by locale -a
(generally one that ends in UTF-8
).
Solution 2:
Gerrat's answer works, and I believe we should mention that if you use somthing like zsh
, you should add lines to ~/.zshrc
instead of ~/.bash_profile
or ~/.bash_rc