mod_python command not found

In this troubleshooting guide we learn how to fix mod_python command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

mod_python: command not found

or when using sudo you get the following error message

sudo: mod_python: command not found

Solutions to mod_python: command not found

How To Fix mod_python: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu mod_python is provided by libapache2-mod-python package.

libapache2-mod-python is:

The mod_python module supports web applications written in Python. Because the parser is embedded in the server as an Apache module, it will run much faster than traditional CGI.

This package is built for the current Python 3 version.

To fix this problem, we can install more using the command below.

sudo apt-get -y install libapache2-mod-python

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install libapache2-mod-python.

sudo apt -y install libapache2-mod-python

Or if you have aptitude installed you can use the following command.

sudo aptitude install libapache2-mod-python

Summary

In this tutorial we learn how to fix mod_python command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.