I was coding along with the lecture on “Guideline for Prompting”: https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/2/guidelines
But encountered some issue with “dotenv”.
When I copied the code snippet this in my own Jupyter notebook cell:
import openai
import os
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv())
It shows “ModuleNotFoundError: No module named ‘dotenv’”
Then I tried “python -m pip install python-dotenv” and “npm install dotenv” on the cell above, it still shows the same error. Then I tried to type both installing command in the terminal, it was successfully installed, and when I closed and opened the jupyter notebook, it still shows the same error.
Is there anyone who is more experienced can help me with this? I want to be able to use the code snippet to code my own project later, so I really appreciate if someone can point out where I did wrong…
Thanks,
Carolina