不要使用python3.8在python3.8当中不支持installers插件的安装比较坑爹
在dos当中输入指令实现对文件包进行安装操作
D:\python\PythonProject>pip installer pyinstaller
ERROR: unknown command "installer" - maybe you meant "install"
D:\python\PythonProject>pip install pyinstaller
Collecting pyinstaller
Using cached https://files.pythonhosted.org/packages/82/96/21ba3619647bac2b34b4996b2dbbea8e74a703767ce24192899d9153c058/pyinstaller-
4.0.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: setuptools in c:\users\10035\appdata\local\programs\python\python37\lib\site-packages (from pyinstaller
) (41.2.0)
Collecting pefile>=2017.8.1; sys_platform == "win32" (from pyinstaller)
Using cached https://files.pythonhosted.org/packages/36/58/acf7f35859d541985f0a6ea3c34baaefbfaee23642cf11e85fe36453ae77/pefile-2019.
4.18.tar.gz
Collecting pywin32-ctypes>=0.2.0; sys_platform == "win32" (from pyinstaller)
es-0.2.0-py2.py3-none-any.whl
Collecting altgraph (from pyinstaller)
7-py2.py3-none-any.whl
Collecting pyinstaller-hooks-contrib>=2020.6 (from pyinstaller)
hooks_contrib-2020.9-py2.py3-none-any.whl
Collecting future (from pefile>=2017.8.1; sys_platform == "win32"->pyinstaller)
Using cached https://files.pythonhosted.org/packages/45/0b/38b06fd9b92dc2b68d58b75f900e97884c45bedd2ff83203d933cf5851c9/future-0.18.
2.tar.gz
Building wheels for collected packages: pyinstaller
Building wheel for pyinstaller (PEP 517) ... done
Created wheel for pyinstaller: filename=pyinstaller-4.0-cp37-none-any.whl size=2789243 sha256=d3c2c3188250fa0a1203f6298c1b42c051fc18
1a98e7872e2a1f61fe4ea302ad
Stored in directory: C:\Users\10035\AppData\Local\pip\Cache\wheels\cb\91\a9\1e2b69cf9e01f0f6a89c2c6166324319ca6273d26604b200b6
Successfully built pyinstaller
Installing collected packages: future, pefile, pywin32-ctypes, altgraph, pyinstaller-hooks-contrib, pyinstaller
Running setup.py install for future ... done
Running setup.py install for pefile ... done
Successfully installed altgraph-0.17 future-0.18.2 pefile-2019.4.18 pyinstaller-4.0 pyinstaller-hooks-contrib-2020.9 pywin32-ctypes-0.
2.0
WARNING: You are using pip version 19.2.3, however version 20.2.4 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
D:\python\PythonProject>python -m pip install --upgrade pip
Collecting pip
y2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 19.2.3
Uninstalling pip-19.2.3:
Successfully uninstalled pip-19.2.3
Successfully installed pip-20.2.4
D:\python\PythonProject>pyinstaller -v
4.0
D:\python\PythonProject>pyinstaller -F D:\python\PythonProject\StudyProject1\StudentSystem.py
50 INFO: PyInstaller: 4.0
50 INFO: Python: 3.7.6
50 INFO: Platform: Windows-10-10.0.19041-SP0
51 INFO: wrote D:\python\PythonProject\StudentSystem.spec
55 INFO: UPX is not available.
57 INFO: Extending PYTHONPATH with paths
['D:\\python\\PythonProject\\StudyProject1', 'D:\\python\\PythonProject']
62 INFO: checking Analysis
63 INFO: Building Analysis because Analysis-00.toc is non existent
63 INFO: Initializing module dependency graph...
65 INFO: Caching module graph hooks...
76 INFO: Analyzing base_library.zip ...
2409 INFO: Caching module dependency graph...
2510 INFO: running Analysis Analysis-00.toc
2518 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\users\10035\appdata\local\programs\python\python37\python.exe
2604 INFO: Analyzing D:\python\PythonProject\StudyProject1\StudentSystem.py
2611 INFO: Processing module hooks...
2611 INFO: Loading module hook 'hook-encodings.py' from 'c:\\users\\10035\\appdata\\local\\programs\\python\\python37\\lib\\site-packa
ges\\PyInstaller\\hooks'...
2669 INFO: Loading module hook 'hook-xml.py' from 'c:\\users\\10035\\appdata\\local\\programs\\python\\python37\\lib\\site-packages\\P
yInstaller\\hooks'...
2844 INFO: Looking for ctypes DLLs
2844 INFO: Analyzing run-time hooks ...
2848 INFO: Looking for dynamic libraries
2982 INFO: Looking for eggs
2982 INFO: Using Python library c:\users\10035\appdata\local\programs\python\python37\python37.dll
2983 INFO: Found binding redirects:
[]
2985 INFO: Warnings written to D:\python\PythonProject\build\StudentSystem\warn-StudentSystem.txt
3010 INFO: Graph cross-reference written to D:\python\PythonProject\build\StudentSystem\xref-StudentSystem.html
3024 INFO: checking PYZ
3024 INFO: Building PYZ because PYZ-00.toc is non existent
3025 INFO: Building PYZ (ZlibArchive) D:\python\PythonProject\build\StudentSystem\PYZ-00.pyz
3406 INFO: Building PYZ (ZlibArchive) D:\python\PythonProject\build\StudentSystem\PYZ-00.pyz completed successfully.
3416 INFO: checking PKG
3416 INFO: Building PKG because PKG-00.toc is non existent
3416 INFO: Building PKG (CArchive) PKG-00.pkg
4543 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
4545 INFO: Bootloader c:\users\10035\appdata\local\programs\python\python37\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run
.exe
4545 INFO: checking EXE
4546 INFO: Building EXE because EXE-00.toc is non existent
4546 INFO: Building EXE from EXE-00.toc
4547 INFO: Appending archive to EXE D:\python\PythonProject\dist\StudentSystem.exe
4552 INFO: Building EXE from EXE-00.toc completed successfully.