I was today years old when I realized you need to put your .zshrc file in your virtual environment folder if you’re using a virtual environment and not your home directory. I’ve been using python-dotenv for a year.
https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety