Nuitka Beginner Tour
Dear Python beginner,
you are new to Python, and maybe new to compilers too. This tour shows you, without much jargon, what Nuitka can do for you and how to get started. If you get stuck at any point, there is a community of volunteers that is happy to help. Nuitka is a compiler for Python programs. Normally, a Python program needs Python installed to run, and it runs directly from your source files. Nuitka translates your program into a real executable, like the programs you download from the internet, that runs on its own. For you as a beginner, this has two nice effects: Your program becomes faster. You can give your program to other people, and they do not need Python at all. Nuitka supports Python 3 (3.4 - 3.14) and Python 2 (2.6, 2.7). Install Nuitka: Then check that it works: Now take a small program, e.g. Compile it: You now have a Note The first compilation can take a while, because Nuitka uses a C compiler under the hood. The next ones will be much faster. Tutorial Setup and Build explains the setup in more detail, e.g. how to get a C compiler on Windows. Support lists the chat rooms and the issue tracker. The volunteers on the Discord serverhelp with first steps and questions. Solutions to the Common Issues covers typical problems.What is Nuitka
First Steps
python -m pip install -U Nuitka
python -m nuitka --version
hello.py:def main():
print("Hello World")
if __name__ == "__main__":
main()
python -m nuitka --mode=onefile hello.py
hello executable (hello.exe on Windows) next to your source file. Run it, and that is your program, compiled.Getting Help