Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App

Related Articles

How to Install BeautifulSoup in Python on Linux?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Beautiful Soup is a Python library. It is used to pull data out of HTML and XML files. It works with your favored parser to deliver conversational ways of navigating, searching, and modifying the parse tree. It creates a parse tree for the parsed pages that are used for extracting information from the HTML which is further useful for web scraping. It is available for Python versions 2.7, 3, and above. In this article, we will look into the steps of installing the Beautiful Soup Package on the Linux Operating System.


Installing BeautifulSoup  package on Linux using PIP

To install the BeautifulSoup  package in Linux we have to follow the following steps:

Step 1: First of all, we will install Python3 on Linux Machine using the following command in the terminal:

sudo apt-get install python3


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

sudo apt install python3-pip


Step 3: Now, install the BeautifulSoup package by using the following command.

sudo pip3 install beautifulsoup4


sudo apt-get install python3-bs4


Verifying BeautifulSoup package installation on Linux using PIP

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

python3 -m pip show beautifulsoup4

You’ll get the below message if the installation is completed successfully.


My Personal Notes arrow_drop_up
Last Updated : 31 Jan, 2022
Like Article
Save Article
Similar Reads