Modern Python Projects Transcripts
Chapter: Let's build an app
Lecture: Executable applications

Login or purchase this course to watch this video and the rest of the course contents.
0:00 We published our uptimer package on pypi.
0:02 So now everyone can install it from there and use it.
0:06 But what about people who don't have python on computer installed,
0:11 or more importantly, who don't even know what python is.
0:15 When you install software on your windows or Mac computer,
0:18 all you have to do is click the installer and it does all the magic for
0:22 you. You don't have to install dependencies manually.
0:25 The installer has all the dependencies inside.
0:28 It would be cool to turn our uptimer into such an application.
0:32 That way we can send it to someone,
0:34 and they will be able to use it even if they know what python is.
0:38 The good news is that this is possible.
0:41 There are tools like py installer that lets you create a standalone executable.
0:46 You can then send this executable to someone,
0:49 and they will be able to use it without installing
0:51 anything. py installer lets you create packages for Windows,
0:55 Linux and Mac OS. If you only want to create packages for one of those
1:00 operating systems, you can check out the py2exe that lets you create executable
1:06 applications for windows or py2app that lets you create applications for Mac OS.
1:17 That was the good news. The bad news is that they are not cross compilers
1:21 which means that to build a package for Windows.
1:25 You have to build it on Windows to build a package for Mac OS.
1:28 You have to build it from Mac OS and so on.
1:32 There is no tool that will let you build a standalone python executable for Windows from
1:37 a Mac OS computer. That's simply because Mac OS doesn't have the libraries required to
1:42 run python programs on windows, so you have to use the Windows computer.
1:47 Install all the required dependencies yourself,
1:50 and then py installer will take them and wrap them together with your python application.
1:55 It's not the most convenient process because you need to use multiple operating systems if you
2:01 want to support multiple operating systems.
2:03 But that's pretty much the only way to make it work.
2:06 And it's still better to do this that way than trying to explain to hundreds of
2:11 users what python is and how to install python on windows, so they can use your
2:16 application. So in this chapter,how to use pyinstaller.