A Beginner's Guide to Pip (Overview)
pip is the standard package manager for Python. It allows you to install and manage additional packages that are not part of the Python standard library. This course is an introduction to
pip for new Pythonistas.
In this course, you’ll learn about:
- Installing additional packages not included with the standard Python distribution
- Finding packages published to the Python Package Index (PyPI)
- Managing requirements for your scripts and applications
- Uninstalling packages and their dependencies
As you’ll see, the Python community is very active and has created some neat alternatives to
pip that you’ll learn about later in this course.
00:33 If you’ve been writing simple Python programs and want to extend their functionality with third-party packages, then this is the course for you. At the same time, experienced Pythonistas looking to brush up on the basics will benefit from this course as well. And of course, if you have no idea what any of this means, then you’re definitely in the right place.
00:57 If you’ve been following tutorials on realpython.com, then chances are you’ve seen a statement that looks like this. The tutorial author tells you that you’ll need to install a package in order to follow along.
What often happens is new Pythonistas enter this command into their shell, and it appears as if the package they desire has been installed. But then they try to run their Python programs and they get an
ImportError, indicating that Python doesn’t actually know about the new module they’ve installed. This can be extremely frustrating, so I’ll show you an easy way to solve this problem and ensure that your packages are always installed into a location where Python is searching for them.
After that, you’ll learn about package managers, specifically
pip. I’ll show you how to install, manage, and uninstall packages. You’ll also learn how you can use requirement files to share your Python programs and ensure that other people have all the necessary dependencies to run them. I’ll be using a Mac in this course, so I can use common Unix programs within the shell.
02:11 Some of these have Windows equivalents, but I would recommend enabling the Windows Subsystem for Linux if you are on Windows. This will allow you to run a Bash shell within Windows, and it’ll allow you to follow along with the Unix commands that I use exactly as you see them. More info about this is in the video notes down below.
Become a Member to join the conversation.