0 1 00:00:00,480 --> 00:00:06,400 Okaym so it's time to set up your computer and install the necessary software for this course. 1 2 00:00:06,720 --> 00:00:12,900 In this lesson I will show you how to install Python and configure your local environment so that way 2 3 00:00:12,960 --> 00:00:18,060 we don't have to rely on the trial environment on jupyter.org. 3 4 00:00:18,060 --> 00:00:22,290 I will show you how to install Python Anaconda on a Windows machine. 4 5 00:00:22,530 --> 00:00:25,130 So if you've got a Mac, skip to the next video. 5 6 00:00:25,950 --> 00:00:32,620 But before we begin, let me explain what Python Anaconda is and why we're downloading it. 6 7 00:00:32,880 --> 00:00:35,640 Anaconda is a Python distribution. 7 8 00:00:35,640 --> 00:00:41,250 And this means that Anaconda aims to provide everything you need for data science in one place. 8 9 00:00:41,250 --> 00:00:47,460 It's essentially a bundle of software and code that makes it easy for getting set up for data science 9 10 00:00:47,520 --> 00:00:49,150 and machine learning. 10 11 00:00:49,380 --> 00:00:54,930 For example, the Anaconda bundle already includes the Jupyter notebook so you don't have to separately 11 12 00:00:54,930 --> 00:01:02,180 download it and install it and it also includes tons and tons of Python packages and libraries that 12 13 00:01:02,180 --> 00:01:04,520 we'll be using in this course. 13 14 00:01:04,520 --> 00:01:06,440 What do I mean by libraries? 14 15 00:01:06,440 --> 00:01:13,820 Well, remember how we wrote "import pandas" or "import matplotlib" or "import scikit-learn" in our first 15 16 00:01:13,820 --> 00:01:15,040 project? 16 17 00:01:15,290 --> 00:01:21,740 Usually, you'd have to download all these packages one by one before you can use them in your project. 17 18 00:01:21,740 --> 00:01:28,160 But by downloading Anaconda we're going to be getting all these packages in one go. That way we don't 18 19 00:01:28,160 --> 00:01:30,610 have to worry about setup and configuration. 19 20 00:01:30,620 --> 00:01:34,320 Later on in the course one word of warning though, 20 21 00:01:34,400 --> 00:01:39,560 if you Google the word Anaconda you're probably not gonna get what you're looking for. 21 22 00:01:39,620 --> 00:01:47,030 You'll want to search "anaconda python" to find the continuum.io website or alternatively click on 22 23 00:01:47,030 --> 00:01:52,340 the link in the lessons resources to be directed directly to the download page. 23 24 00:01:52,340 --> 00:01:55,900 Now don't click the "Download" button just yet. 24 25 00:01:55,910 --> 00:02:02,690 First you have to do a very important check on your machine. Your laptop or your desktop computer will 25 26 00:02:02,690 --> 00:02:04,730 come in one of two flavors: 26 27 00:02:04,910 --> 00:02:10,910 tou will either have a 64 bit machine or a 32 bit machine. 27 28 00:02:10,910 --> 00:02:14,920 And here's how you check which flavor of computer you've got; 28 29 00:02:14,970 --> 00:02:22,140 you can go to your Control Panel and there, under "System type", you should see whether you've got a 32 29 30 00:02:22,140 --> 00:02:26,850 bit operating system or a 64 bit operating system. 30 31 00:02:26,850 --> 00:02:33,540 So, with that in mind, make a note of the type of processor and go back to the download page on continuum.io. 31 32 00:02:33,570 --> 00:02:39,840 Here you should see a big green "Download" button. Click on that big green "Download" button, 32 33 00:02:39,900 --> 00:02:47,550 only if you've got a 64 bit processor; if you've got a 32 bit machine, click on the link below. 33 34 00:02:47,580 --> 00:02:51,040 The thing about Python is it also comes in two flavors. 34 35 00:02:51,060 --> 00:02:56,630 We're going to go with the newer version of Python - Python 3. 35 36 00:02:57,270 --> 00:03:03,450 So, while Anaconda is downloading, this is a good time to go for a coffee or tea. After the download completes, 36 37 00:03:03,540 --> 00:03:05,920 you can start the installation. 37 38 00:03:06,120 --> 00:03:11,240 We're gonna be presented with one of those standard setup wizards, so we're going to click "Next". 38 39 00:03:11,310 --> 00:03:16,350 Then I'm gonna agree to the license agreement, we're probably signing away our first born child at this point, 39 40 00:03:16,410 --> 00:03:22,020 but on the next parts of the wizard I'm just gonna go with the recommended options, so I'm gonna say 40 41 00:03:22,320 --> 00:03:29,490 install for just myself and for the destination folder I'm also going to stick with the default. For 41 42 00:03:29,490 --> 00:03:30,840 the advanced options, 42 43 00:03:30,900 --> 00:03:35,310 I'm going to leave them as they are in the installer as well with the first one unticked and the second 43 44 00:03:35,310 --> 00:03:37,860 one ticked. Now, 44 45 00:03:37,900 --> 00:03:42,400 my computer actually isn't as fast as it appears to be because I'm speeding up the video here but this 45 46 00:03:42,670 --> 00:03:45,760 installation process actually takes a little while too. 46 47 00:03:45,930 --> 00:03:52,210 So just be patient, and after the installer finishes, just going to click "Finish". 47 48 00:03:52,210 --> 00:03:59,000 Now it's time to fire up Anaconda and the Jupyter notebook just to see if everything's working. Click 48 49 00:03:59,000 --> 00:04:05,750 on your Start menu and then go find the Anaconda command prompt. You should see a little black window 49 50 00:04:05,750 --> 00:04:16,640 like this appear, and in this window type "python --version" and here you should see the 50 51 00:04:16,700 --> 00:04:18,740 version of Python that you've installed. 51 52 00:04:18,740 --> 00:04:20,160 And as we've mentioned before, 52 53 00:04:20,300 --> 00:04:24,950 make sure the version of Python is 3.6 or higher. 53 54 00:04:24,950 --> 00:04:32,210 Now, it's very useful to have the Anaconda command prompt handy, so in your taskbar at the bottom right 54 55 00:04:32,210 --> 00:04:35,690 click and pin this program to the taskbar. 55 56 00:04:35,780 --> 00:04:40,660 That way you can fire up the Anaconda prompt very quickly. 56 57 00:04:41,000 --> 00:04:45,360 Next, let me show you how to start up your own Jupyter notebook. 57 58 00:04:46,360 --> 00:04:49,690 You can do that by simply typing "jupyter notebook" 58 59 00:04:49,690 --> 00:04:53,850 and hit Enter. 59 60 00:04:53,920 --> 00:05:01,070 Now give it a minute and you should see your browser firing up with the folder structure on your C drive. 60 61 00:05:01,370 --> 00:05:09,050 And when you click on "New", you should be able to start a new Python 3 notebook, so congratulations on 61 62 00:05:09,050 --> 00:05:10,280 getting that working. 62 63 00:05:10,490 --> 00:05:13,460 But starting up is only part of the equation. 63 64 00:05:13,510 --> 00:05:19,760 We also have to be able to shut this down properly. And to shut down open notebook, go to File > Close and 64 65 00:05:19,760 --> 00:05:25,330 Halt, and you can log out and close your browser window. 65 66 00:05:25,370 --> 00:05:33,230 But the important part is actually to terminate the notebook from the Anaconda command prompt and you 66 67 00:05:33,230 --> 00:05:36,350 need to do this with a keyboard shortcut. 67 68 00:05:36,350 --> 00:05:43,190 You can see here in the instructions it says "Use Control-C to stop this server and shut down all kernels 68 69 00:05:43,430 --> 00:05:52,290 (twice to skip confirmation).", so on your keyboard press Control+C twice, you should then see the messages 69 70 00:05:52,560 --> 00:05:59,350 "Interrupted...", "Shutting down kernels", and that's how you close out of Jupyter completely. 70 71 00:05:59,400 --> 00:06:05,870 Finally, let me show you all the components that were installed along side with Anaconda and to do that, 71 72 00:06:05,910 --> 00:06:09,060 let me show you the Anaconda Navigator. 72 73 00:06:09,060 --> 00:06:14,490 This is also an alternative way of firing up the Jupyter notebook - instead of going through the Anaconda 73 74 00:06:14,490 --> 00:06:17,380 prompt. After it finishes loading, 74 75 00:06:17,400 --> 00:06:20,540 you should see a window like this. From here, 75 76 00:06:20,580 --> 00:06:26,940 we can launch the Jupyter notebook, or the Spyder Python IDE or even RStudio. 76 77 00:06:26,970 --> 00:06:29,480 So congratulations on getting set up. 77 78 00:06:29,730 --> 00:06:36,850 If you have any problems or had any issues ask in the Q&A section for this lesson. I'll see you in 78 79 00:06:36,850 --> 00:06:38,640 the next videos.