NUITKA-RUN(1)

πŸ“¦
version 1.3.5 Β· 2 versions
, in ubuntu noble, ubuntu resolute

πŸ’– NUITKA-RUN πŸ’–

okay so bestie, welcome to nuitka-run β€” she's a User Command, she lives in the NUITKA-RUN(1) part of the manual, and she is, no exaggeration, the Python compiler. put your main module in, get a compiled thing out. it's giving glow-up but for your code. πŸ¦‹βœ¨


🌸 NAME 🌸

nuitka-run β€” the Python compiler. that's it, that's the whole name. iconic. πŸ’…


✨ SYNOPSIS ✨

nuitka-run [options] main_module.py

that's the whole vibe: you throw options at her, then you hand her your main_module.py, and she does the thing. πŸŽ€


πŸ‘‘ OPTIONS πŸ‘‘

okay this is the big one, the main character section. buckle up, we're going through every single one, no skipping, i don't do that. 🌈

  • --help β€” show this help message and exit. that's it. she's helpful like that. πŸ’–
  • --version β€” show version information and important details for bug reports, then exit. defaults to off. pro tip: this is the one you run before you go complain anywhere, iykyk. 🫢
  • --module β€” create an extension module executable instead of a program. defaults to off.
  • --standalone β€” enable standalone mode for output. this lets you transfer the created binary to other machines without it leaning on an existing Python installation. also means it's gonna get big. it implies these options: --follow-imports and --python-flag=no_site. defaults to off. it's giving "i carry my whole house on my back". 🐌
  • --onefile β€” on top of standalone mode, enable onefile mode. this means not a folder, but a compressed executable is created and used. defaults to off. one file. one girl. one destiny. πŸ’…
  • --python-debug β€” use debug version or not. the default is whatever you're using to run Nuitka, most likely a non-debug version. no cap.
  • --python-flag=FLAG β€” Python flags to use. default is what you're using to run Nuitka; this enforces a specific mode. these are options that also exist on the standard Python executable. currently supported: -S (alias no_site), static_hashes (do not use hash randomization), no_warnings (do not give Python run time warnings), -O (alias no_asserts), no_docstrings (do not use doc strings), -u (alias unbuffered) and -m. default empty.
  • --python-for-scons=PATH β€” if you're on Python3.3 or Python3.4, provide the path of a Python binary to use for Scons. otherwise Nuitka can use what you run Nuitka with, or a Python installation from the Windows registry. on Windows, Python 3.5 or higher is needed. on non-Windows, Python 2.6 or 2.7 will do as well. look at her being flexible. 🧚

πŸŽ€ Control the inclusion of modules and packages in result:

these ones decide who gets to come to the party (the party is your binary/extension module). πŸŽ‰

  • --include-package=PACKAGE β€” include a whole package. give it as a Python namespace, e.g. some_package.sub_package, and Nuitka will then find it and include it and all the modules found below that disk location in the binary or extension module she creates, and make it available for import by the code. to avoid unwanted sub packages, e.g. tests, you can e.g. do this: --nofollow-import-to=*.tests. default empty. it's the "bring the whole friend group" option. πŸ«‚
  • --include-module=MODULE β€” include a single module. give it as a Python namespace, e.g. some_package.some_module, and Nuitka will then find it and include it in the binary or extension module she creates, and make it available for import by the code. default empty. just the one bestie. πŸ’œ
  • --include-plugin-directory=MODULE/PACKAGE β€” include also the code found in that directory, considering as if they are each given as a main file. overrides all other inclusion options. you ought to prefer other inclusion options, the ones that go by names rather than filenames β€” those find things through being in sys.path. this option is for very special use cases only. can be given multiple times. default empty.
  • --include-plugin-files=PATTERN β€” include into files matching the PATTERN. overrides all other follow options. can be given multiple times. default empty.
  • --prefer-source-code β€” for already compiled extension modules, where there's both a source file and an extension module, normally the extension module is used, but it should be better to compile the module from available source code for best performance. if that's not what you want, there's --noprefer-source-code to disable warnings about it. default off. she said read the source, babe. πŸ“–

πŸ”₯ Control the following into imported modules:

these decide how deep she goes when she follows imports. like stalking but for module resolution. πŸ™ˆ

  • --follow-imports β€” descend into all imported modules. defaults to on in standalone mode, otherwise off.
  • --follow-import-to=MODULE/PACKAGE β€” follow to that module if used, or if a package, to the whole package. can be given multiple times. default empty.
  • --nofollow-import-to=MODULE/PACKAGE β€” do not follow to that module name even if used, or if a package name, to the whole package in any case. overrides all other options. can be given multiple times. default empty. the block button. 🚫
  • --nofollow-imports β€” do not descend into any imported modules at all. overrides all other inclusion options, and not usable for standalone mode. defaults to off.
  • --follow-stdlib β€” also descend into imported modules from the standard library. this will increase the compilation time by a lot, and it's also not well tested at this time and sometimes won't work. defaults to off.
⚠️ bestie, read that again: --follow-stdlib = slow, not well tested, sometimes just won't work. she's being honest with you, respect it.

🧊 Onefile options:

  • --onefile-tempdir-spec=ONEFILE_TEMPDIR_SPEC β€” use this as a folder to unpack to in onefile mode. defaults to '%TEMP%/onefile_%PID%_%TIME%', i.e. user temporary directory, and being non-static it's removed. use e.g. a string like '%CACHE_DIR%/%COMPANY%/%PRODUCT%/%VERSION%', which is a good static cache path β€” this will then not be removed. choose wisely, that's a whole vibe decision. πŸ—‚οΈ

πŸ“ Data files:

  • --include-package-data=PACKAGE β€” include data files for the given package name. DLLs and extension modules are not data files and never included like this. can use patterns on the filenames as indicated below. data files of packages are not included by default, but package configuration can do it. this will only include non-DLL, non-extension modules, i.e. actual data files. after a : optionally a filename pattern can be given as well, selecting only matching files. examples: --includepackage-data=package_name (all files), --includepackage-data=package_name=*.txt (only certain type), --include-package-data=package_name=some_filename.dat (concrete file). default empty.
  • --include-data-files=DESC β€” include data files by filenames in the distribution. there are many allowed forms. with --include-datafiles=/path/to/file/*.txt=folder_name/some.txt it will copy a single file and complain if it's multiple. with --include-datafiles=/path/to/files/*.txt=folder_name/ it will put all matching files into that folder. for recursive copy there is a form with 3 values, that --includedata-files=/path/to/scan=folder_name=**/*.txt, that will preserve directory structure. default empty. so many forms, she contains multitudes. 🌈
  • --include-data-dir=DIRECTORY β€” include data files from a complete directory in the distribution. this is recursive. check --includedata-files with patterns if you want non-recursive inclusion. an example would be --include-datadir=/path/some_dir=data/some_dir for plain copy of the whole directory. all files are copied; if you want to exclude files you need to remove them beforehand, or use the --noinclude-data-files option to remove them. default empty.
  • --noinclude-data-files=PATTERN β€” do not include data files matching the filename pattern given. this is against the target filename, not source paths. so to ignore a file pattern from package data for package_name, it should be matched as package_name/*.txt. or for the whole directory, simply use package_name. default empty. the anti-include. πŸ’€

πŸ’  DLL files:

  • --noinclude-dlls=PATTERN β€” do not include DLL files matching the filename pattern given. this is against the target filename, not source paths. so to ignore a DLL someDLL contained in the package package_name, it should be matched as package_name/someDLL.*. default empty.
  • --list-package-dlls=LIST_PACKAGE_DLLS β€” output the DLLs found for a given package name. default: not done. she'll just tell you. gossip but for binaries. πŸ«–

πŸ’… Control the warnings to be given by Nuitka:

  • --warn-implicit-exceptions β€” enable warnings for implicit exceptions detected at compile time.
  • --warn-unusual-code β€” enable warnings for unusual code detected at compile time.
  • --assume-yes-for-downloads β€” allow Nuitka to download external code if necessary, e.g. dependency walker, ccache, and even gcc on Windows. to disable, redirect input from nul device, e.g. "</dev/null" or "<NUL:". default is to prompt. so she asks first unless you tell her not to. consent queen. πŸ‘‘
  • --nowarn-mnemonic=MNEMONIC β€” disable warning for a given mnemonic. these are given to make sure you are aware of certain topics, and typically point to the Nuitka website. the mnemonic is the part of the URL at the end, without the HTML suffix. can be given multiple times and accepts shell pattern. default empty. yes bestie, you can mute specific lectures. πŸ”‡

πŸƒβ™€οΈ Immediate execution after compilation:

  • --run β€” execute immediately the created binary (or import the compiled module). defaults to on. she compiles AND runs, she's efficient. ✨
  • --debugger β€” execute inside a debugger, e.g. "gdb" or "lldb", to automatically get a stack trace. defaults to off. for when you need to see exactly where it went wrong. main character detective energy. πŸ•΅οΈβ™€οΈ
  • --execute-with-pythonpath β€” when immediately executing the created binary or module using --run, don't reset the PYTHONPATH environment. when all modules are successfully included, you ought to not need PYTHONPATH anymore, and definitely not for standalone mode. no cap.

⭐ Compilation choices:

  • --user-package-configuration-file=YAML_FILENAME β€” user provided Yaml file with package configuration. you can include DLLs, remove bloat, add hidden dependencies. check the User Manual for a complete description of the format to use. can be given multiple times. defaults to empty. it's giving ✨customization✨.
  • --full-compat β€” enforce absolute compatibility with CPython. do not even allow minor deviations from CPython behavior, e.g. not having better tracebacks or exception messages which are not really incompatible, but only different or worse. this is intended for tests only and should not be used.
πŸ›‘ okay so real talk: --full-compat is tests-only. should *not* be used. she said what she said, fr fr.
  • --file-reference-choice=MODE β€” select what value "__file__" is going to be. with "runtime" (default for standalone binary mode and module mode), the created binaries and modules use the location of themselves to deduct the value of "__file__". included packages pretend to be in directories below that location. this allows you to include data files in deployments. if you merely seek acceleration, it's better for you to use the "original" value, where the source files location will be used. with "frozen" a notation "<frozen module_name>" is used. for compatibility reasons, the "__file__" value will always have a ".py" suffix independent of what it really is. πŸ’«
  • --module-name-choice=MODE β€” bestie, this one picks what __name__ and __package__ actually become at runtime. πŸŽ€ With "runtime" (the default for module mode), the module it creates uses the parent package to deduce __package__, so it stays fully compatible. With "original" (the default for other modes) you get way more static optimization, but it's incompatible for modules that would normally be loadable into any package. iykyk.

✨ Output choices ✨

  • --output-filename=FILENAME β€” tells Nuitka how the executable should be named. For extension modules there's literally no choice, and same for standalone mode β€” using it there will be an error. This can include path info, but those paths have to already exist. Defaults to <program_name>.bin on this platform. πŸ’…
  • --output-dir=DIRECTORY β€” where the intermediate and final output files get dropped. The DIRECTORY gets populated with the build folder, dist folder, binaries, etc. Defaults to the current directory. πŸ¦‹
  • --remove-output β€” yeets the build directory once the module or exe file has been produced. Defaults to off. πŸ”₯
  • --no-pyi-file β€” don't create a .pyi file for extension modules made by Nuitka. That file is what's used to detect implicit imports. Defaults to off. 🌸

✨ Debug features ✨

  • --debug β€” runs every self check possible to hunt down errors in Nuitka itself. Do not use this for production, fr fr. Defaults to off. 😭
  • --unstripped β€” keeps debug info in the resulting object file so your debugger can vibe with you better. Defaults to off. 🧚
  • --profile β€” enables vmprof based profiling of time spent. Heads up: not working currently. Defaults to off. πŸ’€
  • --internal-graph β€” creates a graph of the optimization process internals. Don't run this on whole programs, only on small test cases. Defaults to off. 🫢
  • --trace-execution β€” traced execution output, printing the line of code right before it executes. Defaults to off. ⭐
  • --recompile-c-only β€” okay so this is not incremental compilation, it's for Nuitka development only. It takes existing files and simply compiles them as C again. Lets you compile edited C files for quick debugging changes to the generated source, e.g. to see if code is passed by, values output, etc. Defaults to off. It depends on compiling Python source to determine which files it should look at. πŸ™ˆ
  • --xml=XML_FILENAME β€” writes the internal program structure and the result of optimization in XML form to the given filename. ✨
  • --generate-c-only β€” generates only C source code and doesn't compile it to binary or module. This is for debugging and code coverage analysis that doesn't waste CPU. Defaults to off. And no cap, do not think you can use this directly. πŸ’…
  • --experimental=FLAG β€” use features declared as 'experimental'. May have no effect if there are no experimental features present in the code. It uses secret tags (check source) per experimented feature. πŸ‘‘
  • --low-memory β€” tries to use less memory by forking fewer C compilation jobs and using options that use less memory. Made for embedded machines. Use this when you're hitting out of memory problems. Defaults to off. πŸ“

✨ Backend C compiler choice ✨

  • --clang β€” enforces the use of clang. On Windows this requires a working Visual Studio version to piggy back on. Defaults to off. 🌈
  • --mingw64 β€” enforces the use of MinGW64 on Windows. Defaults to off unless MSYS2 with MinGW Python is used. πŸ’œ
  • --msvc=MSVC_VERSION β€” enforces the use of a specific MSVC version on Windows. Allowed values are e.g. "14.3" (MSVC 2022) and other MSVC version numbers, specify "list" for a list of installed compilers, or use "latest". Defaults to the latest MSVC being used if installed, otherwise MinGW64 is used. πŸ”₯
  • --jobs=N β€” the allowed number of parallel C compiler jobs. Defaults to the system CPU count. ⚑
  • --lto=choice β€” use link time optimizations (MSVC, gcc, clang). Allowed values are "yes", "no", and "auto" (when it's known to work). Defaults to "auto". πŸ’–
  • --static-libpython=choice β€” use the static link library of Python. Allowed values are "yes", "no", and "auto" (when it's known to work). Defaults to "auto". 🌸

✨ Cache Control ✨

  • --disable-cache=DISABLED_CACHES β€” disables selected caches; specify "all" for all cached. Currently allowed values are: "all","ccache","bytecode". Can be given multiple times or with comma separated values. Default none. πŸŽ€
  • --clean-cache=CLEAN_CACHES β€” cleans the given caches before executing; specify "all" for all cached. Currently allowed values are: "all","ccache","bytecode". Can be given multiple times or with comma separated values. Default none. 🧹
  • --disable-bytecode-cache β€” don't reuse dependency analysis results for modules, esp. from the standard library, that are included as bytecode. Same as --disable-cache=bytecode. πŸ’…
  • --disable-ccache β€” don't attempt to use ccache (gcc, clang, etc.) or clcache (MSVC, clangcl). Same as --disablecache=ccache. πŸ¦‹

✨ PGO compilation choices ✨

  • --pgo β€” enables C level profile guided optimization (PGO) by executing a dedicated build first for a profiling run, then using the result to feedback into the C compilation. Note: this is experimental and not working with standalone modes of Nuitka yet. Defaults to off. 😭
  • --pgo-args=PGO_ARGS β€” arguments to be passed in case of profile guided optimization. These get passed to the special built executable during the PGO profiling run. Default empty. ✨
  • --pgo-executable=PGO_EXECUTABLE β€” the command to execute when collecting profile information. Only use this if you need to launch it through a script that prepares it to run. Default is to use the created program. 🫢

✨ Tracing features ✨

  • --report=REPORT_FILENAME β€” reports module, data files, compilation, plugin, etc. details in an XML output file. This is also super useful for issue reporting. Default is off. ⭐
  • --quiet β€” disables all information outputs, but still shows warnings. Defaults to off. 🀫
  • --show-scons β€” runs the C building backend Scons with verbose information, showing the executed commands and detected compilers. Defaults to off. πŸ”§
  • --no-progressbar β€” disables progress bars. Defaults to off. 🚫
  • --show-progress β€” Obsolete: provides progress information and statistics. Disables the normal progress bar. Defaults to off. πŸ’€
  • --show-memory β€” provides memory information and statistics. Defaults to off. 🧠
  • --show-modules β€” provides information for included modules and DLLs. Obsolete: you should use the '--report' file instead. Defaults to off. πŸ™ˆ
  • --show-modules-output=PATH β€” where to output '--show-modules'; should be a filename. Default is standard output. πŸ“„
  • --verbose β€” outputs details of actions taken, esp. in optimizations. Can become a lot. Defaults to off. 😭
  • --verbose-output=PATH β€” where to output from '--verbose'; should be a filename. Default is standard output. πŸ“

✨ General OS controls ✨

  • --disable-console β€” when compiling for Windows or macOS, disables the console window and creates a GUI application. Defaults to off. πŸ–₯️
  • --enable-console β€” when compiling for Windows or macOS, enables the console window and creates a console application. This disables hints from certain modules, e.g. "PySide", that suggest disabling it. Defaults to true. βœ…
  • --force-stdout-spec=FORCE_STDOUT_SPEC β€” forces the standard output of the program to go to this location. Useful for programs with a disabled console and programs using the Windows Services Plugin of Nuitka commercial. Defaults to not active; use e.g. '%PROGRAM%.out.txt', i.e. a file near your program. 🎯
  • --force-stderr-spec=FORCE_STDERR_SPEC β€” forces the standard error of the program to go to this location. Useful for programs with a disabled console and programs using the Windows Services Plugin of Nuitka commercial. Defaults to not active; use e.g. '%PROGRAM%.err.txt', i.e. a file near your program. 🎯

✨ Windows specific controls ✨

  • --windows-icon-from-ico=ICON_PATH β€” adds an executable icon. Can be given multiple times for different resolutions or files with multiple icons inside. In the latter case, you may also suffix with #<n> where n is an integer index starting from 1, specifying a specific icon to be included and all others to be ignored. πŸ–ΌοΈ
  • --windows-icon-from-exe=ICON_EXE_PATH β€” copies executable icons from this existing executable (Windows only). πŸ“‹
  • --onefile-windows-splash-screen-image=SPLASH_SCREEN_IMAGE β€” when compiling for Windows and onefile, shows this while loading the application. Defaults to off. 🌟
  • --windows-uac-admin β€” requests Windows User Control to grant admin rights on execution. (Windows only). Defaults to off. πŸ‘‘
  • --windows-uac-uiaccess β€” requests Windows User Control to enforce running from a few folders only, remote desktop access. (Windows only). Defaults to off. πŸ”’

✨ macOS specific controls ✨

  • --macos-target-arch=MACOS_TARGET_ARCH β€” what architectures this is supposed to run on. Default and limit is what the running Python allows for. Default is "native", which is the architecture the Python is run with. 🍎
  • --macos-create-app-bundle β€” when compiling for macOS, creates a bundle rather than a plain binary application. Currently experimental and incomplete. Currently this is the only way to unlock disabling of console. Defaults to off. πŸŽ€
  • --macos-app-icon=ICON_PATH β€” adds an icon for the application bundle to use. Can be given only one time. Defaults to the Python icon if available. 🌈
  • --macos-signed-app-name=MACOS_SIGNED_APP_NAME β€” name of the application to use for macOS signing. Follow "com.YourCompany.AppName" naming results for best results, since these have to be globally unique and will potentially grant protected API accesses. πŸ”
  • --macos-app-name=MACOS_APP_NAME β€” name of the product to use in macOS bundle information. Defaults to the base filename of the binary. πŸ’–
  • --macos-app-mode=MODE β€” sets the mode of the application bundle. Here's the tea: if you want a Window popping up and you want it showing in the Docker, the default "gui" is literally the perfect fit. If there's never gonna be a Window at all, then your app is a "background" application. And "ui-element" is the in-between girlie β€” for UI elements that get to display later. With that one the app does not appear in the dock, but it gets full desktop access when it does open a Window later. Slay.
  • --macos-sign-identity=MACOS_APP_VERSION β€” when you're signing on macOS, by default an ad-hoc identity gets used, but with this option you get to pick a different identity. Heads up bestie: signing of code is now mandatory on macOS and cannot be disabled, periodt. Default is "ad-hoc" if you don't give it.
  • --macos-sign-notarization β€” when signing for notarization, using a proper TeamID identity from Apple, use this required runtime signing option so it can actually be accepted. πŸ’…
  • --macos-app-version=MACOS_APP_VERSION β€” the product version to use in the macOS bundle information. Defaults to "1.0" if you don't give it.
  • --macos-app-protected-resource=RESOURCE_DESC β€” requests an entitlement for access to a macOS protected resource. Like, for example, "NSMicrophoneUsageDescription:Microphone access for recording audio." asks for microphone access and gives the user an informative lil text about why it's needed. Before the colon is an OS identifier for an access right, then the informative text after. Legal values live here:
https://developer.apple.com/doc
umentation/bundleresources/information_property_list/p
rotected_resources

and this option can be specified multiple times. Default empty.


🐧 Linux specific controls 🐧

  • --linux-icon=ICON_PATH β€” adds an executable icon for the onefile binary to use. Can be given only one time. Defaults to the Python icon if it's available. πŸŽ€

🧾 Binary Version Information 🧾

  • --company-name=COMPANY_NAME β€” name of the company to use in version information. Defaults to unused.
  • --product-name=PRODUCT_NAME β€” name of the product to use in version information. Defaults to the base filename of the binary.
  • --file-version=FILE_VERSION β€” file version to use in version information. Must be a sequence of up to 4 numbers, e.g. 1.0 or 1.0.0.0 β€” no more digits allowed, no strings allowed. Defaults to unused.
  • --product-version=PRODUCT_VERSION β€” product version to use in version information. Same rules as for file version. Defaults to unused.
  • --file-description=FILE_DESCRIPTION β€” description of the file used in version information. Windows only at this time. Defaults to the binary filename.
  • --copyright=COPYRIGHT_TEXT β€” copyright used in version information. Windows only at this time. Defaults to not present.
  • --trademarks=TRADEMARK_TEXT β€” copyright used in version information. Windows only at this time. Defaults to not present. (yes bestie, it really says copyright again, I'm just the messenger 🫢)

πŸ”Œ Plugin control πŸ”Œ

  • --enable-plugin=PLUGIN_NAME β€” enabled plugins. Must be plug-in names. Use --pluginlist to query the full list and exit. Default empty.
  • --disable-plugin=PLUGIN_NAME β€” disabled plugins. Must be plug-in names. Use --plugin-list to query the full list and exit. Most standard plugins are not a good idea to disable. Default empty.
  • --plugin-no-detection β€” plugins can detect if they might be used, and then you can disable the warning via "--disable-plugin=pluginthat-warned", or you can use this option to disable the mechanism entirely β€” which also speeds up compilation slightly of course, since this detection code is run in vain once you're certain of which plugins to use. Defaults to off.
  • --plugin-list β€” show the list of all available plugins and exit. Defaults to off.
  • --user-plugin=PATH β€” the file name of the user plugin. Can be given multiple times. Default empty.
  • --show-source-changes β€” show source changes to the original Python file content before compilation. Mostly intended for developing plugins. Default False.

🫧 Plugin options of 'anti-bloat' 🫧

  • --show-anti-bloat-changes β€” annotate what changes are done by the plugin. πŸ”
  • --noinclude-setuptools-mode=NOINCLUDE_SETUPTOOLS_MODE β€” what to do if a 'setuptools' import is encountered. This package can be big with dependencies, and should definitely be avoided. Also handles 'setuptools_scm'.
  • --noinclude-pytest-mode=NOINCLUDE_PYTEST_MODE β€” what to do if a 'pytest' import is encountered. This package can be big with dependencies, and should definitely be avoided. Also handles 'nose' imports.
  • --noinclude-unittest-mode=NOINCLUDE_UNITTEST_MODE β€” what to do if a unittest import is encountered. This package can be big with dependencies, and should definitely be avoided.
  • --noinclude-IPython-mode=NOINCLUDE_IPYTHON_MODE β€” what to do if an IPython import is encountered. This package can be big with dependencies, and should definitely be avoided.
  • --noinclude-dask-mode=NOINCLUDE_DASK_MODE β€” what to do if a 'dask' import is encountered. This package can be big with dependencies, and should definitely be avoided.
  • --noinclude-numba-mode=NOINCLUDE_NUMBA_MODE β€” what to do if a 'numba' import is encountered. This package can be big with dependencies, and is currently not working for standalone. This package is big with dependencies, and should definitely be avoided.
  • --noinclude-default-mode=NOINCLUDE_DEFAULT_MODE β€” this actually provides the default "warning" value for the above options, and can be used to turn all of these on. ✨
  • --noinclude-custom-mode=CUSTOM_CHOICES β€” what to do if a specific import is encountered. Format is module name, which can and should be a top level package, and then one choice: "error", "warning", "nofollow" β€” e.g. PyQt5:error.

And for the record, the build info that got printed out was giving:

Commercial: None Python: 2.7.18 (default, Jul 14 2021, 08:11:37) Flavor:
Debian Python Executable: /usr/bin/python2 OS: Linux Arch: x86_64
Distribution: Debian 11 Version C compiler: /usr/lib/ccache/gcc (gcc).

πŸ’– EXAMPLES πŸ’–

Compile a Python file "some_module.py" to a module "some_module.so":

$ nuitka --module some_module.py

Compile a Python program "some_program.py" to an executable "some_program.exe":

$ nuitka some_program.py

Compile a Python program "some_program.py" and the package "some_package" it uses to an executable "some_program.exe":

$ nuitka --follow-import--to=some_package some_program.py

Compile a Python program "some_program.py" and all the modules it uses to an executable "some_program.exe". Then execute it immediately when it's ready:

$ nuitka --run --follow-imports some_program.py

Compile a Python program "some_program.py" and the modules it uses (even standard library) to an executable "some_program.exe":

$ nuitka --recurse-all --follow-stdlib some_program.py

Compile a Python program "some_program.py" and the modules it uses to an executable "some_program.exe". Keep the debug information, so valgrind, gdb, etc. work nicely.

Note: This will not degrade performance:
$ nuitka --unstripped --follow-imports some_program.py

Compile a Python program "some_program.py" and the modules it uses to an executable "some_program.exe". Perform all kinds of checks about correctness of the generated C and run-time checks.

Note: This will degrade performance and should only be used to debug Nuitka:
$ nuitka --debug --follow-imports some_program.py

Compile a Python program "some_program.py" and the modules it uses to an executable "some_program.exe". Perform all kinds of checks about correctness of the generated C and run-time checks. Also use the debug Python library, which does its own checks.

Note: This will degrade performance and should only be used to debug Nuitka:
$ nuitka --debug --python-debug --follow-imports some_program.py

okay and that's a wrap bestie!! πŸŽ€ this whole lil manual is from nuitka-run version 1.3.5, dated January 2023, and it's the NUITKA-RUN(1) page. go compile something iconic, you got this πŸ’…βœ¨

πŸ“¦ where this page comes from