Packaging (.py) files into (.exe) files in Pycharm

Packaging (.py) files into (.exe) files in Pycharm

1. First download a library: pyinstaller

insert image description here

Or download in Terminal (Terminal), as opposed to entering the command line:

pip install pyinstaller

2. After installing pyinstaller, go to the file you want to package in the terminal. input the command:

pyinstaller -F UI_carmer_main.py

Then press enter:

insert image description here

3. Package successfully:

insert image description here

4. The following black box will appear. If you want to remove it, you can do the following:

insert image description here

Remove the black box operation, package and enter the command line:

# 方法一:
pyinstaller -F UI_carmer_main.py --noconsole
# 方法二
pyinstaller -F -w UI_carmer_main.py

Guess you like

Origin blog.csdn.net/K_AAbb/article/details/124378917