Fix: ValueError: unknown locale: UTF-8

I was setting up the python.org website code, built on Django, on my local machine I encountered the error ValueError: unknown locale: UTF-8 while running the ./manage.py migrate command. See screenshot below:

Screenshot 2020-05-06 at 01.06.57

To fix this, I had to set the following environment variables:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

There, back to code.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.