tags: pyinstaller package is too large The pyinstaller package exe runs too slowly scipy package failed Unable to install python
I wrote an interface program using pyqt through python and packaged it into an exe file using pyinstaller
The packaged exe file is very large, 280M, and what is even more unbearable is that it opens very, very slowly! ! !
After trying it, there is no use, it is still very very large, very very slow.
Some people on the Internet say that it is an anaconda problem. You should install pure python instead of anaconda, because there are too many anaconda packages. When packaging, your exe will integrate many unnecessary packages, resulting in too large exe files. Because a lot of unnecessary packages are integrated, and the exe will load the dependencies first when it is opened, resulting in slow file opening!
Therefore, install win7 with a virtual machine, and install pure python on win7. URL:https://www.python.org/, If the download is too slow, you can copy the link and download python.exe in Thunder.
Copy the file to win7, execute it with python, you will see that various packages are missing, and then install various packages according to the prompt pip until you successfully run your project on win7. Pip domestic mirror installation package:
pip install package name -i https://pypi.tuna.tsinghua.edu.cn/simple/
Then comes the highlight! ! !
pip install pyinstaller, and then under your project:
pyinstaller -F XXX.py
After success, there will be a XXX.exe file under the dist file
It can be found that the exe file is greatly reduced, and the opening is much faster! ! ! (280M reduced to 72M!!!)
If you don't want to display the win console, you can execute:
pyinstaller -F -w XXX.py
It is recommended to display the console at the beginning, because thisYou can see the error message prompt in the console! ! ! , For the problem of returning in a flash, you can use the mobile phone recording function to record errors for easy viewing! ! !

This is because the win7 version is too old, just update it in windows update!
When pyinstaller was packaging, the generated exe file could not be opened. I checked the error, it was because of scipy.
The original version of scipy is 1.3.3. I think the version is too high, so I uninstalled and reinstalled scipy==1.0.0
Successfully packaged! ! !
I originally installed python in the Program Files of the C drive, and found that there were often no access rights problems, so I uninstalled and reinstalled it in another location without any problems.
Python pyinstaller package redundancy solution Let me briefly talk about it. Due to code development, with the increasing number of pip packages, the files packaged by pyinstaller often package some u...
Introduced in the project, the font package file is too large, resulting in slow load, use the font-spider) 1. Install Font-Spider (globally installed) 2. Check if the installation is successful 3. Ne...
Problem restatement Recently I wrote a small game (Hua Rong Dao), the amount of code is not large, mainly realized by the pygame module. The amount of code is not large, so it is definitely not the pr...
Slumped answer - know almost https://www.zhihu.com/question/268397385/answer/611317903...
Table of contents 1 Installation and use of PIPENV 2 pyinstaller pack multiple files 3 Other precautions Many friends use Pyinstaller to pack it. After packing, you will find that the file is very lar...
Entering pyinstaller -Fw file directly will generate a file of about 100M, which will take a long time to open, even with statements like from… import. The reason is that adding -F generates a ...
The first is that you have a lot of bags you don't need in your default environment. So you can't use the default environment The new environment here is i31, Python version is 3.8 This reader can mod...
Due to the network environment problem, some Node packages can not download or download speed, which can be used to use Taobao NPM mirror instead of npm, the installation method is as follows: Taobao ...
After using the Pyinstaller released, many times the exe is very large, and it will be hundredmm. The reason is mainly because the Python environment has installed too many packages. It actuall...
1. Check "whether to compress the code" 2. subcontract https://uniapp.dcloud.io/collocation/manifest.html#%E5%85%B3%E4%BA%8E%E5%88%86%E5%8C%85%E4%BC%98%E5%8C%96%E7%9A%84%E8%AF%B4%E6%98%8Ehtt...