import – no module named dotenv python 3.8
import – no module named dotenv python 3.8
Im 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
in your installation manager if its 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 its symlinked to something like python2.7
and others 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
import – no module named dotenv python 3.8
This will solve just installing via terminal:
pip3 install python-dotenv
for python 3.0 versions or pip install python-dotenv
for python different than 3.0