繁体   English   中英

当我尝试安装pyinstaller时,无法运行命令

[英]When i try to install pyinstaller, I can't run the command

我尝试安装并运行它,但是这样做并不能正常工作。

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

尝试pip install pywin32-ctypes

PyInstaller是应用程序而不是程序包。 您可以在不将其安装到PC的情况下使用它。 只需下载并解压缩即可。

cd pyinstaller

您想要的包是newscript.py 我将其保存在pyinstaller文件夹中。 现在为了从该脚本创建可执行文件,只需运行

`python pyinstaller.py newscript.py` 

它会处理脚本,并会创建一个名为newscript的文件夹。 Pyinstaller将build文件夹用作包含所需软件包和文件的临时容器。 dist文件夹将包含可执行文件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM