📜  python exe不能在其他电脑上运行 - Python代码示例

📅  最后修改于: 2022-03-11 14:46:50.751000             🧑  作者: Mango

代码示例1
# 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