Installing a third-party library with pip
A terminal command that uses pip to download a third-party library (here requests) so a Python program can then import it. Add ==2.31.0 after the name to pick a version.
Understanding Installing a third-party library with pip in VCE Software Development U4O1
What it does: pip install downloads the library once in the terminal, then import makes it usable inside the Python file. pip show displays details about an installed library, including its version number. Third-party libraries are not built into Python. If you import one before installing it, Python raises a ModuleNotFoundError. Use == straight after the library name to choose an exact version. The @ symbol is not used by pip for versions. pip install followed by a library name fetches that library and installs it on the computer. The correct command is pip install requests==2.31.0 to select a specific version.
Common mistakes: The pip command order is wrong. The install keyword comes before the library name: pip install requests. Python code uses the import keyword to load a library after it has been installed. install is a pip command, not Python. It should be: import requests.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 115–124) and word search (Modules 115–171).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
pip install requestsFill in the Blanks
Spot the Error
Student with a class code? Join your class →