python exe not working on other pc 1

python exe not working on other pc

# To convert my Python project to exe, I'm using Nuitka.
# It creates a C code from your Python script and then compile it to 
# an executable.

# For the installation of Nuitka, https://nuitka.net/doc/user-manual.html#usage

# Once Nuika is installed, you can create a .exe with

nuitka --standalone --assume-yes-for-downloads --remove-output --disable-dll-dependency-cache --plugin-enable=pylint-warnings --plugin-enable=numpy --plugin-enable=pkg-resources --windows-disable-console your_script.py
# (replace "your_script" with the name of your python project)

# The .exe will work on any pc

Here is what the above code is Doing:
1. –standalone: This option will create a standalone executable, which means that it will include all the dependencies of your project.
2. –assume-yes-for-downloads: This option will automatically download the dependencies of your project.
3. –remove-output: This option will remove the output folder after the compilation.
4. –disable-dll-dependency-cache: This option will disable the cache of the dependencies.
5. –plugin-enable=pylint-warnings: This option will enable the pylint warnings.
6. –plugin-enable=numpy: This option will enable the numpy plugin.
7. –plugin-enable=pkg-resources: This option will enable the pkg-resources plugin.
8. –windows-disable-console: This option will disable the console.
9. your_script.py: This is the name of your python script.

Similar Posts