1 00:00:00,300 --> 00:00:01,530 Instructor: Welcome back. 2 00:00:01,530 --> 00:00:04,590 Up until now, we've talked about Sublime Text 3 00:00:04,590 --> 00:00:06,540 and Visual Studio Code. 4 00:00:06,540 --> 00:00:10,650 Code editors that we had to install a bunch of plugins 5 00:00:10,650 --> 00:00:14,820 and extensions in order to customize it to what we want. 6 00:00:14,820 --> 00:00:16,590 And they work really well 7 00:00:16,590 --> 00:00:20,220 with a ton of different programming languages. 8 00:00:20,220 --> 00:00:23,220 The next one though is an IDE, 9 00:00:23,220 --> 00:00:24,810 and it's called PyCharm. 10 00:00:24,810 --> 00:00:27,780 And it's probably the most popular tool 11 00:00:27,780 --> 00:00:32,130 for Python developers, so I really, really like it. 12 00:00:32,130 --> 00:00:33,900 But it's an IDE. 13 00:00:33,900 --> 00:00:35,940 That is, unlike a code editor, 14 00:00:35,940 --> 00:00:40,290 it already comes pre-built with a lot of things. 15 00:00:40,290 --> 00:00:42,810 This company, JetBrains, makes it, 16 00:00:42,810 --> 00:00:46,020 and they focus purely on Python developers. 17 00:00:46,020 --> 00:00:48,870 So that is, if you're a Python developer, 18 00:00:48,870 --> 00:00:51,360 they really focus and make sure 19 00:00:51,360 --> 00:00:54,393 that all the tools you need to succeed are in here. 20 00:00:55,590 --> 00:00:58,950 Now, when you click on Download Now, 21 00:00:58,950 --> 00:01:01,320 you have two versions. 22 00:01:01,320 --> 00:01:04,110 The Professional one which you have to pay for, 23 00:01:04,110 --> 00:01:05,760 and the Community one. 24 00:01:05,760 --> 00:01:07,650 So just download the Community one, 25 00:01:07,650 --> 00:01:11,100 the Professional one just comes with a few extra features 26 00:01:11,100 --> 00:01:12,570 that we don't really need. 27 00:01:12,570 --> 00:01:15,000 So download the Community one. 28 00:01:15,000 --> 00:01:19,920 Just a heads-up, it's a lot bigger, it's 315 megabytes. 29 00:01:19,920 --> 00:01:23,340 So, again, it comes with a lot more tools for us to use, 30 00:01:23,340 --> 00:01:25,470 so it is a little bit heavier 31 00:01:25,470 --> 00:01:28,740 than Visual Studio Code or Sublime Text. 32 00:01:28,740 --> 00:01:30,780 But if you're a Python developer 33 00:01:30,780 --> 00:01:32,910 and you just want an environment 34 00:01:32,910 --> 00:01:35,250 where you can do everything in one place, 35 00:01:35,250 --> 00:01:37,740 PyCharm is the way to go. 36 00:01:37,740 --> 00:01:39,510 Now, let's fast forward through this 37 00:01:39,510 --> 00:01:42,240 so that we're not waiting around for the download. 38 00:01:42,240 --> 00:01:43,590 Whew! All right. 39 00:01:43,590 --> 00:01:44,790 That was a long pause for me, 40 00:01:44,790 --> 00:01:46,830 but for you, with some editing, 41 00:01:46,830 --> 00:01:48,120 this should have been quick. 42 00:01:48,120 --> 00:01:48,953 All right. 43 00:01:48,953 --> 00:01:50,910 If I open this up now, 44 00:01:50,910 --> 00:01:54,180 again, if you're on Windows or if you're on Mac, 45 00:01:54,180 --> 00:01:56,850 installation process will be different. 46 00:01:56,850 --> 00:01:59,460 In our case, because we are on a Mac, 47 00:01:59,460 --> 00:02:01,470 I just drag this to Application. 48 00:02:01,470 --> 00:02:04,923 With Windows, you'll probably go through an Installer. 49 00:02:06,090 --> 00:02:07,920 All right, it's all installed. 50 00:02:07,920 --> 00:02:10,020 Now if I double-click, 51 00:02:10,020 --> 00:02:12,993 PyCharm is going to open up for me. 52 00:02:14,430 --> 00:02:16,893 And we'll just make sure we allow it. 53 00:02:18,810 --> 00:02:20,910 Now, in my case, 54 00:02:20,910 --> 00:02:25,110 I had, already, a previous version of PyCharm 55 00:02:25,110 --> 00:02:26,670 that I've been using, 56 00:02:26,670 --> 00:02:29,760 and you might want to import your previous setting. 57 00:02:29,760 --> 00:02:32,610 But, in our case, we've never used PyCharm before, 58 00:02:32,610 --> 00:02:35,670 and also most likely you want a fresh install. 59 00:02:35,670 --> 00:02:38,370 So even if you get this type of pop-up, 60 00:02:38,370 --> 00:02:40,560 you can just click on Do not import settings 61 00:02:40,560 --> 00:02:42,213 so you get a fresh slate. 62 00:02:43,230 --> 00:02:44,970 We're going to click OK. 63 00:02:44,970 --> 00:02:47,220 And there we have it. 64 00:02:47,220 --> 00:02:50,100 And right away, you can see that, 65 00:02:50,100 --> 00:02:52,470 well, it gives us a lot of options. 66 00:02:52,470 --> 00:02:54,510 Let's just say I've never used PyCharm before. 67 00:02:54,510 --> 00:02:57,030 And next, we get to choose our UI. 68 00:02:57,030 --> 00:03:00,750 Do we want Darcula which is dark, or do we want Light? 69 00:03:00,750 --> 00:03:02,223 Let's go with dark for now. 70 00:03:05,040 --> 00:03:08,373 So I'm going to skip the remaining and set defaults. 71 00:03:12,960 --> 00:03:17,960 So in PyCharm now, we can create a new project. 72 00:03:18,420 --> 00:03:22,050 Now in here, it asks us where we wanna create our project. 73 00:03:22,050 --> 00:03:24,420 In my case, we can just leave it over here. 74 00:03:24,420 --> 00:03:26,187 We'll call it myproject. 75 00:03:27,930 --> 00:03:30,570 And before we click Create, 76 00:03:30,570 --> 00:03:33,880 make sure that you click on this Project Interpreter 77 00:03:35,490 --> 00:03:39,930 and double-check that our base interpreter 78 00:03:39,930 --> 00:03:42,480 is using Python 3. 79 00:03:42,480 --> 00:03:44,370 Remember, if you're on a Mac or Linux, 80 00:03:44,370 --> 00:03:48,060 you might have Python 2 already installed. 81 00:03:48,060 --> 00:03:52,890 In our case, we installed our Python version 3.7 right here. 82 00:03:52,890 --> 00:03:56,460 So we make sure that this latest version of Python 83 00:03:56,460 --> 00:03:58,923 is what's being used as the interpreter. 84 00:03:59,880 --> 00:04:01,773 Now we can just click Create, 85 00:04:02,880 --> 00:04:05,253 and our project is going to start for us. 86 00:04:08,730 --> 00:04:09,990 We can close these tips, 87 00:04:09,990 --> 00:04:12,480 every once in a while you get Tip of the Day. 88 00:04:12,480 --> 00:04:14,370 Because this is an IDE, 89 00:04:14,370 --> 00:04:19,370 you get a lot of features that you can read about online. 90 00:04:19,589 --> 00:04:23,460 So it might take you a while to get used to PyCharm, 91 00:04:23,460 --> 00:04:25,233 but it is a very powerful tool. 92 00:04:27,210 --> 00:04:29,280 Let's make this a little bit bigger. 93 00:04:29,280 --> 00:04:33,090 Now with myproject here, I can right click, 94 00:04:33,090 --> 00:04:35,973 say New, and then select File. 95 00:04:37,020 --> 00:04:41,283 Our file, we'll just call it hihi.py. 96 00:04:42,270 --> 00:04:43,143 Click OK. 97 00:04:44,640 --> 00:04:45,510 And there we go. 98 00:04:45,510 --> 00:04:48,360 We have our first file opened up, 99 00:04:48,360 --> 00:04:51,870 and we can just, once again, say print. 100 00:04:51,870 --> 00:04:54,330 Now, this is definitely way too small, 101 00:04:54,330 --> 00:04:57,450 so I'm going to go to PyCharm, Preferences, 102 00:04:57,450 --> 00:04:59,520 and here it gives you a ton of options 103 00:04:59,520 --> 00:05:02,490 to customize PyCharm to your liking. 104 00:05:02,490 --> 00:05:05,460 In my case, I wanna make sure that I use, 105 00:05:05,460 --> 00:05:06,960 let's say, custom font, 106 00:05:06,960 --> 00:05:08,940 but definitely increase the size to... 107 00:05:08,940 --> 00:05:10,170 Let's go with 18. 108 00:05:10,170 --> 00:05:11,003 How's that? 109 00:05:11,003 --> 00:05:11,836 Let's apply. 110 00:05:12,840 --> 00:05:13,673 That's better. 111 00:05:13,673 --> 00:05:15,660 You know what? I want it even bigger. 112 00:05:15,660 --> 00:05:17,460 Let's do 20. 113 00:05:17,460 --> 00:05:18,783 I'm gonna hit OK. 114 00:05:20,730 --> 00:05:23,190 All right, this side is now bigger. 115 00:05:23,190 --> 00:05:24,390 That's great, we can see it. 116 00:05:24,390 --> 00:05:27,480 But, hmm, this is still tiny, 117 00:05:27,480 --> 00:05:28,680 I want this a little bit bigger, 118 00:05:28,680 --> 00:05:30,480 so let's fix that as well. 119 00:05:30,480 --> 00:05:33,540 We can fix this easily by pressing Command 120 00:05:33,540 --> 00:05:37,320 and then using the mouse wheel if you have a mouse, 121 00:05:37,320 --> 00:05:42,320 or using two fingers and zooming in like so. 122 00:05:42,810 --> 00:05:44,820 If you're on a Windows machine, 123 00:05:44,820 --> 00:05:47,130 it'll be Control instead of Command, 124 00:05:47,130 --> 00:05:50,463 and just zooming in and out as you like. 125 00:05:51,330 --> 00:05:54,120 Now, the interesting thing here with PyCharm, 126 00:05:54,120 --> 00:05:56,100 I know we have a ton of things 127 00:05:56,100 --> 00:05:59,280 that we might not be familiar with right now, 128 00:05:59,280 --> 00:06:04,280 but the key thing is that Python 3.7 is running our project. 129 00:06:04,530 --> 00:06:08,763 And if we type something like print, heyhey, 130 00:06:10,200 --> 00:06:13,170 we get a ton of interesting things. 131 00:06:13,170 --> 00:06:17,197 First, we get a typo saying, 132 00:06:17,197 --> 00:06:21,390 "Hey, this whole heyhey is not an English word." 133 00:06:21,390 --> 00:06:23,430 If I add spaces, look at that. 134 00:06:23,430 --> 00:06:26,520 It even gives me typos of English words. 135 00:06:26,520 --> 00:06:30,150 But then I also have this yellow curly bracket, 136 00:06:30,150 --> 00:06:34,080 or squiggly line, and it tells me "PEP eight, 137 00:06:34,080 --> 00:06:36,270 no newline at the end of the file." 138 00:06:36,270 --> 00:06:38,520 This is something that we're gonna talk about shortly 139 00:06:38,520 --> 00:06:41,310 when we talk about formatting our code. 140 00:06:41,310 --> 00:06:43,200 But if I add a new line, 141 00:06:43,200 --> 00:06:46,020 look at that, everything is working smoothly, 142 00:06:46,020 --> 00:06:48,330 I get a nice little check mark. 143 00:06:48,330 --> 00:06:50,080 Now I can run this code 144 00:06:51,240 --> 00:06:55,290 by going to Run, and then clicking Run, 145 00:06:55,290 --> 00:06:58,380 and you can see the shortcut command here as well. 146 00:06:58,380 --> 00:07:00,487 If I Run this, it asks me, 147 00:07:00,487 --> 00:07:01,680 "Hey, what do you wanna Run?" 148 00:07:01,680 --> 00:07:05,160 Well, I wanna Run the new hihi Python file. 149 00:07:05,160 --> 00:07:06,360 I click on this. 150 00:07:06,360 --> 00:07:08,010 And look at that. 151 00:07:08,010 --> 00:07:09,870 Let's make this a little bit bigger. 152 00:07:09,870 --> 00:07:10,703 That's better. 153 00:07:12,240 --> 00:07:15,180 We see that our file is being run, 154 00:07:15,180 --> 00:07:17,370 the process finished with the exit code zero. 155 00:07:17,370 --> 00:07:18,360 Zero is a good sign. 156 00:07:18,360 --> 00:07:21,783 It means there were no errors and everything is great. 157 00:07:22,950 --> 00:07:24,630 Now, if we make an error here 158 00:07:24,630 --> 00:07:27,660 and let's say I miss my brackets and I hit Run, 159 00:07:27,660 --> 00:07:31,500 or I can just click on Run here, look at that. 160 00:07:31,500 --> 00:07:32,707 It gives me an error saying, 161 00:07:32,707 --> 00:07:34,353 "Hey, hey, hey, SyntaxError, 162 00:07:35,220 --> 00:07:37,890 unexpected EOF while parsing." 163 00:07:37,890 --> 00:07:39,750 And tells you something went wrong. 164 00:07:39,750 --> 00:07:42,180 So, once again, I can fix it, 165 00:07:42,180 --> 00:07:45,360 Run my code, and everything is good. 166 00:07:45,360 --> 00:07:46,740 There are a lot of features here 167 00:07:46,740 --> 00:07:50,550 that you can explore on your own, get comfortable with it. 168 00:07:50,550 --> 00:07:53,550 PyCharm is definitely a great IDE. 169 00:07:53,550 --> 00:07:55,950 And the beauty is that unlike Sublime Text 170 00:07:55,950 --> 00:07:59,100 or Visual Studio Code where we had to install 171 00:07:59,100 --> 00:08:00,630 all these packages, 172 00:08:00,630 --> 00:08:05,630 PyCharm comes, well, with everything built-in, it's an IDE. 173 00:08:06,450 --> 00:08:09,330 We don't have to install any of these packages. 174 00:08:09,330 --> 00:08:11,160 This environment is already set up 175 00:08:11,160 --> 00:08:13,770 for us to work professionally with Python 176 00:08:13,770 --> 00:08:17,370 because it is made for Python developers. 177 00:08:17,370 --> 00:08:19,270 I'll see you in the next one, bye-bye.