Verifying the installation
To verify the installation, perform the following steps:
- Open up the Python interpreter in a terminal by using the following command:
python
- 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.