python-dotenv: bug: Getting "dotenv" could not be resolved error
- Getting
Import "dotenv" could not be resolved Pylance (reportMissingImports)again and again, although it is not affecting in development and running of the program, sometimes it can be annoying.

About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15
Hi there, i just faced the exact same issue as you, what helped me was to include
# .envat the header of your .env file, i realized at least that VScode was able to recognize the dotenv namespace. And the import error should be gone.$ python -m venv venv
$ source ./venv/Scripts/activate
$ pip install python-dotenv
Consegui resolver com: sudo pip3 install python-dotenv