django-admin command not found
Introduction
When you run more command in linux terminal / console, you get the following error message
django-admin: command not found
or when using sudo you get the following error message
sudo: django-admin: command not found
Solutions to django-admin: command not found
How To Fix django-admin: command not found in Ubuntu / Debian / Kali Linux / Raspbian
In Ubuntu django-admin is provided by python3-django package.
python3-django is:
Django is a high-level web application framework that loosely follows the model-view-controller design pattern.
Python’s equivalent to Ruby on Rails, Django lets you build complex data-driven websites quickly and easily - Django focuses on automating as much as possible and adhering to the “Don’t Repeat Yourself” (DRY) principle.
Django additionally emphasizes reusability and “pluggability” of components; many generic third-party “applications” are available to enhance projects or to simply to reduce development time even further.
Notable features include:
- An object-relational mapper (ORM)
- Automatic admin interface
- Elegant URL dispatcher
- Form serialization and validation system
- Templating system
- Lightweight, standalone web server for development and testing
- Internationalization support
- Testing framework and client
To fix this problem, we can install more using the command below.
sudo apt-get -y install python3-django
This command might take some time to finish depending on your machine internet connection.
You can also use apt command to install python3-django.
sudo apt -y install python3-django
Or if you have aptitude installed you can use the following command.
sudo aptitude install python3-django
Summary
In this tutorial we learn how to fix django-admin command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.