Verifying the installation

To verify the installation, perform the following steps:

  1. Open up the Python interpreter in a terminal by using the following command:
    python
    
  2. Now, we can issue a simple import statement to see whether we have successfully installed Beautiful Soup or not by using the following command:
    from bs4 import BeautifulSoup
    

If we did not install Beautiful Soup and instead copied the bs4 directory in the workspace, we have to change to the directory where we have placed the bs4 directory before using the preceding commands.

Get Getting Started with Beautiful Soup now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.