Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install python colorlog package in Linux

My python script is importing colorlog module of python but it is giving me error:-

ImportError: No module named colorlog

This definitely means that colorlog package is not installed in my linux server. When I am trying to install it using below command, that too is not working:-

python -m pip install colorlog
/usr/bin/python: No module named pip

python -m pip install logging
/usr/bin/python: No module named pip

Am I running any incorrect command here? Also, below are the Linux and Python versions I am using:-

Linux - Linux 3.10.0-229.el7.x86_64

Python - Python 2.7.5

like image 853
Suyash Gupta Avatar asked Jan 30 '26 20:01

Suyash Gupta


1 Answers

Seems you do not have pip installed. Try installing it first: https://pip.pypa.io/en/stable/installing/. Then you should be able to install colorlog package with pip install colorlog.

like image 66
Kirill Pavlov Avatar answered Feb 01 '26 09:02

Kirill Pavlov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!