Language translations now possible!
Hello all! I'm writing a Python program that uses a lot of dependencies and Python libraries. How can I convert this Python file into one standalone executable file that can run on PiCore 10.0 Beta? This way I can distribute my program to anyone that has a rpi and run it without having to install any other required files. For example on Windows I use PyInstaller to create a .exe file that I am able to run on any computer.
Quote from: Aladin on May 21, 2020, 05:20:09 AMHello all! I'm writing a Python program that uses a lot of dependencies and Python libraries. How can I convert this Python file into one standalone executable file that can run on PiCore 10.0 Beta? This way I can distribute my program to anyone that has a rpi and run it without having to install any other required files. For example on Windows I use PyInstaller to create a .exe file that I am able to run on any computer.On any computer running Windows )
You could make one large extension?btw - piCore-10.x is not actively maintained, you might be better off using the latest release, piCore-9.x, or the latest beta, piCore-11.x.
$ tce-load -i squashfs-tools$ cd /tmp$ sudo mksquashfs pkg/ mybigextension.tcz
... This way I can distribute my program to anyone that has a rpi and run it without having to install any other required files. ...
... For example on Windows I use PyInstaller to create a .exe file that I am able to run on any computer.
PyInstallers main advantages over similar tools are that PyInstaller works with Python 2.7 and 3.5-3.7, it builds smaller executables thanks to transparent compression, it is fully multi-platform, and use the OS support to load the dynamic libraries, thus ensuring full compatibility.
PyInstaller QuickstartInstall PyInstaller from PyPI:Code: [Select]pip install pyinstallerGo to your programs directory and run:Code: [Select]pyinstaller yourprogram.pyThis will generate the bundle in a subdirectory called dist.For a more detailed walkthrough, see the manual. https://pyinstaller.readthedocs.io/
pip install pyinstaller
pyinstaller yourprogram.py