Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't import dotenv from python-dotenv

Windows, Visual studio, django. I tried to install python-dotenv: https://pypi.org/project/python-dotenv/#getting-started.

But when I want to import this command, I get error: Import "dotenv" could not be resolvedPylancereportMissingImports.

I made such imports: (venv) PS C:\Users... pip3 install python-dotenv Requirement already satisfied: python-dotenv in c:\users...\venv\lib\site-packages (0.19.0).

But import doesn't work. What can be wrong?

like image 800
Viktoras Pranckietis Avatar asked Jan 20 '26 22:01

Viktoras Pranckietis


1 Answers

Try to change your Python version if you have more than 1. I got into trouble with the 3.10.0 and I changed it to 3.9.6.

like image 193
Khailas R Avatar answered Jan 22 '26 10:01

Khailas R