-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Because the BeautifulSoup library is not a default Python library, it must be installed. The complete instructions for installing BeautifulSoup 4 can be found at Crummy.com; however, the basic method for Linux is: $sudo apt-get install python-bs4 and for Macs: $sudo easy_install pip
This installs the Python package manager pip. Then run the following:
$pip install beautifulsoup4
to install the library.
Again, note that if you have both Python 2.x and 3.x installed on your machine, you might need to call python3 explicitly: $python3 myScript.py
Make sure to also use this when installing packages, or the packages might be installed under Python 2.x, but not Python 3.x: $sudo python3 setup.py install
If using pip, you can also call pip3 to install the Python 3.x versions of packages: $pip3 install beautifulsoup4