Introduction
In this lab, you will learn how to check if a Python module is installed. The lab begins by explaining module installation using pip
, the package installer for Python, and demonstrates how to install the requests
library. You'll use commands like pip install requests
(and alternatives with --user
or sudo
if needed) to install the module.
The lab then guides you through verifying the installation by attempting to import the module in a Python script. You'll create a check_requests.py
file and add code to import the requests
module, allowing you to confirm its successful installation.