Getting Started with Beautiful Soup
上QQ阅读APP看书,第一时间看更新

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.