1206 Python learning Pyinstaller library packaging

1206 Python learning Pyinstaller library packaging

Need to install PyInstaller library
Installation method:

pip installer PyInstaller

Common methods:

method 1:

  1. Command prompt (CMD) input cd: 需要打包的文件目录Press Enter to enter
  2. Then enterpyinstaller -F 文件名.py
  3. When the word succful is displayed at the end of the command prompt window, it means the packaging is successful
  4. For the above packaging methods, the default packaging files are in the directory of the files to be packaged.
  5. In the current directory, dist file inside 文件名.pyis the success of the program package (can be run directly, you can copy it alone use)

Method 2:

  1. Command prompt (CMD) input cd: 需要打包的文件目录Press Enter to enter
  2. Then enter pyinstaller -F -w 文件名.py (you need your own code to include GUI)
  3. When the word succful is displayed at the end of the command prompt window, it means the packaging is successful
  4. For the above packaging methods, the default packaging files are in the directory of the files to be packaged.
  5. In the current directory, dist file inside 文件名.pyis the success of the program package (can be run directly, you can copy it alone use)

Guess you like

Origin blog.csdn.net/weixin_45550881/article/details/103417442