How to Install Python-logging module on Linux?
Last Updated :
07 Mar, 2022
A programmer’s backpack should include a logging library. It can aid in the development of a better knowledge of a program’s flow and the discovery of scenarios that you may not have considered when designing. Because most third-party Python libraries employ logging, you may combine your log messages with those from those libraries to create a unified log for your application. So, in this article, we’ll use the PIP manager to install the Logging package in Python on a Linux operating system.
Installing Logging package on Linux using PIP
Requirements:
- Python3
- Python3-pip
To install the Logging package in Linux we have to follow the following steps:
Step 1: Setting up Python environment on our Linux operating system. So we’ll use the apt manager to install Python3.
sudo apt-get install python3
Step 2: Now we install the PIP manager. The PIP manager is a Python package installation program that is used to install and manage Python packages. So for the installation use the following command on the terminal.
sudo apt install python3-pip
Step 3: Now we’ll use the PIP manager to install the Logging package. So to install the Logging package, simply run the following command on the terminal.
sudo pip3 install logging
Verifying the installation of Logging package on Linux using PIP
After you’ve installed the package, the next step is to check whether the logging package is successfully installed or not. So, we’ll only use the terminal to get the information about the installed package (logging).
python3 -m pip show logging
You will get the following output when the logging package is successfully installed.
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...