pyinstaller用在平常完成專案進度做打包的動作,但是沒有注意到環境設訂的很容易打包些不必要的python函式庫,造成生成的執行檔體積過大,不必要的函式庫是其他專案所留下的,為了把自己正在執行進度的專案和其他專案所使用的函式作區隔,於是我需要另一個工具virtualenv,顧名思義是指在系統中生成另一個乾淨虛擬環境並安裝對應專案的函式庫再打包就好了。
https://pypi.org/project/pyinstaller/
pip3 install pyinstaller
安裝pyinstaller訊息
Collecting pyinstaller
Downloading pyinstaller-4.0.tar.gz (3.5 MB)
|████████████████████████████████| 3.5 MB 656 kB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting pyinstaller-hooks-contrib>=2020.6
Downloading pyinstaller_hooks_contrib-2020.9-py2.py3-none-any.whl (163 kB)
|████████████████████████████████| 163 kB 3.2 MB/s
Collecting pywin32-ctypes>=0.2.0; sys_platform == "win32"
Using cached pywin32_ctypes-0.2.0-py2.py3-none-any.whl (28 kB)
Collecting altgraph
Using cached altgraph-0.17-py2.py3-none-any.whl (21 kB)
Requirement already satisfied: setuptools in c:\python38\lib\site-packages (from pyinstaller) (47.1.0)
Collecting pefile>=2017.8.1; sys_platform == "win32"
Using cached pefile-2019.4.18.tar.gz (62 kB)
Collecting future
Using cached future-0.18.2.tar.gz (829 kB)
Using legacy setup.py install for pefile, since package 'wheel' is not installed.
Using legacy setup.py install for future, since package 'wheel' is not installed.
Building wheels for collected packages: pyinstaller
Building wheel for pyinstaller (PEP 517) ... done
Created wheel for pyinstaller: filename=pyinstaller-4.0-py3-none-any.whl size=2789243 sha256=956a2274a87878cfafa47bc860d3836b530e1ce23d6904c089c2d7cbedb446f4
Stored in directory: c:\users\wifipc\appdata\local\pip\cache\wheels\9b\28\8f\f51ae22c4391bbeb36c8fdc68203b0c094445b4db824a6ab7d
Successfully built pyinstaller
Installing collected packages: pyinsta