One thing that makes Python so powerful and so amazing, frankly,
is the fact that there are actually so many third-party packages.
This is something that not a lot of other ecosystems have,
and so basically, at any point in time, if you want to do
really anything, for the most part, you don't have to write
a lot of your own code,
it probably exists to some degree already.
So a third-party package can be easily installed with Python
using a quick 'pip install' statement, and then to actually
use it in your code is as simple as an 'import' statement,
and then we can start using someone else's code that they've
written in our projects.
Now, packages are typically hosted on a service called 'PyPi',
and if I boot up my browser here, and go to 'PyPi', or I'll
just Google 'PyPi', and it is 'pypi.org',
and this is where you're going to find any Python package
that you can really think of.
There's 1.7 million releases, 2.6 million files, 400,000
users, and 226 different projects, 226,000 different
projects. So for instance, if you were looking for a content
management system written in Python, I know one off top of
my head called 'wagtail', and all you would have to do here
is 'pip install wagtail',
then you can run 'wagtail.mysite', and you can basically
be up and running with a content management system in a matter of seconds.
But so far, we've really only used built-in functions like
'print', and these are all part of the standard Python library,
or known as built-in functions.
So to download a third-party package, really, we just need to
go to the command line, and use a tool called 'pip'.
So if I open up my command line, you can type 'pip -V',
and it will show you which version of 'pip' you're using.
So for me, I'm using 'pip 18.1'.
That comes from where my Python is currently being run from
using Python 3.7.
Yours should say either Python 3.6, 3.7, 3.8 or something newer as well.
If that doesn't work for you, you can always try using 'pip3 -V'
if you're one of the users that has to use instead of Python,
instead of the 'python' command, you have to use 'python3'
command. If you're one of those people, then you can also
type 'pip3 -V'.
And for me, this is going to use Python 3.8.
But for you, it might actually use the right version of Python,
just Python3 in general.
In the next lesson, we're going to take a look at actually
installing a third-party package and how we can use it.