2017-10-13 226 views
3

我嘗試安裝並運行它,但是我這樣做並不起作用。當我嘗試安裝pyinstaller時,我無法運行命令

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

是python添加在你的本地路徑嗎? –

回答

0

PyInstaller是一個不是包的應用程序。您可以使用它,而無需將其安裝在您的PC中。只需下載並解壓即可。

cd pyinstaller 

你想要的包是newscript.py。我將它保存在pyinstaller文件夾中。現在,爲了創建可執行文件出這個劇本的只是運行

`python pyinstaller.py newscript.py` 

將處理腳本和一個文件夾,名爲newscript將被創建。 Pyinstaller使用build文件夾作爲臨時容器來包含所需的軟件包和文件。 dist文件夾將包含可執行文件。

0

嘗試pip install pywin32-ctypes

相關問題