1、Downloadpyinstaller
python 3.6 already installs pip by itself, so you just need to run pip install pyinstaller
2. Packaging program
Go to the directory you you need to pack; for example, I'm in H:\xcyk
To start packing, run pyinstaller
We found out that, surprisingly, it reported an error!!! , and then went to the official website and said that python 3.6 packaging is not supported
3, to solve the pyinstaller temporarily does not support python3.6 packaging methods
Why is it temporary? Because the 3.6 package is currently being improved. Of course, you can download the latest version for the time being.
(after a verb of motion indicates movement away from the speaker)github download
After unzipping, copy the PyInstaller folder in it to the corresponding directory Python36\Lib\site-packages where you installed pyinstaller, and replace it.
Executing: pyinstaller in the directory of the files to be packaged, we found success!
The packaged files are inside the dist. But. What we found is that it's a folder inside that generates so many things.
This is because we didn't add a parameter, so it's packaged as a loose package. You can use the -F parameter to make a file
H:\xcyk>pyinstaller -F
Introduction of common parameters
- -icon=icon path
- -F Package it as an exe file
- -w Use window, no console
- -c Use console, no windows
- -D Creates a directory containing the exe and some other dependent files
- pyinstaller -h to see the parameters
pyinstaller change icon
pyinstaller -F --icon=
is an icon name that goes with the current document
This is the whole content of this article.