我尝试安装并运行它但我这样做并且它不起作用。
C:\Users\Dino Non Admin>py -m pip install pyinstaller
Collecting pyinstaller
Using cached PyInstaller-3.3.tar.gz
Requirement already satisfied: setuptools in c:\users\dino non admin\appdata\local\programs\python\python35\lib\site-packages (from pyinstaller)
Requirement already satisfied: pefile>=2017.8.1 in c:\users\dino non admin\appdata\local\programs\python\python35\lib\site-packages (from pyinstaller)
Requirement already satisfied: macholib>=1.8 in c:\users\dino non admin\appdata\local\programs\python\python35\lib\site-packages (from pyinstaller)
Requirement already satisfied: future in c:\users\dino non admin\appdata\local\programs\python\python35\lib\site-packages (from pyinstaller)
Requirement already satisfied: pypiwin32 in c:\users\dino non admin\appdata\local\programs\python\python35\lib\site-packages (from pyinstaller)
Requirement already satisfied: altgraph>=0.13 in c:\users\dino non admin\appdata\local\programs\python\python35\lib\site-packages (from macholib>=1.8->pyinstaller)
Installing collected packages: pyinstaller
Running setup.py install for pyinstaller ... done
Successfully installed pyinstaller-3.3
C:\Users\Dino Non Admin>pyinstaller
'pyinstaller' is not recognized as an internal or external command,
operable program or batch file.
此外,对于这些文件:
pyinstaller.exe
pyinstaller-script.py
当我打开它时,它会这样做:
Pyinstaller cannot check for assembly dependencies.
Please install PyWin32 or PyWin32-ctypes
我尝试做它所说的,但是
C:\Users\Dino Non Admin>py -m pip install pypiwin32
Requirement already satisfied: pypiwin32 in c:\users\dino non admin\appdata\local\programs\python\python35\lib\site-packages
答案 0 :(得分:1)
尝试pip install pywin32-ctypes
。
答案 1 :(得分:0)
PyInstaller是一个不是包的应用程序。您可以在不将其安装到PC中的情况下使用它。只需下载并解压缩即可。
cd pyinstaller
您想要的套餐是newscript.py
。我将它保存在pyinstaller文件夹中。现在,为了从这个脚本中创建可执行文件,只需运行
`python pyinstaller.py newscript.py`
它将处理脚本,并将创建一个名为newscript的文件夹。 Pyinstaller使用构建文件夹作为临时容器来包含所需的包和文件。 dist文件夹将包含可执行文件。