Pyinstaller EXE文件在启动时崩溃

时间:2019-01-29 22:43:21

标签: python crash pyinstaller

我不确定我是否做对了,这是我第一次问问题,这是关于将我的小python程序打包到可以在任何笔记本电脑上运行的EXE文件中。因此,我同时尝试了cx_freeze和pyisntaller,事实证明cx_freeze甚至无法成功安装并且pyinstaller可以工作,但是它生成的EXE文件没有执行任何操作便自动崩溃了。我的python程序没有任何GUI,应该在启动时生成一些东西,然后要求您输入数据。我的python代码或pyinstaller出问题了吗? 因为我在实验室的台式机和台式机上都尝试过,所以在不同的环境下,结果是相同的。

下面附带的代码来自pyinstaller,看来有很多警告。

期待您的帮助,我明天需要运行。...

2324 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python.exe
2340 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python.exe
2359 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python.exe
2375 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python.exe
2393 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python.exe
2479 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
2495 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
2511 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
2528 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
2546 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
2564 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
2581 WARNING: lib not found: api-ms-win-crt-locale-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
2599 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
2615 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
2631 WARNING: lib not found: api-ms-win-crt-process-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
2647 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
2666 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\python36.dll
2686 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\VCRUNTIME140.dll
2703 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\VCRUNTIME140.dll
2719 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\VCRUNTIME140.dll
2737 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\VCRUNTIME140.dll
2753 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\VCRUNTIME140.dll
2756 INFO: Caching module hooks...
2760 INFO: Analyzing D:\Test\DBS_real.py
2820 INFO: Loading module hooks...
2820 INFO: Loading module hook "hook-encodings.py"...
2882 INFO: Loading module hook "hook-pydoc.py"...
2883 INFO: Loading module hook "hook-xml.py"...
3039 INFO: Looking for ctypes DLLs
3039 INFO: Analyzing run-time hooks ...
3043 INFO: Looking for dynamic libraries
3063 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
3079 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
3096 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
3112 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
3128 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
3144 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
3160 WARNING: lib not found: api-ms-win-crt-filesystem-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
3178 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
3194 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
3212 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_ssl.pyd
3236 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\pyexpat.pyd
3252 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\pyexpat.pyd
3270 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\pyexpat.pyd
3286 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\pyexpat.pyd
3303 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\pyexpat.pyd
3323 WARNING: lib not found: api-ms-win-crt-environment-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
3339 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
3355 WARNING: lib not found: api-ms-win-crt-conio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
3371 WARNING: lib not found: api-ms-win-crt-utility-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
3389 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
3407 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
3424 WARNING: lib not found: api-ms-win-crt-time-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
3441 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
3457 WARNING: lib not found: api-ms-win-crt-convert-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_hashlib.pyd
3478 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_lzma.pyd
3495 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_lzma.pyd
3514 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_socket.pyd
3532 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_socket.pyd
3554 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\unicodedata.pyd
3570 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\unicodedata.pyd
3586 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\unicodedata.pyd
3612 WARNING: lib not found: api-ms-win-crt-stdio-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_bz2.pyd
3628 WARNING: lib not found: api-ms-win-crt-math-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_bz2.pyd
3644 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_bz2.pyd
3660 WARNING: lib not found: api-ms-win-crt-string-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_bz2.pyd
3678 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\_bz2.pyd
3697 WARNING: lib not found: api-ms-win-crt-runtime-l1-1-0.dll dependency of c:\users\jinze\appdata\local\programs\python\python36\DLLs\select.pyd
3700 INFO: Looking for eggs
3700 INFO: Using Python library c:\users\jinze\appdata\local\programs\python\python36\python36.dll
3700 INFO: Found binding redirects:
[]
3707 INFO: Warnings written to D:\Test\build\DBS_real\warn-DBS_real.txt
3735 INFO: Graph cross-reference written to D:\Test\build\DBS_real\xref-DBS_real.html
3768 INFO: checking PYZ
3768 INFO: Building PYZ because PYZ-00.toc is non existent
3769 INFO: Building PYZ (ZlibArchive) D:\Test\build\DBS_real\PYZ-00.pyz
4045 INFO: Building PYZ (ZlibArchive) D:\Test\build\DBS_real\PYZ-00.pyz completed successfully.
4054 INFO: checking PKG
4054 INFO: Building PKG because PKG-00.toc is non existent
4055 INFO: Building PKG (CArchive) PKG-00.pkg
5163 INFO: Building PKG (CArchive) PKG-00.pkg completed successfully.
5168 INFO: Bootloader c:\users\jinze\appdata\local\programs\python\python36\lib\site-packages\PyInstaller\bootloader\Windows-64bit\run.exe
5168 INFO: checking EXE
5168 INFO: Building EXE because EXE-00.toc is non existent
5169 INFO: Building EXE from EXE-00.toc
5169 INFO: Appending archive to EXE D:\Test\dist\DBS_real.exe
5358 INFO: Building EXE from EXE-00.toc completed successfully.

1 个答案:

答案 0 :(得分:0)

此处正在讨论您收到的警告。 https://github.com/pyinstaller/pyinstaller/issues/1566

不幸的是,从我在这里看到的内容来看,如果没有一些非常大的额外步骤,pyinstaller似乎无法在Windows 10上运行。