Pyinstaller 在 Linux 上失败,缺少 `objcopy`
Pyinstaller fails on Linux with missing `objcopy`
我有简单的 python 代码,它打印 hello (hello.py
),我想使用 pyinstaller 将其执行到 运行 on 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
有什么提示吗?
问题在一周左右后没有任何改变就消失了
我有简单的 python 代码,它打印 hello (hello.py
),我想使用 pyinstaller 将其执行到 运行 on 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
有什么提示吗?
问题在一周左右后没有任何改变就消失了