树莓派4B怎么将python程序打包成二进制

meteorlsl 10cm2024-09-24170 次点击
安装不上pyinstaller,在树莓派上有什么办法能够把python文件打包为二进制文件吗?
收藏 ♥ 感谢
Spoony 小组长 2024-09-25 
可以使用 pip 安装 pyinstaller

pip install pyinstaller

参考:https://www.cnblogs.com/wendaobiancheng/p/9772509.html
meteorlsl 10cm 2024-09-27 
用这个命令,会出现这个问题,安装不上
pip install pyinstaller
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

For more information visit http://rptl.io/venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
meteorlsl 10cm 2024-09-27 
用这个命令:sudo apt install python3-pyinstaller
找不到对应的安装包
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package python3-pyinstaller
Tony 214.15m 2024-09-28  ♥ 1

登录注册 后可回复。