dotenv command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
dotenv: command not found
or when using sudo you get the following error message
sudo: dotenv: command not found
Solutions to dotenv: command not found
How To Fix dotenv: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu dotenv is provided by python3-dotenv-cli package.
python3-dotenv-cli is:
This package provides the dotenv command. It reads the .env file from the current directory puts the contents in the environment and executes the given command.
dotenv supports alternative .env files like .env.development via the -e or –dotenv parameters.
To fix this problem, we can install more using the command below.
sudo apt-get -y install python3-dotenv-cli
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install python3-dotenv-cli.
sudo apt -y install python3-dotenv-cli
Or if you have aptitude installed you can use the following command.
sudo aptitude install python3-dotenv-cli
Summary
In this tutorial we learn how to fix dotenv command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.