WEBVTT 1 00:00:01.760 --> 00:00:03.980 in this video we're going to install the 2 00:00:03.980 --> 00:00:06.260 sql lite three command line shell for in this video we're going to install the 3 00:00:06.260 --> 00:00:08.900 Windows computers now if you're using a sql lite three command line shell for 4 00:00:08.900 --> 00:00:10.340 Mac or Linux machine Windows computers now if you're using a 5 00:00:10.340 --> 00:00:12.170 skip to the next video or the video Mac or Linux machine 6 00:00:12.170 --> 00:00:14.660 after that for your operating system but skip to the next video or the video 7 00:00:14.660 --> 00:00:15.950 if you're in Windows you're in the right after that for your operating system but 8 00:00:15.950 --> 00:00:19.010 place so let's make a start now python if you're in Windows you're in the right 9 00:00:19.010 --> 00:00:21.050 includes sqlite in its standard place so let's make a start now python 10 00:00:21.050 --> 00:00:23.030 library so we don't need to install includes sqlite in its standard 11 00:00:23.030 --> 00:00:24.710 anything to use sqlite in our Python library so we don't need to install 12 00:00:24.710 --> 00:00:28.070 programs now thing to keep in mind here anything to use sqlite in our Python 13 00:00:28.070 --> 00:00:29.810 that writing data base code programs now thing to keep in mind here 14 00:00:29.810 --> 00:00:31.640 straightaway isn't the easiest way to that writing data base code 15 00:00:31.640 --> 00:00:33.859 learn about sqlite and the sql straightaway isn't the easiest way to 16 00:00:33.859 --> 00:00:36.469 language so if you get errors you have to learn about sqlite and the sql 17 00:00:36.469 --> 00:00:38.899 work out if it's the error or the errors language so if you get errors you have to 18 00:00:38.899 --> 00:00:41.510 in your python code or in the sql work out if it's the error or the errors 19 00:00:41.510 --> 00:00:44.239 statement that you've used so what we're in your python code or in the sql 20 00:00:44.239 --> 00:00:46.039 going to do to start is we're going to statement that you've used so what we're 21 00:00:46.039 --> 00:00:48.379 start by installing the sqlite command line going to do to start is we're going to 22 00:00:48.379 --> 00:00:51.019 shell so that we can create databases start by installing the sqlite command line 23 00:00:51.019 --> 00:00:52.819 and use sql commands without having shell so that we can create databases 24 00:00:52.819 --> 00:00:55.219 to worry about Python code yet on and use sql commands without having 25 00:00:55.219 --> 00:00:57.019 Windows the sqlite command-line to worry about Python code yet on 26 00:00:57.019 --> 00:00:59.809 shell is an executable file called sql Windows the sqlite command-line 27 00:00:59.809 --> 00:01:03.499 light three dot exe unfortunately this shell is an executable file called sql 28 00:01:03.499 --> 00:01:05.870 isn't included with python so this video light three dot exe unfortunately this 29 00:01:05.870 --> 00:01:07.610 we're going to see how to download that isn't included with python so this video 30 00:01:07.610 --> 00:01:09.350 executable and add it to our computers we're going to see how to download that 31 00:01:09.350 --> 00:01:11.180 path so that we can use it executable and add it to our computers 32 00:01:11.180 --> 00:01:13.070 first things first we're going to go to path so that we can use it 33 00:01:13.070 --> 00:01:21.470 the sqlite website....and first things first we're going to go to 34 00:01:21.470 --> 00:01:22.760 you can see at the top we get there there's the sqlite website....and 35 00:01:22.760 --> 00:01:24.170 a download link so i'm going to click on you can see at the top we get there there's 36 00:01:24.170 --> 00:01:27.740 that now there is actually an installer a download link so i'm going to click on 37 00:01:27.740 --> 00:01:29.300 for sqlite instead it's packaged that now there is actually an installer 38 00:01:29.300 --> 00:01:31.940 into a number of zip files now I mention for sqlite instead it's packaged 39 00:01:31.940 --> 00:01:33.830 that sqlite is included in the standard into a number of zip files now I mention 40 00:01:33.830 --> 00:01:36.380 Python libraries so consequently we that sqlite is included in the standard 41 00:01:36.380 --> 00:01:37.700 don't need to install sqlite Python libraries so consequently we 42 00:01:37.700 --> 00:01:40.730 itself the file we want actually is a don't need to install sqlite 43 00:01:40.730 --> 00:01:43.010 bundle up command line tools for managing itself the file we want actually is a 44 00:01:43.010 --> 00:01:44.930 sql li like databases you can see we've bundle up command line tools for managing 45 00:01:44.930 --> 00:01:46.460 got one here we've got a osx version sql li like databases you can see we've 46 00:01:46.460 --> 00:01:48.560 there and down here we've got a windows got one here we've got a osx version 47 00:01:48.560 --> 00:01:50.659 version here a bundle of command line there and down here we've got a windows 48 00:01:50.659 --> 00:01:52.220 tools for managing sqlite databases version here a bundle of command line 49 00:01:52.220 --> 00:01:54.200 i'm going to click on that link now tools for managing sqlite databases 50 00:01:54.200 --> 00:01:56.450 bearing in mind when you're i'm going to click on that link now 51 00:01:56.450 --> 00:01:57.890 watching this video the version number bearing in mind when you're 52 00:01:57.890 --> 00:02:00.350 may have changed but that's alright if watching this video the version number 53 00:02:00.350 --> 00:02:01.880 it's a later version and click on that may have changed but that's alright if 54 00:02:01.880 --> 00:02:05.390 one and leave that downloading it's it's a later version and click on that 55 00:02:05.390 --> 00:02:06.560 actually finished it was quite a quick one and leave that downloading it's 56 00:02:06.560 --> 00:02:09.080 download I do notice that the description actually finished it was quite a quick 57 00:02:09.080 --> 00:02:11.689 for this file includes links to the download I do notice that the description 58 00:02:11.689 --> 00:02:14.180 three executables over here we've got for this file includes links to the 59 00:02:14.180 --> 00:02:15.380 the command line shell three executables over here we've got 60 00:02:15.380 --> 00:02:17.780 sql diff .exe and sqlite analyzer the command line shell 61 00:02:17.780 --> 00:02:20.600 dot exe I suggest you bookmark sql diff .exe and sqlite analyzer 62 00:02:20.600 --> 00:02:22.220 this page so that you can come back here dot exe I suggest you bookmark 63 00:02:22.220 --> 00:02:23.480 and check those links and in the future this page so that you can come back here 64 00:02:23.480 --> 00:02:26.210 but the tool we need at the moment is the and check those links and in the future 65 00:02:26.210 --> 00:02:28.490 Command line shell so what we need to do is but the tool we need at the moment is the 66 00:02:28.490 --> 00:02:30.140 extract the contents of the zip file to Command line shell so what we need to do is 67 00:02:30.140 --> 00:02:31.610 a suitable directory and then add that extract the contents of the zip file to 68 00:02:31.610 --> 00:02:33.830 directory to our path i'm going to do is a suitable directory and then add that 69 00:02:33.830 --> 00:02:36.290 just go to the folder where that is directory to our path i'm going to do is 70 00:02:36.290 --> 00:02:38.360 sqlite was opened and you can just go to the folder where that is 71 00:02:38.360 --> 00:02:39.530 see that I've actually got sqlite tools sqlite was opened and you can 72 00:02:39.530 --> 00:02:42.170 there so I'm just going to extract see that I've actually got sqlite tools 73 00:02:42.170 --> 00:02:44.270 all extracted currently in that current there so I'm just going to extract 74 00:02:44.270 --> 00:02:47.030 path for now it's quite quick because all extracted currently in that current 75 00:02:47.030 --> 00:02:49.370 its only a small file what I'm going to path for now it's quite quick because 76 00:02:49.370 --> 00:02:50.780 do now we're going to move these its only a small file what I'm going to 77 00:02:50.780 --> 00:02:52.130 I'm going to right-click that the do now we're going to move these 78 00:02:52.130 --> 00:02:54.710 folder that was extracted ok so I'm I'm going to right-click that the 79 00:02:54.710 --> 00:02:55.850 going to cut that folder and then what folder that was extracted ok so I'm 80 00:02:55.850 --> 00:02:56.960 i'm going to do i'm actually going to going to cut that folder and then what 81 00:02:56.960 --> 00:03:00.620 put this in my users like sort of main i'm going to do i'm actually going to 82 00:03:00.620 --> 00:03:02.540 home folder that you can put this in the put this in my users like sort of main 83 00:03:02.540 --> 00:03:04.370 program files directory or somewhere home folder that you can put this in the 84 00:03:04.370 --> 00:03:06.560 else doesn't really matter but for program files directory or somewhere 85 00:03:06.560 --> 00:03:07.970 simplicity what i'm going to do is just else doesn't really matter but for 86 00:03:07.970 --> 00:03:11.900 go to my local disk into my users and simplicity what i'm going to do is just 87 00:03:11.900 --> 00:03:13.280 Tim which is the folder that I'm go to my local disk into my users and 88 00:03:13.280 --> 00:03:14.510 gonna put it I'm going to actually save Tim which is the folder that I'm 89 00:03:14.510 --> 00:03:16.190 it in there but again the choice is gonna put it I'm going to actually save 90 00:03:16.190 --> 00:03:17.480 yours to where you want to save it so it in there but again the choice is 91 00:03:17.480 --> 00:03:19.670 i'm going to right click and do paste to yours to where you want to save it so 92 00:03:19.670 --> 00:03:21.920 put in it and that's now the folder i'm going to right click and do paste to 93 00:03:21.920 --> 00:03:24.620 I moved over and we double-click put in it and that's now the folder 94 00:03:24.620 --> 00:03:27.860 it now to open the folder what we can do I moved over and we double-click 95 00:03:27.860 --> 00:03:29.750 up here is we can actually come up here it now to open the folder what we can do 96 00:03:29.750 --> 00:03:31.610 and click the address bar and up here is we can actually come up here 97 00:03:31.610 --> 00:03:33.770 then click on control c that's and click the address bar and 98 00:03:33.770 --> 00:03:35.330 actually gonna take a copy of the path then click on control c that's 99 00:03:35.330 --> 00:03:37.340 which we can use to actually update the actually gonna take a copy of the path 100 00:03:37.340 --> 00:03:39.470 path on the computer now the which we can use to actually update the 101 00:03:39.470 --> 00:03:41.840 instructions to set the path start off path on the computer now the 102 00:03:41.840 --> 00:03:44.060 slightly differently depending on which instructions to set the path start off 103 00:03:44.060 --> 00:03:45.709 version of windows that you're slightly differently depending on which 104 00:03:45.709 --> 00:03:48.530 using i'm using Windows 10 here and if version of windows that you're 105 00:03:48.530 --> 00:03:49.970 your keyboards got a using i'm using Windows 10 here and if 106 00:03:49.970 --> 00:03:52.340 Windows key the quickest way for all your keyboards got a 107 00:03:52.340 --> 00:03:54.350 versions of windows is to use windows Windows key the quickest way for all 108 00:03:54.350 --> 00:03:56.270 and pause i hold down the windows key versions of windows is to use windows 109 00:03:56.270 --> 00:03:57.830 press pause which I'm going to do or and pause i hold down the windows key 110 00:03:57.830 --> 00:04:00.230 click pause that brings up this window press pause which I'm going to do or 111 00:04:00.230 --> 00:04:02.450 here otherwise we just need to navigate click pause that brings up this window 112 00:04:02.450 --> 00:04:05.060 to the control panel system and security here otherwise we just need to navigate 113 00:04:05.060 --> 00:04:07.280 and system on your version of windows to the control panel system and security 114 00:04:07.280 --> 00:04:09.770 to get access to it and then from here and system on your version of windows 115 00:04:09.770 --> 00:04:11.660 we can actually click on the advanced to get access to it and then from here 116 00:04:11.660 --> 00:04:13.520 system settings on the left i'm going we can actually click on the advanced 117 00:04:13.520 --> 00:04:16.100 to click on that that takes you to the system settings on the left i'm going 118 00:04:16.100 --> 00:04:18.950 system properties dialog which is where to click on that that takes you to the 119 00:04:18.950 --> 00:04:20.720 all other windows version should system properties dialog which is where 120 00:04:20.720 --> 00:04:22.760 already be so basically a couple of ways all other windows version should 121 00:04:22.760 --> 00:04:24.110 to get there but the bottom line is you already be so basically a couple of ways 122 00:04:24.110 --> 00:04:25.970 want to get to this location and from to get there but the bottom line is you 123 00:04:25.970 --> 00:04:28.040 here what we want to do is click on want to get to this location and from 124 00:04:28.040 --> 00:04:28.700 environment here what we want to do is click on 125 00:04:28.700 --> 00:04:32.030 variables and just a quick note that if environment 126 00:04:32.030 --> 00:04:33.470 for some reason you couldn't get there variables and just a quick note that if 127 00:04:33.470 --> 00:04:35.510 with the windows key you can actually for some reason you couldn't get there 128 00:04:35.510 --> 00:04:37.580 just a right click the my computer icon with the windows key you can actually 129 00:04:37.580 --> 00:04:38.960 on your desktop and choose properties just a right click the my computer icon 130 00:04:38.960 --> 00:04:41.060 and you there as well on your desktop and choose properties 131 00:04:41.060 --> 00:04:43.280 alright so we're actually here now and and you there as well 132 00:04:43.280 --> 00:04:45.530 what we want to do is come down here to alright so we're actually here now and 133 00:04:45.530 --> 00:04:48.920 where it's got the edit button are what we want to do is come down here to 134 00:04:48.920 --> 00:04:50.600 making sure that path is selected over where it's got the edit button are 135 00:04:50.600 --> 00:04:52.910 here under user variables unless you making sure that path is selected over 136 00:04:52.910 --> 00:04:55.490 really comfortable with doing this leave here under user variables unless you 137 00:04:55.490 --> 00:04:57.170 the system variable section down here at really comfortable with doing this leave 138 00:04:57.170 --> 00:04:59.240 the bottom completely alone if you mess the system variable section down here at 139 00:04:59.240 --> 00:05:01.190 up the system path variables it can be the bottom completely alone if you mess 140 00:05:01.190 --> 00:05:02.330 really quite difficult to recover up the system path variables it can be 141 00:05:02.330 --> 00:05:04.250 windows so you can get into difficulty really quite difficult to recover 142 00:05:04.250 --> 00:05:06.830 so just you don't touch that area but windows so you can get into difficulty 143 00:05:06.830 --> 00:05:08.390 under the user variable their may or may not so just you don't touch that area but 144 00:05:08.390 --> 00:05:10.670 already be a path variable as you can under the user variable their may or may not 145 00:05:10.670 --> 00:05:12.770 see here in my case it already exists already be a path variable as you can 146 00:05:12.770 --> 00:05:13.820 and I actually got my python see here in my case it already exists 147 00:05:13.820 --> 00:05:16.250 installation actually in the path but if and I actually got my python 148 00:05:16.250 --> 00:05:17.600 you're not there installation actually in the path but if 149 00:05:17.600 --> 00:05:19.310 you don't see a path variable you click you're not there 150 00:05:19.310 --> 00:05:22.640 on new and you actually specify the you don't see a path variable you click 151 00:05:22.640 --> 00:05:24.620 pathnames as path the word path and then on new and you actually specify the 152 00:05:24.620 --> 00:05:26.090 you type in the value or paste in the pathnames as path the word path and then 153 00:05:26.090 --> 00:05:28.400 value right here so put those details in you type in the value or paste in the 154 00:05:28.400 --> 00:05:30.080 but in my case because the path already value right here so put those details in 155 00:05:30.080 --> 00:05:32.960 exists i'm going to click on edit so but in my case because the path already 156 00:05:32.960 --> 00:05:35.480 select path click on edit and what we're exists i'm going to click on edit so 157 00:05:35.480 --> 00:05:37.580 going to do now is actually add the path select path click on edit and what we're 158 00:05:37.580 --> 00:05:39.890 now this is actually showing a new path going to do now is actually add the path 159 00:05:39.890 --> 00:05:42.680 variable being created on Windows 10 if now this is actually showing a new path 160 00:05:42.680 --> 00:05:44.420 your editing an existing path variable variable being created on Windows 10 if 161 00:05:44.420 --> 00:05:46.010 leave the name unchange just add a your editing an existing path variable 162 00:05:46.010 --> 00:05:47.960 semicolon to the end of the previous leave the name unchange just add a 163 00:05:47.960 --> 00:05:50.120 value as a couple of ways of doing it semicolon to the end of the previous 164 00:05:50.120 --> 00:05:52.430 but this is the new way on Windows 10 value as a couple of ways of doing it 165 00:05:52.430 --> 00:05:53.630 where you click on new but this is the new way on Windows 10 166 00:05:53.630 --> 00:05:57.230 just actually paste in the value their where you click on new 167 00:05:57.230 --> 00:05:59.120 for some reason the control just actually paste in the value their 168 00:05:59.120 --> 00:06:01.250 c didn't work so just for some reason the control 169 00:06:01.250 --> 00:06:05.330 get back to the Explorer again i can c didn't work so just 170 00:06:05.330 --> 00:06:06.440 actually just going to their we can make get back to the Explorer again i can 171 00:06:06.440 --> 00:06:07.760 sure that that's actually showing like actually just going to their we can make 172 00:06:07.760 --> 00:06:09.230 that I think that is what I did last time will sure that that's actually showing like 173 00:06:09.230 --> 00:06:11.780 control c their or right-click that I think that is what I did last time will 174 00:06:11.780 --> 00:06:13.160 and do a copy for want to that way to control c their or right-click 175 00:06:13.160 --> 00:06:15.950 copy that entire path and if I go back now and do a copy for want to that way to 176 00:06:15.950 --> 00:06:18.590 to the system environment variables area copy that entire path and if I go back now 177 00:06:18.590 --> 00:06:22.010 click on new I can paste that in and to the system environment variables area 178 00:06:22.010 --> 00:06:23.690 that's now that variable that's been click on new I can paste that in and 179 00:06:23.690 --> 00:06:25.850 added so either way whether you've got that's now that variable that's been 180 00:06:25.850 --> 00:06:27.350 the option to do it this way we've got added so either way whether you've got 181 00:06:27.350 --> 00:06:29.750 an older way may just be shown the entire the option to do it this way we've got 182 00:06:29.750 --> 00:06:31.430 path got the old way an older way may just be shown the entire 183 00:06:31.430 --> 00:06:34.610 go to the end the end of the paths path got the old way 184 00:06:34.610 --> 00:06:36.590 settings that the various paths the go to the end the end of the paths 185 00:06:36.590 --> 00:06:39.110 defined on your system put a semicolon there and settings that the various paths the 186 00:06:39.110 --> 00:06:40.460 paste in the values but in this case defined on your system put a semicolon there and 187 00:06:40.460 --> 00:06:42.270 this is a new way that Windows 10 does it paste in the values but in this case 188 00:06:42.270 --> 00:06:44.130 you just select new and you enter another this is a new way that Windows 10 does it 189 00:06:44.130 --> 00:06:47.190 values there click on ok and what's you just select new and you enter another 190 00:06:47.190 --> 00:06:49.440 happened now is that Windows 10 has values there click on ok and what's 191 00:06:49.440 --> 00:06:51.000 actually updated our environment variable happened now is that Windows 10 has 192 00:06:51.000 --> 00:06:54.060 so click okay close it down i can click on ok actually updated our environment variable 193 00:06:54.060 --> 00:06:56.850 their alright at that point the path now so click okay close it down i can click on ok 194 00:06:56.850 --> 00:06:58.860 been set so what we can do now is check their alright at that point the path now 195 00:06:58.860 --> 00:07:00.690 that the sqlite command line shell is been set so what we can do now is check 196 00:07:00.690 --> 00:07:03.120 working the easiest way to do that is that the sqlite command line shell is 197 00:07:03.120 --> 00:07:05.640 just to come down to here you can either working the easiest way to do that is 198 00:07:05.640 --> 00:07:08.670 just type it if it's under Windows 10 type just to come down to here you can either 199 00:07:08.670 --> 00:07:12.180 CMD alternatively you can actually click just type it if it's under Windows 10 type 200 00:07:12.180 --> 00:07:13.680 on the right click on the windows CMD alternatively you can actually click 201 00:07:13.680 --> 00:07:17.160 startup image down here right click on the right click on the windows 202 00:07:17.160 --> 00:07:18.990 and select run and the type cmd startup image down here right click 203 00:07:18.990 --> 00:07:20.220 either way you get to the command line and select run and the type cmd 204 00:07:20.220 --> 00:07:21.630 prompt block like you can see the screen either way you get to the command line 205 00:07:21.630 --> 00:07:23.460 there and what we can do now is type... prompt block like you can see the screen 206 00:07:23.460 --> 00:07:26.910 ...just to verify that sqlite 3 there and what we can do now is type... 207 00:07:26.910 --> 00:07:28.860 is working and you can see that ...just to verify that sqlite 3 208 00:07:28.860 --> 00:07:30.720 is actually working actually came is working and you can see that 209 00:07:30.720 --> 00:07:32.640 up and started up for us and that's good is actually working actually came 210 00:07:32.640 --> 00:07:34.440 and as we can see that the things up and started up for us and that's good 211 00:07:34.440 --> 00:07:37.050 are working nicely and keep in mind you and as we can see that the things 212 00:07:37.050 --> 00:07:38.970 may see a slightly different version are working nicely and keep in mind you 213 00:07:38.970 --> 00:07:41.010 number showing on the screen to what I got here may see a slightly different version 214 00:07:41.010 --> 00:07:42.450 but that's ok so long as it number showing on the screen to what I got here 215 00:07:42.450 --> 00:07:43.530 actually works but that's ok so long as it 216 00:07:43.530 --> 00:07:45.630 it means it's the sqlite command actually works 217 00:07:45.630 --> 00:07:48.090 line shell is ready to go we can it means it's the sqlite command 218 00:07:48.090 --> 00:07:49.980 start using that in future videos line shell is ready to go we can 219 00:07:49.980 --> 00:07:53.160 alright so type in....to get out of start using that in future videos 220 00:07:53.160 --> 00:07:55.980 sqlite three and type exit to close down alright so type in....to get out of 221 00:07:55.980 --> 00:07:58.110 the command prompt window and at this point sqlite three and type exit to close down 222 00:07:58.110 --> 00:07:59.610 your good to go sqlite three is the command prompt window and at this point 223 00:07:59.610 --> 00:08:02.880 installed on your Windows machine unless your good to go sqlite three is 224 00:08:02.880 --> 00:08:04.770 you've got a mac and a linux machine installed on your Windows machine unless 225 00:08:04.770 --> 00:08:06.540 also you can actually skip the next two you've got a mac and a linux machine 226 00:08:06.540 --> 00:08:08.580 videos and move on to start where we also you can actually skip the next two 227 00:08:08.580 --> 00:08:10.890 actually start using sqlite3 i'll videos and move on to start where we 228 00:08:10.890 --> 00:08:16.820 see you in the next video actually start using sqlite3 i'll