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. So now everyone can install it from there and use it.
0:07 But what about people who don't have Python on computer installed, or more importantly, who don't even know what Python is.
0:16 When you install software on your windows or Mac computer, all you have to do is click the installer and it does all the magic for
0:23 you. You don't have to install dependencies manually. The installer has all the dependencies inside.
0:29 It would be cool to turn our uptimer into such an application. That way we can send it to someone,
0:35 and they will be able to use it even if they know what Python is. The good news is that this is possible.
0:42 There are tools like py installer that lets you create a standalone executable. You can then send this executable to someone,
0:50 and they will be able to use it without installing anything. py installer lets you create packages for Windows,
0:56 Linux and macOS. If you only want to create packages for one of those operating systems, you can check out the py2exe that lets you create executable
1:07 applications for windows or py2app that lets you create applications for macOS.
1:18 That was the good news. The bad news is that they are not cross compilers which means that to build a package for Windows.
1:26 You have to build it on Windows to build a package for macOS. You have to build it from macOS and so on.
1:33 There is no tool that will let you build a standalone Python executable for Windows from
1:38 a macOS computer. That's simply because macOS doesn't have the libraries required to
1:43 run Python programs on windows, so you have to use the Windows computer. Install all the required dependencies yourself,
1:51 and then py installer will take them and wrap them together with your Python application.
1:56 It's not the most convenient process because you need to use multiple operating systems if you want to support multiple operating systems.
2:04 But that's pretty much the only way to make it work. And it's still better to do this that way than trying to explain to hundreds of
2:12 users what Python is and how to install Python on windows, so they can use your application. So in this chapter,how to use pyinstaller.

Talk Python's Mastodon Michael Kennedy's Mastodon