Instructor: Welcome back.
Up until now, we've talked about Sublime Text
and Visual Studio Code.
Code editors that we had to install a bunch of plugins
and extensions in order to customize it to what we want.
And they work really well
with a ton of different programming languages.
The next one though is an IDE,
and it's called PyCharm.
And it's probably the most popular tool
for Python developers, so I really, really like it.
But it's an IDE.
That is, unlike a code editor,
it already comes pre-built with a lot of things.
This company, JetBrains, makes it,
and they focus purely on Python developers.
So that is, if you're a Python developer,
they really focus and make sure
that all the tools you need to succeed are in here.
Now, when you click on Download Now,
you have two versions.
The Professional one which you have to pay for,
and the Community one.
So just download the Community one,
the Professional one just comes with a few extra features
that we don't really need.
So download the Community one.
Just a heads-up, it's a lot bigger, it's 315 megabytes.
So, again, it comes with a lot more tools for us to use,
so it is a little bit heavier
than Visual Studio Code or Sublime Text.
But if you're a Python developer
and you just want an environment
where you can do everything in one place,
PyCharm is the way to go.
Now, let's fast forward through this
so that we're not waiting around for the download.
Whew! All right.
That was a long pause for me,
but for you, with some editing,
this should have been quick.
All right.
If I open this up now,
again, if you're on Windows or if you're on Mac,
installation process will be different.
In our case, because we are on a Mac,
I just drag this to Application.
With Windows, you'll probably go through an Installer.
All right, it's all installed.
Now if I double-click,
PyCharm is going to open up for me.
And we'll just make sure we allow it.
Now, in my case,
I had, already, a previous version of PyCharm
that I've been using,
and you might want to import your previous setting.
But, in our case, we've never used PyCharm before,
and also most likely you want a fresh install.
So even if you get this type of pop-up,
you can just click on Do not import settings
so you get a fresh slate.
We're going to click OK.
And there we have it.
And right away, you can see that,
well, it gives us a lot of options.
Let's just say I've never used PyCharm before.
And next, we get to choose our UI.
Do we want Darcula which is dark, or do we want Light?
Let's go with dark for now.
So I'm going to skip the remaining and set defaults.
So in PyCharm now, we can create a new project.
Now in here, it asks us where we wanna create our project.
In my case, we can just leave it over here.
We'll call it myproject.
And before we click Create,
make sure that you click on this Project Interpreter
and double-check that our base interpreter
is using Python 3.
Remember, if you're on a Mac or Linux,
you might have Python 2 already installed.
In our case, we installed our Python version 3.7 right here.
So we make sure that this latest version of Python
is what's being used as the interpreter.
Now we can just click Create,
and our project is going to start for us.
We can close these tips,
every once in a while you get Tip of the Day.
Because this is an IDE,
you get a lot of features that you can read about online.
So it might take you a while to get used to PyCharm,
but it is a very powerful tool.
Let's make this a little bit bigger.
Now with myproject here, I can right click,
say New, and then select File.
Our file, we'll just call it hihi.py.
Click OK.
And there we go.
We have our first file opened up,
and we can just, once again, say print.
Now, this is definitely way too small,
so I'm going to go to PyCharm, Preferences,
and here it gives you a ton of options
to customize PyCharm to your liking.
In my case, I wanna make sure that I use,
let's say, custom font,
but definitely increase the size to...
Let's go with 18.
How's that?
Let's apply.
That's better.
You know what? I want it even bigger.
Let's do 20.
I'm gonna hit OK.
All right, this side is now bigger.
That's great, we can see it.
But, hmm, this is still tiny,
I want this a little bit bigger,
so let's fix that as well.
We can fix this easily by pressing Command
and then using the mouse wheel if you have a mouse,
or using two fingers and zooming in like so.
If you're on a Windows machine,
it'll be Control instead of Command,
and just zooming in and out as you like.
Now, the interesting thing here with PyCharm,
I know we have a ton of things
that we might not be familiar with right now,
but the key thing is that Python 3.7 is running our project.
And if we type something like print, heyhey,
we get a ton of interesting things.
First, we get a typo saying,
"Hey, this whole heyhey is not an English word."
If I add spaces, look at that.
It even gives me typos of English words.
But then I also have this yellow curly bracket,
or squiggly line, and it tells me "PEP eight,
no newline at the end of the file."
This is something that we're gonna talk about shortly
when we talk about formatting our code.
But if I add a new line,
look at that, everything is working smoothly,
I get a nice little check mark.
Now I can run this code
by going to Run, and then clicking Run,
and you can see the shortcut command here as well.
If I Run this, it asks me,
"Hey, what do you wanna Run?"
Well, I wanna Run the new hihi Python file.
I click on this.
And look at that.
Let's make this a little bit bigger.
That's better.
We see that our file is being run,
the process finished with the exit code zero.
Zero is a good sign.
It means there were no errors and everything is great.
Now, if we make an error here
and let's say I miss my brackets and I hit Run,
or I can just click on Run here, look at that.
It gives me an error saying,
"Hey, hey, hey, SyntaxError,
unexpected EOF while parsing."
And tells you something went wrong.
So, once again, I can fix it,
Run my code, and everything is good.
There are a lot of features here
that you can explore on your own, get comfortable with it.
PyCharm is definitely a great IDE.
And the beauty is that unlike Sublime Text
or Visual Studio Code where we had to install
all these packages,
PyCharm comes, well, with everything built-in, it's an IDE.
We don't have to install any of these packages.
This environment is already set up
for us to work professionally with Python
because it is made for Python developers.
I'll see you in the next one, bye-bye.