Skip to content
Related Articles

Related Articles

How to Install glob in Python on Linux?

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 31 Jan, 2022

The Python Glob module is like a regex matching function that looks for files matching a specified pattern according to the rules initialized by the Unix shell. It is also supported by Linux systems also. In this article, we will look into how to install the glob module on Linux Operating System.


Installing Python-Glob package on Linux using PIP

To install the Python-Glob package in Linux we have to follow the following steps:

Step 1: First of all, we will install Python3 on our Linux Machine. Use the following command in the terminal to install Python3.

sudo apt-get install python3


Step 2: Now, we install the pip module which is required to install and manage the packages in Python3. Use the following command for installation:

sudo apt install python3-pip


Step 3: Now, install the Python-Glob package with the help of the following command.

sudo pip3 install glob2


sudo apt-get install python-glob2


Verifying Python-Glob package Installation on Linux using PIP

To verify if the Python-Glob package has been successfully installed in your system run the below command in Terminal:

python3 -m pip show glob2

You’ll get the below message if the installation is complete successfully: 


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!