How To Fix Python Error ValueError: unknown locale: UTF-8 on macOS
- Categories:
- python
When you running Python script on Mac OS, you may occurs Python error like this one:
Solution
Edit ~/.bash_profile
if you are using bash
or ~/.zshrc
for zsh
and add these lines.
In some case, you may need to set LC_CTYPE
.
Restart your terminal or computer or run this command to reload environment variables.
To make sure it was set, check with echo
command.
- Tags:
- #python
Recent Posts
AWS Secrets Manager
Explanation about AWS Secrets Manager with example code.
Envelope Encryption
Envelope encryption is the practice of encrypting plaintext data with a data key, and then encrypting the data key under another key.
Tutorial - "su username vs su - username" - A Security Perspective
The main difference between `su username` and `su - username` lies in the environment variables that are loaded when switching to the specified user.
Subdomain Hijacking
My dormant subdomain was recently hijacked, redirecting it to a online gamble registration page.
C# DbContext ServiceLifeTime
my note about C Sharp ServiceLifeTime