qq_41398808
猫猫虫(——)
2018-04-18 11:21
采纳率: 0%
浏览 2.3k

pyinstaller 打包python文件为exe时出错

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文件

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

3条回答 默认 最新

  • caozhy

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

    点赞 评论
  • caozhy

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

    点赞 评论
  • Draw_py
    Lighter Hu 2021-01-21 14:06

    我的也是这样的,博主的问题解决了吗?求解

     

    点赞 评论

相关推荐