List Your Packages (Solution)
00:00
I’m here in my terminal right now. So make sure that you also try this in your terminal and not in your Python console in IDLE or something like that. So it’s important that you’re using the terminal to list all the packages that are currently installed on your system-wide Python, you use python3 -m pip
, and then you use the list
command.
00:24
If the python3
command doesn’t work on your system, you might try to only write python
If you’re still struggling, just let us know in the comments below and we’ll help you out or refer to the installing Python, Python Basics video course that I mentioned at the beginning of this course.
00:40 And once you press enter, you see all the packages with their versions that are currently installed in your Python3 installation on my system. These packages are probably a bit different than on your end, but we will tackle this with virtual environments in one of the next lessons.
00:59 There’s another thing I want to show you for the moment, and that’s if you use the Arrow app. You can go back to a command that you used before.
01:08
If you were unsure which command you used to list the packages, you can always use -h
. The h
stands for help. And instead of writing -h
, you could also write --help
.
01:25
So I used the arrow up to go to my former command so I don’t have to type everything. And then I remove the list
command with -h
, and once you press enter, you get a big bunch of information and that’s all the flags and commands that PIP supports.
01:41
So if you are unsure about certain PIP commands, -h
is always a good idea. And with this, let’s move on to the next exercise task.
Become a Member to join the conversation.