1
00:00:00,210 --> 00:00:01,510
I have a question for you.

2
00:00:01,530 --> 00:00:07,600
What if you wanted to give your program to another person so they can use your program?

3
00:00:07,620 --> 00:00:09,530
What would you give to them?

4
00:00:09,540 --> 00:00:12,330
Well, you could give the P file.

5
00:00:12,330 --> 00:00:19,470
And the problem is that they need Python installed on their computer to be able to run the program,

6
00:00:19,470 --> 00:00:21,630
and that's not the best user experience.

7
00:00:21,630 --> 00:00:28,260
So as you might know, normally we get executable files for apps that we use daily.

8
00:00:28,260 --> 00:00:35,250
So these are standalone executables and it doesn't matter what programming language was used to write

9
00:00:35,250 --> 00:00:35,970
that app.

10
00:00:35,970 --> 00:00:39,180
The app will work in any computer.

11
00:00:39,180 --> 00:00:46,410
So in this video I want to show you how to convert your Python scripts, your Python programs into stand

12
00:00:46,410 --> 00:00:51,650
alone executables which can run on Windows, Mac and Linux.

13
00:00:51,660 --> 00:00:56,460
So before we begin, we want to make sure that the program is working well.

14
00:00:56,460 --> 00:01:01,590
So maybe try to run the program and see if there are errors.

15
00:01:01,590 --> 00:01:04,370
If there are no errors, then we're good to go.

16
00:01:04,379 --> 00:01:10,860
However, there is something we need to think about and that is the external file that we have, which

17
00:01:10,860 --> 00:01:11,490
is to dos.

18
00:01:11,490 --> 00:01:12,540
That txt.

19
00:01:12,660 --> 00:01:20,910
The way we use this program is that this program is dependent on this to dos that zip file.

20
00:01:20,910 --> 00:01:24,930
So if the file does not exist.

21
00:01:24,930 --> 00:01:27,810
So if we delete the file now.

22
00:01:31,340 --> 00:01:33,200
And if we run the program.

23
00:01:36,360 --> 00:01:37,770
We're going to get an error.

24
00:01:38,220 --> 00:01:43,290
No such file or directory in functions that p y in here.

25
00:01:43,320 --> 00:01:47,000
So the program is fragile at this point.

26
00:01:47,010 --> 00:01:52,860
We need to change the program so that the program is able to generate that file.

27
00:01:52,860 --> 00:01:58,320
If that file does not exist initially, we can very easily do that.

28
00:01:58,320 --> 00:02:09,300
So go to P wine import OS, which is a standard library and then I'm going to use the OS library here.

29
00:02:09,300 --> 00:02:16,920
But first let me let me make you a demo in the Python console about OS.

30
00:02:16,920 --> 00:02:28,020
So if I import OS, then what I'm trying to use here is always that path that exists and inside here

31
00:02:28,050 --> 00:02:30,750
goes the path to the file.

32
00:02:30,750 --> 00:02:32,790
You want to check if it exists.

33
00:02:32,790 --> 00:02:34,950
So if I execute that, I get false.

34
00:02:34,950 --> 00:02:38,460
When the file does not exist if the file existed.

35
00:02:38,460 --> 00:02:42,960
So to dos that text is not here at the moment in the project directory.

36
00:02:42,960 --> 00:02:44,460
That's why we get false.

37
00:02:44,460 --> 00:02:48,120
If it was if it existed, we would get true.

38
00:02:48,150 --> 00:02:57,630
We can make use of that and say here, if not always, that path that exists to dos that text.

39
00:02:57,660 --> 00:03:01,050
So that's a conditional and if conditional.

40
00:03:01,050 --> 00:03:05,760
BLOCK And we are saying here basically the negation of that.

41
00:03:05,760 --> 00:03:12,570
So if the file does not exist, then we're going to create that to that file.

42
00:03:12,570 --> 00:03:24,120
So with open to dos in right mode as file and you can just say pass here, we don't want to write anything

43
00:03:24,420 --> 00:03:25,130
to do that.

44
00:03:25,140 --> 00:03:25,770
TXT.

45
00:03:25,770 --> 00:03:30,180
So pass is a statement which basically does nothing.

46
00:03:30,180 --> 00:03:35,430
However, we have to write here something because the syntax requires that.

47
00:03:35,430 --> 00:03:41,040
So the syntax of the with context manager requires that something should come in this line here.

48
00:03:41,040 --> 00:03:48,750
So with this line now if I run the script and to dos the txt file is not there, then to do that txt

49
00:03:48,750 --> 00:03:50,970
file is going to be created.

50
00:03:50,970 --> 00:03:55,520
So you see now it's there to dos that TXT boards.

51
00:03:55,530 --> 00:04:00,900
If you run the program for a second time, the file will not be overwritten.

52
00:04:00,900 --> 00:04:07,950
So basically this will not happen and that means that this will not be executed when the file already

53
00:04:07,950 --> 00:04:08,520
exists.

54
00:04:08,520 --> 00:04:12,090
So that means when the user will run the standalone executable.

55
00:04:12,090 --> 00:04:17,790
Only the first time they ran the program, the file will be generated, then the file will be there.

56
00:04:17,790 --> 00:04:21,420
With that, we're ready to create executable files.

57
00:04:21,420 --> 00:04:28,200
Now the process is different on Windows, Mac and Linux, and if you want to create an executable for

58
00:04:28,200 --> 00:04:30,960
Windows, you need to have a Windows computer.

59
00:04:30,960 --> 00:04:34,410
The same goes for Mac and Linux respectively.

60
00:04:34,500 --> 00:04:40,710
Therefore, now I'm going to start the process of creating the standalone executable on Windows.

61
00:04:40,710 --> 00:04:45,360
So if you are on Mac, you can skip and you can jump to minute.

62
00:04:46,200 --> 00:04:49,710
If you are on Linux, you can go to minute.

63
00:04:51,940 --> 00:04:54,670
So, Windows users, let's start.

64
00:04:58,780 --> 00:05:06,040
Now, before we continue, we want to make sure that when you open the terminal empire charm somewhere

65
00:05:06,160 --> 00:05:13,300
in here, it should say then in parentheses, in my case, I get this error.

66
00:05:14,250 --> 00:05:17,800
So something is not working right and to fix that.

67
00:05:17,820 --> 00:05:26,820
So if you get this error as well and you don't get that valve, you need to say set dash execution policy.

68
00:05:28,840 --> 00:05:31,700
So set execution policy.

69
00:05:31,720 --> 00:05:38,230
Remote site with with a scope for the current user.

70
00:05:39,430 --> 00:05:43,300
Press enter and then you want to close the terminal.

71
00:05:47,730 --> 00:05:48,990
Open the terminal again.

72
00:05:48,990 --> 00:05:51,200
And now I get this van here.

73
00:05:51,210 --> 00:05:53,940
So now we can go ahead with the next steps.

74
00:05:54,660 --> 00:05:59,280
The next step is to install a third party library.

75
00:05:59,940 --> 00:06:09,210
You can use PIP install PA installer or I would recommend if you are on porch or you can just go to

76
00:06:09,210 --> 00:06:14,760
python packages here and search for p y installer in that box.

77
00:06:14,760 --> 00:06:19,710
Click on PA installer in the list here and then go here on the right and press on install.

78
00:06:19,710 --> 00:06:29,970
So Pie installer is a third party package just like PA simple guy, but pa simple GUI is used to create

79
00:06:29,970 --> 00:06:37,230
graphical user interfaces and PA installer is used to create executable files that X files.

80
00:06:37,230 --> 00:06:45,030
Once you install PA installer, you can minimize the python packages pane and go to the terminal again.

81
00:06:46,290 --> 00:06:53,370
And now we want to run the command which will generate that executable file and that is PA installer.

82
00:06:54,300 --> 00:06:57,570
So we are in the terminal, not in the Python console.

83
00:06:57,960 --> 00:06:59,700
This is not Python code.

84
00:06:59,700 --> 00:07:04,620
This is a series of commands for the Windows operating system.

85
00:07:04,620 --> 00:07:14,310
So this would be PA installer, one file, so dash, dash, one file, space dash dash, windowed space

86
00:07:14,310 --> 00:07:16,350
dash, dash, clean.

87
00:07:16,350 --> 00:07:25,230
And lastly, you want to specify here gooey that pie or whatever name your main python script has.

88
00:07:25,230 --> 00:07:28,530
So that is the script which you execute usually.

89
00:07:28,650 --> 00:07:32,940
So usually I do run gooey, which is gooey dot pie.

90
00:07:32,940 --> 00:07:37,560
So that's the script there, PA installer is the library.

91
00:07:37,560 --> 00:07:44,340
So we want to run that library through the command line here and these are the parameters we give to

92
00:07:44,340 --> 00:07:45,630
that command.

93
00:07:45,630 --> 00:07:53,820
One file means it will create one single executable file instead of creating several distributed files,

94
00:07:53,820 --> 00:08:00,030
and this is going to avoid having a command line generated.

95
00:08:00,030 --> 00:08:07,410
So usually if you don't supply this argument, then what you get is that the gooey that we have created,

96
00:08:07,410 --> 00:08:13,260
but also a command line, we don't want that for the user, so they just want to see the gooey.

97
00:08:13,260 --> 00:08:21,900
And lastly, clean means that if we generated the file the executable before now, this clean will override

98
00:08:21,900 --> 00:08:22,890
that executable.

99
00:08:22,890 --> 00:08:29,010
So even though this is not needed the first time we run it, it's a good practice to use clean there.

100
00:08:29,010 --> 00:08:35,520
Otherwise the next time you you execute this, the previous executable file that was generated will

101
00:08:35,520 --> 00:08:38,490
not be overwritten and that can confuse you.

102
00:08:38,490 --> 00:08:39,690
So press enter.

103
00:08:41,400 --> 00:08:47,910
And this might take a while until PA installer creates the executable file.

104
00:08:48,330 --> 00:08:52,800
Now the executable file is going to be created in the project directory.

105
00:08:54,540 --> 00:09:03,150
And you can see on my project directory that I have this built and dist created just now.

106
00:09:03,240 --> 00:09:05,820
And yet it's finished on my system.

107
00:09:05,820 --> 00:09:08,860
So building exit completed successfully.

108
00:09:08,880 --> 00:09:16,560
Now I want to right click over this dist folder and go to open in Explorer.

109
00:09:17,990 --> 00:09:20,450
So that's my project directory.

110
00:09:20,960 --> 00:09:29,300
If I double click over dist here, we're going to see this gooey file and that is an executable file

111
00:09:29,300 --> 00:09:30,660
that a file.

112
00:09:30,680 --> 00:09:35,060
So if we double click that and that's the program.

113
00:09:35,270 --> 00:09:44,900
Now it also has this to dos file in here which had that string, but you can delete that and you can

114
00:09:44,900 --> 00:09:49,360
give users only the gooey file.

115
00:09:49,370 --> 00:09:50,900
So if I run this now.

116
00:09:51,770 --> 00:09:59,320
You'll see that this creates a fresh to dos that txt file in the current directory.

117
00:09:59,330 --> 00:10:05,870
So if I add now to DOS to do one press on add to the one is added there.

118
00:10:05,870 --> 00:10:10,040
If I close the program with exit, I open it again.

119
00:10:10,040 --> 00:10:18,410
The two dos are there, so that executable file is using that as its database to store the data so you

120
00:10:18,410 --> 00:10:21,860
can give the entire disk folder to the users.

121
00:10:22,340 --> 00:10:30,500
These are the files do have some extra information about the production of this executable file, but

122
00:10:30,500 --> 00:10:33,200
you don't need to to give them to other people.

123
00:10:33,200 --> 00:10:37,700
So just give them the this folder or only the gooey file.

124
00:10:38,870 --> 00:10:42,830
And that was how to create an executable file on windows.

125
00:10:43,490 --> 00:10:49,760
Next, I'm going to cover how to create a standalone executable file for Mac computers.

126
00:10:49,760 --> 00:10:55,070
So that would be a dot app file which runs on Mac computers.

127
00:10:55,070 --> 00:10:56,720
So that's an application file.

128
00:10:56,720 --> 00:11:04,910
Let's begin to convert your Python program into a standalone executable that runs on a mac computer.

129
00:11:04,910 --> 00:11:07,730
We need to use a third party software.

130
00:11:07,730 --> 00:11:13,940
There are several options out there, but what I'd suggest to use is platypus.

131
00:11:14,630 --> 00:11:18,020
So please search for platypus somewhere on Google.

132
00:11:18,140 --> 00:11:19,340
Platypus Mac.

133
00:11:19,340 --> 00:11:20,870
And then.

134
00:11:22,800 --> 00:11:31,350
And then you want to go to this page with this URL Svein Bjorn dot org slash platypus.

135
00:11:33,690 --> 00:11:41,220
So this has the installation instructions, which is about installing the program with Bru.

136
00:11:41,250 --> 00:11:43,770
So you need to have Bruce installed.

137
00:11:43,770 --> 00:11:45,660
If you don't have Bruce on your Mac.

138
00:11:45,690 --> 00:11:48,990
You need to search on Google for Homebrew.

139
00:11:57,490 --> 00:11:59,920
And go to brew that sage.

140
00:11:59,950 --> 00:12:03,070
And there you you'll find the instructions to install homebrew.

141
00:12:03,100 --> 00:12:08,830
Once you have installed home brew, then you want to run that command brew, install, dash, dash,

142
00:12:08,830 --> 00:12:11,700
cask platypus, all new terminal.

143
00:12:11,710 --> 00:12:15,820
So open the terminal on pa charm and enter that commands.

144
00:12:15,940 --> 00:12:22,510
And wait until the software installs once you install that program then started.

145
00:12:26,110 --> 00:12:28,090
It should look something like this.

146
00:12:28,300 --> 00:12:31,680
And let's begin to input the parameters here.

147
00:12:31,690 --> 00:12:37,260
So the app name, this is going to be the name of the standalone app that you will create.

148
00:12:37,270 --> 00:12:38,650
So let's keep it simple.

149
00:12:38,650 --> 00:12:40,900
My to to app.

150
00:12:40,900 --> 00:12:43,390
Then you can leave this as it is.

151
00:12:43,390 --> 00:12:48,910
But in here you want to specify the path of your python interpreter.

152
00:12:48,910 --> 00:12:53,590
The path of my interpreter is in here.

153
00:12:53,590 --> 00:12:57,370
I can find it by expanding the van folder.

154
00:12:57,370 --> 00:13:01,150
So I'm using a virtual environment.

155
00:13:01,240 --> 00:13:08,530
Then I will expand the bin and then I'll scroll down until I find Python three.

156
00:13:08,800 --> 00:13:17,770
I right click here and I go to copy Path reference and I want to copy the absolute path of that Python

157
00:13:17,770 --> 00:13:18,340
three file.

158
00:13:18,340 --> 00:13:25,170
So that Python three is the actual interpreter which interprets the code which runs the Python code.

159
00:13:25,180 --> 00:13:26,530
So I'll copy that.

160
00:13:26,650 --> 00:13:32,440
Go back to platypus and paste that directory there and just leave it.

161
00:13:33,070 --> 00:13:35,440
Then we have the script path.

162
00:13:35,440 --> 00:13:38,710
This one you can select from here.

163
00:13:38,710 --> 00:13:42,250
So press that button and this is going to be.

164
00:13:45,810 --> 00:13:49,470
The path or field guide that p file.

165
00:13:49,470 --> 00:13:56,490
So in your case, maybe you named it differently, but basically this is the entry point of your program.

166
00:13:56,760 --> 00:14:05,430
I've always executed good dot P to run the program, so you want to select that and you'll see that

167
00:14:05,430 --> 00:14:13,620
the path is updated to the absolute path of that dot P, which is located, as you know, in my project

168
00:14:13,620 --> 00:14:14,550
directory here.

169
00:14:15,720 --> 00:14:19,590
Right next live this option as it is for now.

170
00:14:19,590 --> 00:14:20,640
Text window.

171
00:14:20,910 --> 00:14:26,610
If you want to change the icon, feel free to do it by using this button and then select image file.

172
00:14:27,420 --> 00:14:29,040
I'll just leave it as it is.

173
00:14:29,040 --> 00:14:30,570
Then you have some data.

174
00:14:30,780 --> 00:14:33,050
I'll leave them as they are also.

175
00:14:33,060 --> 00:14:35,640
And then here bundled files.

176
00:14:35,760 --> 00:14:42,520
Here is where we supply all the files that are necessary for our program to run.

177
00:14:42,540 --> 00:14:49,710
In our case, the only file that is necessary for this program to run is functions that p y.

178
00:14:49,950 --> 00:14:58,740
Therefore, we want to go in here and select that plus and then select functions that P and functions

179
00:14:58,740 --> 00:15:00,510
that p y will be added in here.

180
00:15:00,510 --> 00:15:09,330
I'm not adding to those that text in here because I want this line to create it from scratch.

181
00:15:09,330 --> 00:15:16,860
So it will create a new to do that takes file for the user so they have a new empty text file which

182
00:15:16,860 --> 00:15:19,020
they can add it with their own data.

183
00:15:20,440 --> 00:15:21,490
Be careful here.

184
00:15:21,490 --> 00:15:27,670
So sometimes this changes to another directory and you see it's in red.

185
00:15:27,940 --> 00:15:29,630
So I have to update it again.

186
00:15:29,650 --> 00:15:32,500
I'm going to go to vent bin.

187
00:15:33,760 --> 00:15:35,120
Select Python three.

188
00:15:35,140 --> 00:15:36,010
Right click.

189
00:15:36,010 --> 00:15:38,860
Go to copy path and then absolute path.

190
00:15:38,860 --> 00:15:41,680
And then go back here, paste it again.

191
00:15:41,680 --> 00:15:45,310
And now I want to press on Create app.

192
00:15:46,110 --> 00:15:47,670
So press the button.

193
00:15:48,180 --> 00:15:50,460
This will ask you where do you want to save the grid?

194
00:15:50,460 --> 00:15:51,590
That's app file.

195
00:15:51,600 --> 00:15:54,390
So that's the executable file that will be created.

196
00:15:54,420 --> 00:16:00,270
I'll just keep it here in this project directory, which is app one and press on create.

197
00:16:00,660 --> 00:16:01,940
And that's it.

198
00:16:01,950 --> 00:16:05,940
So now I should look for that good dot app file.

199
00:16:05,940 --> 00:16:15,840
So it's here, but I want to right click over my project main folder and go to open in Finder.

200
00:16:16,260 --> 00:16:19,050
So go to app one and there it is.

201
00:16:19,500 --> 00:16:21,820
So that's the file that was generated.

202
00:16:21,840 --> 00:16:23,070
If you click that.

203
00:16:24,640 --> 00:16:26,410
It's going to open to windows.

204
00:16:28,220 --> 00:16:36,380
Now, if you had an issue with your program, then you're going to see an error in this window here.

205
00:16:37,990 --> 00:16:45,550
And you're probably not going to see the actual guy, which in my case it's working fine so I can add

206
00:16:45,550 --> 00:16:46,330
it to do.

207
00:16:47,200 --> 00:16:49,810
And I see the tutu here, so it's working well.

208
00:16:49,900 --> 00:16:54,790
Sometimes it says that pie simple gooey was not found in here.

209
00:16:54,790 --> 00:17:05,160
That is the case if you selected a python interpreter which doesn't have pi simple GUI installed.

210
00:17:05,170 --> 00:17:11,980
So in my case I selected my visual python interpreter, which does have pi symbol installed because

211
00:17:11,980 --> 00:17:14,890
I have already installed it in the previous lectures.

212
00:17:14,890 --> 00:17:20,890
So if you also have a virtual environment and you have followed me, you probably didn't have that issue.

213
00:17:20,890 --> 00:17:27,220
Otherwise you might need to install pi simple gooey to be able to fix that issue.

214
00:17:27,220 --> 00:17:34,570
But you can ask a question in the Q&A if you have that issue right before we close this, I'm sure that

215
00:17:34,570 --> 00:17:40,710
you want to know how to get rid of that window which was displaying on the side of app.

216
00:17:40,720 --> 00:17:44,770
You can do that by selecting this and going to none.

217
00:17:44,950 --> 00:17:52,330
So it's good to have the text window when you're trying the executable file as a developer, but then

218
00:17:52,330 --> 00:17:55,750
when you want to produce it for other people, you don't want to see that.

219
00:17:55,900 --> 00:18:01,690
So the text window is only good to see the errors when you are testing things out.

220
00:18:01,960 --> 00:18:04,570
So in that case, you want to create the app again.

221
00:18:04,570 --> 00:18:09,190
Create This will ask you to replace the existing good at app file.

222
00:18:09,190 --> 00:18:15,070
So press or replace go to finder again, run again.

223
00:18:15,070 --> 00:18:18,310
And now it's one single window.

224
00:18:18,460 --> 00:18:19,360
The two dos.

225
00:18:19,360 --> 00:18:24,640
That txt file is indeed inside this gooey app.

226
00:18:25,420 --> 00:18:32,410
So if I right click and go to show package contents and then I open this app file as a folder and then

227
00:18:32,410 --> 00:18:37,960
I click here and I go to resources there you will find to dos that txt.

228
00:18:37,960 --> 00:18:42,070
So that's the icon of the app as well and so on.

229
00:18:43,720 --> 00:18:51,250
So that's the app file and that's how you can create executable files on Mac.

230
00:18:52,560 --> 00:18:53,720
Linux users.

231
00:18:53,730 --> 00:18:58,350
Now we're going to create an executable which runs on Linux computers.

232
00:18:58,350 --> 00:19:04,710
So I am on a Linux operating system, so you should be also in a Linux operating system if you want

233
00:19:04,710 --> 00:19:12,240
to create a standalone executable for Linux to create the executable, we need a third party library

234
00:19:12,240 --> 00:19:13,320
for Python.

235
00:19:13,320 --> 00:19:19,170
So just like we had pricing guy, now we need something called par installer.

236
00:19:19,170 --> 00:19:29,490
So for that you need to either go to the terminal and do PIP install PA installer or I would recommend

237
00:19:29,490 --> 00:19:35,910
to use the graphical installer for packages which can be found on settings here.

238
00:19:36,120 --> 00:19:42,930
And then in the project or directly you go here python packages right here put installer.

239
00:19:44,110 --> 00:19:44,490
Press.

240
00:19:44,500 --> 00:19:49,390
Enter select points from the list here, then go to install.

241
00:19:51,200 --> 00:19:54,290
Once PA installer installs on your computer.

242
00:19:54,530 --> 00:19:56,540
It did in my case.

243
00:19:56,540 --> 00:20:03,140
So I can go to the terminal first, try to make sure that the program is working, so maybe try to run

244
00:20:03,140 --> 00:20:03,650
it.

245
00:20:05,730 --> 00:20:07,020
As you normally do.

246
00:20:07,020 --> 00:20:08,820
So it seems to be working.

247
00:20:08,820 --> 00:20:10,480
In my case, I have no errors.

248
00:20:10,500 --> 00:20:20,190
Therefore, now we're ready to go to the terminal and type in PI installer space dash, dash one file

249
00:20:20,340 --> 00:20:28,730
dash, dash windowed window et de space dash, dash clean.

250
00:20:28,740 --> 00:20:33,990
And then lastly, you want to say gooey dot p y, or at least in my case.

251
00:20:33,990 --> 00:20:38,280
So this should be the name of your main file.

252
00:20:38,280 --> 00:20:41,430
So the file which you usually run your program.

253
00:20:41,430 --> 00:20:43,050
So that's gooey dot pi.

254
00:20:43,050 --> 00:20:48,570
In my case, that's what I run when I right click here and go to run Gooey.

255
00:20:49,050 --> 00:20:55,500
So pie Installer is the library we installed and now we can execute it from the command line.

256
00:20:55,500 --> 00:20:57,780
So this is not the python console?

257
00:20:57,780 --> 00:20:59,300
No, this is the terminal.

258
00:20:59,310 --> 00:21:01,620
These are Linux commands.

259
00:21:01,620 --> 00:21:07,290
So we can run this on the Linux operating system, not on the Python interpreter.

260
00:21:07,290 --> 00:21:07,680
Right.

261
00:21:07,680 --> 00:21:12,360
Then one file means that the executable will be one file.

262
00:21:12,360 --> 00:21:18,570
It can run as one single file as opposed to creating multiple distributed files.

263
00:21:18,570 --> 00:21:23,160
So it's simpler to give people one single file this.

264
00:21:23,160 --> 00:21:30,810
Then this will avoid having to create a terminal window on the sides of the grid.

265
00:21:30,840 --> 00:21:35,640
So when the user runs that executable, they don't want to see the terminal.

266
00:21:35,640 --> 00:21:37,920
Also, they only want to see the gooey.

267
00:21:37,920 --> 00:21:40,980
So that makes it possible and then clean.

268
00:21:40,980 --> 00:21:47,490
This makes sure that if you executed this commands previously than with this flag.

269
00:21:47,490 --> 00:21:53,580
When you supply that flag, the previously generated executable will be overwritten.

270
00:21:53,580 --> 00:21:56,880
So that's also good to have and press enter.

271
00:22:03,150 --> 00:22:11,190
Now you might get an error, as I did in here, and this suggests to install those packages on Ubuntu

272
00:22:11,190 --> 00:22:12,540
so I'm open to you.

273
00:22:12,570 --> 00:22:15,540
Therefore i'm going to do sudo apt.

274
00:22:17,340 --> 00:22:18,840
Get install.

275
00:22:20,620 --> 00:22:25,450
Python 3.10 because I'm using 3.10.

276
00:22:25,450 --> 00:22:28,920
So I'll do Python 3.10 dash def.

277
00:22:28,930 --> 00:22:31,450
So that's command there approximately.

278
00:22:32,450 --> 00:22:33,250
Presenter.

279
00:22:38,060 --> 00:22:44,420
Enter your Linux user password here you need to press y and then press enter.

280
00:22:52,760 --> 00:22:54,680
And that seemed to be successful.

281
00:22:54,860 --> 00:23:01,160
And now I'll press my upper arrow key to call that previous command, which was this one.

282
00:23:01,430 --> 00:23:02,960
And I'll execute that again.

283
00:23:02,960 --> 00:23:05,060
So the Pie Installer command.

284
00:23:11,610 --> 00:23:12,190
Right.

285
00:23:12,210 --> 00:23:21,290
It says that building was successful and we should be able to find the file inside just in here.

286
00:23:21,300 --> 00:23:27,720
I'll click over this and then go to open end files.

287
00:23:28,650 --> 00:23:33,000
So that should open the file Explorer and that's the file that was generated.

288
00:23:33,000 --> 00:23:34,350
So I'll double click that.

289
00:23:35,620 --> 00:23:36,650
And there we go.

290
00:23:36,670 --> 00:23:37,780
That's the program.

291
00:23:38,690 --> 00:23:44,660
And you see to dos that Tc3 was also generated when the program asked for the first time.

292
00:23:44,660 --> 00:23:51,980
So if you add now A to do here, it's going to be successfully added in the list box.

293
00:23:52,400 --> 00:23:53,500
You can exit.

294
00:23:53,510 --> 00:23:57,530
So the two dos are stored in this text file.

295
00:23:57,800 --> 00:24:02,360
You can give to other people this file only.

296
00:24:02,360 --> 00:24:06,440
And so a to dos that txt file will be generated for them.

297
00:24:06,590 --> 00:24:10,130
So it will serve as their own database.

298
00:24:10,850 --> 00:24:17,720
And that was about how to generate Linux executables from Python programs.

299
00:24:17,750 --> 00:24:19,400
That ends this video.

300
00:24:19,850 --> 00:24:22,670
We were able to cover three operating systems.

301
00:24:22,670 --> 00:24:23,630
So thanks a lot.

302
00:24:23,660 --> 00:24:24,470
See you later.

