Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aduquet/9e44aa904fb5873fdbd9d4dbb8b9d5e5 to your computer and use it in GitHub Desktop.
Save aduquet/9e44aa904fb5873fdbd9d4dbb8b9d5e5 to your computer and use it in GitHub Desktop.
locale.Error: unsupported locale setting
I was installing some python libraries that I needed, and this message came up:
Traceback (most recent call last):
File "/usr/bin/pip3", line 11, in <module>
sys.exit(main())
File "/usr/lib/python3/dist-packages/pip/__init__.py", line 215, in main
locale.setlocale(locale.LC_ALL, '')
File "/usr/lib/python3.5/locale.py", line 594, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting
To solve this error, Try with the following:
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
sudo dpkg-reconfigure locales
Above 3 commands will reconfigure locales and that should solve the issue.
I will hope that the above works! Good Luck!
kind regards!
Aleja :)
@sansyrox
Copy link

Thank you @aduquet ! Really saved my time.

@ericriff
Copy link

Thanks! Worked perfectly.

@ZahoorAhmad
Copy link

Great

@vedantjoshi84
Copy link

Thanks. worked

@adrianbotez
Copy link

Thx

@xihajun
Copy link

xihajun commented May 5, 2021

thx

@LordofAvernus
Copy link

thx

@a-hamouda
Copy link

Thank you!

@saman202
Copy link

saman202 commented Apr 4, 2022

Thank you

@Rajnish-Jaiswal
Copy link

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment