Answers for "ModuleNotFoundError: No module named 'dotenv'"

1

ModuleNotFoundError: No module named 'dotenv'

pip3 install python-dotenv
Posted by: Guest on August-17-2021
0

how to uninstall python-dotenv

import os
from pathlib import Path
from dotenv import load_dotenv

# Get the base directory
basepath = Path()
basedir = str(basepath.cwd())
# Load the environment variables
envars = basepath.cwd() / '.env'
load_dotenv(envars)
# Read an environment variable.
SECRET_KEY = os.getenv('SECRET_KEY')
Posted by: Guest on November-28-2020

Code answers related to "ModuleNotFoundError: No module named 'dotenv'"

Browse Popular Code Answers by Language