How to Install Beautifulsoup on Ubuntu & Windows

install beautifulsoup

install beautifulsoup

The first time I tried to install beautifulsoup to scrape the web on my Ubuntu system I had a hard time deciding which version to choose and I did not know if it was compatible with Python 3. Also, if you are a Windows user you will get an idea from this post how you can install BeautifoulSoup on your system.

Install BeautifulSoup

You can install BeautifulSoup on either Linux or Windows. The recent version of this library(beautifulsoup4) supports python 2 and python 3 too. You should already have Python installed.

Installation on Ubuntu

If you haven’t already installed pip you should do it now:

  1. Install beautifulsoup4 with pip.

This version supports python 2 and python 3 as well.

Installation on Windows with PIP

If you’re planning to work with python on your Windows in the future I suggest that you should install pip so you can download python packages faster and easier from the command line. You will probably need to open Command Prompt as an administrator.

  1. Download get-pip.py from here.
  2. Open CMD and cd to the folder you’ve just downloaded it and run it

Pip is installed on your system. You can test it by checking its version:

3. Install beautifulsoup with pip

Installation on Windows without PIP

You can also install it on Windows without PIP.

  1. Download the latest package from here and extract it.
  2. Open CMD and cd to the folder you’ve just extracted it.

3.Run setup.py with install

It will copy a bunch of files and if everything’s installed properly it will work fine.

 

Now that you’ve installed beautifulsoup on your machine you should check out Web Scraping in Python with Beautifulsoup to create your first web scraper!

You can follow us on Twitter to keep up with Web Scraping!