close

[Solved] no module named ‘dotenv’ python 3.8

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error no module named ‘dotenv’ python 3.8 in Python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How no module named ‘dotenv’ python 3.8 Error Occurs?

Today I get the following error no module named ‘dotenv’ python 3.8 in Python.

How To Solve no module named ‘dotenv’ python 3.8 Error ?

  1. How To Solve no module named 'dotenv' python 3.8 Error ?

    To Solve no module named 'dotenv' python 3.8 Error pip3 install python-dotenvfor python 3.0 versions or pip install python-dotenv for python different than 3.0

Solution 1

in your installation manager if it’s Ubuntu or Debian try: apt install python3-dotenv

you can also try sudo pip3 install python-dotenv to install via pip.

Whatever you do remember to include explicitly the missing 3 part.

Debian/Ubuntu have separate packages and as of the present time python means python2 and python3 means python3 in their apt repositories. However, when it comes to your locally installed python binary on your system which python binary it defaults to using may vary depending on what /usr/bin/python is symlinked to on your system. Some systems it’s symlinked to something like python2.7 and other’s it may be something like python3.5. Similar issues exist with locally installed pip. Hence, why using the ‘3’ is important when installing or searching for python packages

Solution 2

I’m new to Python and just got exact same error. Just changed install command to what I used from a MongoDB tutorial to install PyMongo. It worked like a charm 🙂

python -m pip install python-dotenv

Solution 3

This will solve just installing via terminal:

pip3 install python-dotenvfor python 3.0 versions or pip install python-dotenv for python different than 3.0

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment