I'm trying to code a simple discord bot in python, but it says i cant import load_dotenv, instead giving me this error:
Traceback (most recent call last):
File "/home/pi/Rotomi/Rotomi.py", line 5, in <module>
from dotenv import load_dotenv
ImportError: cannot import name 'load_dotenv' from 'dotenv' (/home/pi/.local/lib/python3.7/site-packages/dotenv/__init__.py)
For reference, here is my current code: https://pastebin.com/75qru00R
pip install dotenv
andpip install python-dotenv
(which haveload_dotenv
). Maybe you installed wrong module – Wiredotenv
,dotenv-python
andpython-dotenv
(and few others). python-dotenv hasload_dotenv
– Wire