pyinstaller文件太大,无法容纳在内存中

时间:2015-05-19 13:31:53

标签: python python-2.7 exe pyinstaller

我试图将这个简单的脚本转换为.exe。

 #!/usr/bin/python

print "pyinstaller is nice!"

命令是:

pyinstaller toExe.py

输出是:

6 INFO: wrote /tmp/toExe.spec
17 INFO: UPX is available.
26 INFO: Processing hook hook-os
73 INFO: Processing hook hook-time
74 INFO: Processing hook hook-cPickle
105 INFO: Processing hook hook-_sre
155 INFO: Processing hook hook-cStringIO
198 INFO: Processing hook hook-encodings
204 INFO: Processing hook hook-codecs
395 INFO: Extending PYTHONPATH with /tmp
396 INFO: checking Analysis
396 INFO: building because toExe.py changed
396 INFO: running Analysis out00-Analysis.toc
413 INFO: Analyzing /usr/local/lib/python2.7/dist-packages/PyInstaller/loader/_pyi_bootstrap.py
418 INFO: Processing hook hook-os
427 INFO: Processing hook hook-site
434 INFO: Processing hook hook-encodings
478 INFO: Processing hook hook-time
479 INFO: Processing hook hook-cPickle
510 INFO: Processing hook hook-_sre
561 INFO: Processing hook hook-cStringIO
609 INFO: Processing hook hook-codecs
837 INFO: Processing hook hook-pydoc
893 INFO: Processing hook hook-email
918 INFO: Processing hook hook-httplib
936 INFO: Processing hook hook-email.message
967 INFO: Analyzing /usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_importers.py
984 INFO: Analyzing /usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_archive.py
1004 INFO: Analyzing /usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_carchive.py
1020 INFO: Analyzing /usr/local/lib/python2.7/dist-packages/PyInstaller/loader/pyi_os_path.py
1025 INFO: Analyzing toExe.py
1026 INFO: Hidden import 'codecs' has been found otherwise
1026 INFO: Hidden import 'encodings' has been found otherwise
1026 INFO: Looking for run-time hooks
objdump: section '.dynamic' mentioned in a -j option, but not found in any input file
1138 INFO: Using Python library /usr/lib/libpython2.7.so.1.0
1138 INFO: Adding Python library to binary dependencies
1238 INFO: /tmp/build/toExe/out00-Analysis.toc no change!
1241 INFO: checking PYZ
1243 INFO: checking PKG
1243 INFO: building because toExe.py changed
1244 INFO: building PKG (CArchive) out00-PKG.pkg
objdump: section '.dynamic' mentioned in a -j option, but not found in any input file
1264 INFO: checking EXE
1264 INFO: rebuilding out00-EXE.toc because toExe missing
1264 INFO: building EXE from out00-EXE.toc
1269 INFO: Appending archive to EXE /tmp/build/toExe/toExe
1270 INFO: checking COLLECT
1270 INFO: building COLLECT out00-COLLECT.toc

我在Windows 7和XP中测试过它并且总是得到相同的消息:文件太大而无法放入内存中。 我的python版本在Kali linux上是2.7.3。

感谢。

1 个答案:

答案 0 :(得分:3)

“程序太大而无法融入记忆”means that the executable file's header is corrupt or the file has incorrect format

您是否在任何机会尝试在Windows中运行Linux可执行文件?

(Windows可执行文件以“MZ”开头,Linux ELF可执行文件以“⌂ELF”开头)