The same applies to windows
**
1. Installation
**
First open the terminal input and
install via mirror is faster
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyinstaller
Waiting for the progress bar to finish
re-enter
pyinstaller --version
ok installation complete
**
2. Packaging
**
1 Find the file path to be packaged
mac and drag the file directly to the terminal to get the path
2 cd to the path
3 The pyinstaller -F -w main.py
following error was reported when entering mac packaging in the terminal
Unable to find "/anaconda3/lib/python3.6/site-packages/PyQt5/Qt/lib/QtWebEngineCore.framework/Resources" when adding binary and data files
Baidu took a look at the solution after installing the QtWebEngineWidgets library and repacking it
pip install PyQtWebEngine
After the installation is complete, try to package input
pyinstaller -F -w main.py
Another process is waiting for packaging ...
ps: Yellow is my computer name or project name, just ignore it, mainly look at the red area
and then succeed! ! ! ! ! !
When you enter the directory, you will see that the dist file is opened. There is a main in it. Click on the program and it will run.