Check out a free preview of the full Python Fundamentals course
The "External Modules with PIP" Lesson is part of the full, Python Fundamentals course featured in this preview video. Here's what you'd learn in this lesson:
Nina introduces PIP, which is a tool that allows users to install external libraries.
Transcript from the "External Modules with PIP" Lesson
[00:00:00]
>> Nina Zakharenko: We saw how to import other kinda local files. If we want to use external libraries, we need to use a tool called pip, which will kind of go out into the world past the standard library and install an external library that we wanna use. I'll talk more about external libraries tomorrow.
[00:00:25]
But for now, let's use pip to install the request library. So everybody with your virtual environment activated type in python -m pip install requests.
>> Nina Zakharenko: And once you hit Enter,
>> Nina Zakharenko: I've already installed it before, but you should see that it's kind of downloading and installing.
>> Nina Zakharenko: Once that's finished, you can import requests just like you imported nameweb.
[00:01:09]
So,
>> Nina Zakharenko: I'm just gonna save those file, but,
>> Nina Zakharenko: It's not kinda really necessary for you all. So I can just import a request here, and that will import that external library.
Learn Straight from the Experts Who Shape the Modern Web
- In-depth Courses
- Industry Leading Experts
- Learning Paths
- Live Interactive Workshops