PyInstaller没有创建.exe文件

时间:2015-08-17 00:30:27

标签: python python-3.x pyinstaller

我使用64位Ubuntu 15.04作为参考。

我的.py脚本(我想要的.exe)的位置是:/home/zix/pyinstaller-python3/btg_v0_5_0.py

所以我打开终端,然后:

zix@meh:~$ cd pyinstaller-python3
zix@meh:~/pyinstaller-python3$ python3 pyinstaller.py --onefile --console btg_v0_5_0.py
934 INFO: PyInstaller version 3.0dev
936 INFO: wrote /home/zix/pyinstaller-python3/btg_v0_5_0/btg_v0_5_0.spec
945 INFO: UPX is not available.
953 INFO: Extending PYTHONPATH with /home/zix/pyinstaller-python3
953 INFO: checking Analysis
954 INFO: Building Analysis because out00-Analysis.toc is non existent
955 INFO: Initializing module dependency graph...
960 INFO: Looking for graph hooks ...
969 INFO: Analyzing base_library.zip ...
20757 INFO: running Analysis out00-Analysis.toc
20850 INFO: Analyzing btg_v0_5_0.py
21387 INFO: Looking for import hooks ...
21400 INFO: Processing hook   hook-distutils.py
21417 INFO: Processing hook   hook-pydoc.py
21420 INFO: Processing hook   hook-encodings.py
21498 INFO: Processing hook   hook-xml.py
23148 INFO: Processing hook   hook-xml.sax.py
23164 INFO: Looking for ctypes DLLs - TODO
23165 INFO: Analyzing run-time hooks ...
23233 INFO: Looking for dynamic libraries
24999 INFO: Looking for eggs - TODO
25000 INFO: Using Python library /home/zix/anaconda3/bin/../lib/libpython3.4m.so.1.0
25055 INFO: Warnings written to /home/zix/pyinstaller-python3/btg_v0_5_0/build/btg_v0_5_0/warnbtg_v0_5_0.txt
25064 INFO: checking PYZ
25064 INFO: Building PYZ because out00-PYZ.toc is non existent
25065 INFO: Building PYZ (ZlibArchive) /home/zix/pyinstaller-python3/btg_v0_5_0/build/btg_v0_5_0/out00-PYZ.pyz
26056 INFO: checking PKG
26057 INFO: Building PKG because out00-PKG.toc is non existent
26057 INFO: Building PKG (CArchive) out00-PKG.pkg
61273 INFO: Bootloader /home/zix/pyinstaller-python3/PyInstaller/bootloader/Linux-64bit/run
61273 INFO: checking EXE
61274 INFO: Building EXE because out00-EXE.toc is non existent
61274 INFO: Building EXE from out00-EXE.toc
61276 INFO: Appending archive to EXE /home/zix/pyinstaller-python3/btg_v0_5_0/dist/btg_v0_5_0
zix@meh:~/pyinstaller-python3$ 

所以我查看/ home / zix / pyinstaller-python3 / btg_v0_5_0 / dist /,但文件夹中的所有内容都是"可执行文件"文件名为" btg_v0_5_0" (没有.exe扩展名)。 我甚至不确定这是什么。它是Linux可执行文件吗?如果是这样,为什么我不能运行它?我双击它,没有任何反应。我的游戏(BTG)是在控制台/终端中运行的基本文本冒险。运行btg_v0_5_0.py工作得很好。 重申一下,我的目标是获得一个可以在Windows上独立运行的工作.exe文件(btg_v0_5_0.exe),并且只需在cmd.exe /命令提示符下打开。 有什么我做错了,或者只是忘了?对此有任何帮助非常感谢。提前谢谢。

编辑:在sideshowbarker的评论之后,我进入了终端并运行了以下命令:pyinstaller-python3/btg_v0_5_0/dist/btg_v0_5_0 我得到以下内容:

zix@meh:~$ pyinstaller-python3/btg_v0_5_0/dist/btg_v0_5_0
mod is NULL - pyimod03_importersTraceback (most recent call last):
  File "/home/zix/pyinstallerpython3/pyinstaller-python3/PyInstaller/loader/pyimod03_importers.py", line 29, in <module>
AttributeError: 'module' object has no attribute '_MEIPASS'
Traceback (most recent call last):
  File "<string>", line 15, in <module>
ImportError: No module named 'pyimod03_importers'
zix@meh:~$

0 个答案:

没有答案