【发布时间】:2018-02-21 00:41:32
【问题描述】:
我是第一次尝试pyinstaller。我只用一行代码创建了一个名为hello.py 的文件:
print "hello"
我使用以下命令制作了一个二进制文件:
pyinstaller hello.py
该过程成功完成,并在dist/hello 创建了一个二进制文件。我无法运行此二进制文件。当我尝试从终端运行它时,我得到了,
bash: .: hello: cannot execute binary file
我试图从nautilus 双击它,但没有任何反应。
如何运行这个二进制文件?
我使用的是 Ubuntu 16.04
【问题讨论】:
-
命令
file /path/to/yourexecutable/hello的输出是什么? -
另外,您需要整个
dist/hello文件夹,而不仅仅是可执行文件。 -
@Locolois,我正在从 dist 文件夹本身运行文件。输出为
hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=373ec5dee826653796e927ac3d65c9a8ec7db9da, stripped
标签: python linux pyinstaller