BeautifulSoup is a Python library that makes it easy to extract data from HTML and XML files. It helps you find, navigate, and change the information in these files quickly and simply. It’s a great tool that can save you a lot of time when working with web data. The latest version of BeautifulSoup is v4.13.2.
Prerequisites to Install BeautifulSoup:
- Python Installation
- Pip Installation in: Windows, Linux
How to install BeautifulSoup?
Install BeautifulSoup4 using pip
You can install the Beautiful Soup library on your operating system using the following command:
pip install beautifulsoup4Once you enter that command, the beautiful soup library should start installing. Here's an example of what the output should look like:

Install Beautifulsoup4 using the Source code
You can install BeautifulSoup by directly using the source code. To do this, download the BeautifulSoup 4 source tarball from the official website. After downloading the tarball, navigate to the directory where it was saved and run the appropriate installation commands.
python setup.py installVerifying Installation
You can check whether the installation of the library was successful or not by trying to import the beautiful soup library in python.

Now that you've installed BeautifulSoup, you're ready to start using it to pull data from HTML and XML files. Whether you installed it using pip or from the source code, BeautifulSoup makes it easier to work with web data. If you run into any problems during installation or while using the library, you can always check the official BeautifulSoup documentation for help. Enjoy using BeautifulSoup in your projects!