pyinstaller 打包python文件为exe时出错 5C

cmd上运行后如下:
C:\WINDOWS\system32>pyinstaller -F C:\Users\lenovo\Desktop\文档\测试\btboay.py
128 INFO: PyInstaller: 3.3.1
128 INFO: Python: 3.6.5
129 INFO: Platform: Windows-10-10.0.16299-SP0
131 INFO: wrote C:\WINDOWS\system32\btboay.spec
141 INFO: UPX is not available.
142 INFO: Extending PYTHONPATH with paths
['C:\Users\lenovo\Desktop\文档\测试', 'C:\WINDOWS\system32']
143 INFO: checking Analysis
270 INFO: Building because inputs changed
271 INFO: Initializing module dependency graph...
294 INFO: Initializing module graph hooks...
299 INFO: Analyzing base_library.zip ...
7202 INFO: running Analysis out00-Analysis.toc
7208 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by d:\python\python.exe
7701 WARNING: lib not found: api-ms-win-crt-process-l1-1-0.dll dependency of d:\python\python36.dll
7782 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of d:\python\python36.dll
8887 INFO: Caching module hooks...
8900 INFO: Analyzing C:\Users\lenovo\Desktop\文档\测试\btboay.py
9554 INFO: Loading module hooks...
9555 INFO: Loading module hook "hook-encodings.py"...
10430 INFO: Loading module hook "hook-pydoc.py"...
10432 INFO: Loading module hook "hook-xml.py"...
10926 INFO: Loading module hook "hook-_tkinter.py"...
11707 INFO: checking Tree
11981 INFO: checking Tree
12067 INFO: Looking for ctypes DLLs
12067 INFO: Analyzing run-time hooks ...
12072 INFO: Including run-time hook 'pyi_rth__tkinter.py'
12094 INFO: Looking for dynamic libraries
12195 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of d:\python\DLLs_ssl.pyd
12327 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of d:\python\DLLs_hashlib.pyd
12828 INFO: Looking for eggs
12828 INFO: Using Python library d:\python\python36.dll
12829 INFO: Found binding redirects:
[]
12849 INFO: Warnings written to C:\WINDOWS\system32\build\btboay\warnbtboay.txt
12952 INFO: Graph cross-reference written to C:\WINDOWS\system32\build\btboay\xref-btboay.html
13010 INFO: checking PYZ
13036 INFO: Building because toc changed
13036 INFO: Building PYZ (ZlibArchive) C:\WINDOWS\system32\build\btboay\out00-PYZ.pyz
14218 INFO: Building PYZ (ZlibArchive) C:\WINDOWS\system32\build\btboay\out00-PYZ.pyz completed successfully.
14232 INFO: checking PKG
14291 INFO: Building because toc changed
14291 INFO: Building PKG (CArchive) out00-PKG.pkg
20903 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
20975 INFO: Bootloader d:\python\lib\site-packages\PyInstaller\bootloader\Windows-32bit\run.exe
20975 INFO: checking EXE
21034 INFO: Building because toc changed
21034 INFO: Building EXE from out00-EXE.toc
21219 INFO: Appending archive to EXE C:\WINDOWS\system32\dist\btboay.exe
21236 INFO: Building EXE from out00-EXE.toc completed successfully.

但我要打包的文件目录下只生成了一个__pycache__文件夹,没有打包的EXE文件

2个回答

要正确安装python 3.6,visual c++ 2012运行库和pyinstaller,缺一不可。
检查下路径和权限。

C:\WINDOWS\system32\dist\btboay.exe
另外,你生成的文件在C:\WINDOWS\system32\dist下面。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问