<分区>
我有简单的 python 代码打印 hello (hello.py
),我想使用 pyinstaller 使其可执行,以便在 Linux 上运行:
#!/usr/bin/python3.5
#!/usr/bin/env python3.5
def welcome():
print('Welcome')
welcome()
我应用命令 pyinstaller hello.py
并以以下异常结束:
6204 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
6205 INFO: Bootloader /home/nour/.local/lib/python3.5/site-packages/PyInstaller/bootloader/Linux-64bit/run
6206 INFO: checking EXE
6206 INFO: Building EXE because out00-EXE.toc is non existent
6206 INFO: Building EXE from out00-EXE.toc
6206 INFO: Appending archive to ELF section in EXE /home/nour/python/build/hello/hello
Traceback (most recent call last):
File "/home/nour/.local/bin/pyinstaller", line 9, in <module>
load_entry_point('PyInstaller==3.3.1', 'console_scripts', 'pyinstaller')()
<...>
File "/usr/lib64/python3.5/subprocess.py", line 1282, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'objcopy'
我已经尝试过但没有帮助的:
- 我将 python3.5 更改为 python3 和 python
有什么提示吗?