WEBVTT 1 00:00:04.550 --> 00:00:06.050 In this video we're going to go ahead 2 00:00:06.050 --> 00:00:08.690 and download and install Python or 3 00:00:08.690 --> 00:00:10.910 rather get Python 3 working on this 4 00:00:10.910 --> 00:00:13.039 computer. Now we don't actually have to 5 00:00:13.039 --> 00:00:14.690 download and install anything on most 6 00:00:14.690 --> 00:00:16.760 Linux distros and that's because it 7 00:00:16.760 --> 00:00:18.890 normally comes pre-installed with both 8 00:00:18.890 --> 00:00:21.020 Python 2 which we won't be using in this 9 00:00:21.020 --> 00:00:23.660 course and the newer Python 3, so to 10 00:00:23.660 --> 00:00:25.340 confirm that till you've got python on 11 00:00:25.340 --> 00:00:27.680 your Linux distribution and I'm running 12 00:00:27.680 --> 00:00:29.539 a bunty Linux 16.04 in this 13 00:00:29.539 --> 00:00:31.760 example, just open a terminal or command 14 00:00:31.760 --> 00:00:33.610 window I'm going to click on terminal 15 00:00:33.610 --> 00:00:37.550 and so you can then type Python to see 16 00:00:37.550 --> 00:00:38.570 whether something comes up and you can 17 00:00:38.570 --> 00:00:39.800 see in my case I haven't actually 18 00:00:39.800 --> 00:00:42.410 installed anything but Python 2 was 19 00:00:42.410 --> 00:00:45.170 installed as a default program with this 20 00:00:45.170 --> 00:00:48.500 version of Ubuntu Linux. So version 2 as 21 00:00:48.500 --> 00:00:49.670 I mentioned isn't what we're going to be 22 00:00:49.670 --> 00:00:51.410 using in this course, so I'm going to do 23 00:00:51.410 --> 00:00:54.320 a ctrl D to exit out of that. The other 24 00:00:54.320 --> 00:00:55.940 thing we can check it is we can type 25 00:00:55.940 --> 00:00:58.010 Python and then the number 3 on the end 26 00:00:58.010 --> 00:01:01.010 without any spaces press enter and that 27 00:01:01.010 --> 00:01:02.840 also shows that we've got Python 3 28 00:01:02.840 --> 00:01:04.909 installed as well. So you can see there's 29 00:01:04.909 --> 00:01:07.430 two separate versions that are already installed 30 00:01:07.430 --> 00:01:10.280 meaning that unlike the Windows and Mac 31 00:01:10.280 --> 00:01:11.509 versions, we don't need to do any 32 00:01:11.509 --> 00:01:13.819 installation, we can use the version of 33 00:01:13.819 --> 00:01:16.520 Python that is already installed. 34 00:01:16.520 --> 00:01:18.560 Now Python does get updated and in fact if 35 00:01:18.560 --> 00:01:20.990 you went to the website right now for 36 00:01:20.990 --> 00:01:23.299 python.org, you'd see that the latest 37 00:01:23.299 --> 00:01:25.819 version is python 3 point six point two, 38 00:01:25.819 --> 00:01:27.889 so we've got a slightly older version 39 00:01:27.889 --> 00:01:29.600 but look it'll work just fine in this 40 00:01:29.600 --> 00:01:32.329 course and there's no sort of reason not 41 00:01:32.329 --> 00:01:35.090 to rush an upgrade and just a warning 42 00:01:35.090 --> 00:01:36.590 actually if you are thinking about doing 43 00:01:36.590 --> 00:01:38.779 that, be careful because python is 44 00:01:38.779 --> 00:01:41.689 heavily used within the GUI of many 45 00:01:41.689 --> 00:01:43.700 Linux distributions. So if you 46 00:01:43.700 --> 00:01:45.439 accidentally uninstalled Python or 47 00:01:45.439 --> 00:01:47.899 start you know installing different 48 00:01:47.899 --> 00:01:49.669 versions and so on and so forth you can 49 00:01:49.669 --> 00:01:51.649 get yourself into a situation where 50 00:01:51.649 --> 00:01:53.869 Linux won't boot or at least I won't 51 00:01:53.869 --> 00:01:55.340 have a GUI interface and that can be 52 00:01:55.340 --> 00:01:57.380 really difficult to recover from. So for 53 00:01:57.380 --> 00:01:59.329 that reason our recommendation is just 54 00:01:59.329 --> 00:02:02.090 to stick with the version of Python that 55 00:02:02.090 --> 00:02:04.520 is already in your Linux distribution, 56 00:02:04.520 --> 00:02:06.109 so long as it's three points something in 57 00:02:06.109 --> 00:02:08.030 my case you can see I've got three point 58 00:02:08.030 --> 00:02:10.099 five point two, we're actually good to go. 59 00:02:10.099 --> 00:02:12.290 Alright so I'm going to do a control d 60 00:02:12.290 --> 00:02:15.080 to get out of that, the other thing we 61 00:02:15.080 --> 00:02:17.540 need is something called idle which is 62 00:02:17.540 --> 00:02:18.380 an editor that 63 00:02:18.380 --> 00:02:19.760 we're going to be using at least early 64 00:02:19.760 --> 00:02:22.970 in the course to test some Python code 65 00:02:22.970 --> 00:02:25.880 out. So we can type in idle, 66 00:02:25.880 --> 00:02:28.670 idle and that doesn't work because it 67 00:02:28.670 --> 00:02:30.320 hasn't been installed and that would 68 00:02:30.320 --> 00:02:32.090 have been the older version that suits 69 00:02:32.090 --> 00:02:35.510 Python 2 and Python 3 would use something 70 00:02:35.510 --> 00:02:37.280 called idle 3 but you can see that's 71 00:02:37.280 --> 00:02:39.290 also not installed, so we need to go 72 00:02:39.290 --> 00:02:40.700 through the process of installing that 73 00:02:40.700 --> 00:02:43.070 for a Ubuntu Linux, so to do that I'm 74 00:02:43.070 --> 00:02:46.970 going to type in sudo apt - get a space 75 00:02:46.970 --> 00:02:48.770 between those two words space install 76 00:02:48.770 --> 00:02:54.950 space idle3 or idle3 press enter, 77 00:02:54.950 --> 00:03:01.330 I'm going to type my password, I can top it. 78 00:03:01.330 --> 00:03:04.520 Okay, so now go through and it's actually 79 00:03:04.520 --> 00:03:06.080 asked if I want to install it so I'm 80 00:03:06.080 --> 00:03:08.630 going to push yes or top y and press enter 81 00:03:08.630 --> 00:03:11.600 it's going to go ahead and install idle3 82 00:03:11.600 --> 00:03:13.760 for us and you'll be seeing how to use 83 00:03:13.760 --> 00:03:16.550 that program in the next video. Now it's 84 00:03:16.550 --> 00:03:18.110 complete as you can see there, so I can 85 00:03:18.110 --> 00:03:23.330 then just go ahead and type idle 3 and 86 00:03:23.330 --> 00:03:24.650 you can see that's now popped up a 87 00:03:24.650 --> 00:03:28.100 Python shell and within that window now 88 00:03:28.100 --> 00:03:29.900 we can start typing some Python commands 89 00:03:29.900 --> 00:03:31.970 but I'm going to finish the video here 90 00:03:31.970 --> 00:03:33.890 now. In the next video we'll go ahead and 91 00:03:33.890 --> 00:03:36.170 start using this Python shell to type in 92 00:03:36.170 --> 00:03:40.420 a few commands so see you in the next video.