Python: How to install BeautifulSoup

Python library BeautifulSoup is very handy while handling the html parsing and other tasks. This makes life easier for the scrappers to parse the data, specially those who are not that much expert on REGEX. This is much simpler than REGEX and any a newbie developer can even write a scraper using this BeautifulSoup.


Here is how you can install this BeautifulSoup on your development PC.

1) Directly using the pip. The command is like below:

pip install BeautifulSoup

2) If you do not have the pip installed with your Python(it doesn't come by default with Python installation). That case you can install the BeautifulSoup soup by following ways.

a) Download the latest BeautifulSoup from the link: BeautifulSoup

b) Unzip this into a folder.

c) Enter into the folder and run the following command to install BeautifulSoup.

python setup.py install

3) Or simply you can place the BeautifulSoup.py file with your python source code. It will automatically be loaded from your Python script. But its not recommended as you have to move this file from folder to folder and it looks ugly.


Comments