Skip to content

Deb packaging

Latest
Compare
Choose a tag to compare
@Franck1333 Franck1333 released this 13 Apr 14:38
· 27 commits to master since this release

Hello everyone,

These days i'm working to find a way to deploy my programs, but sometimes it's a bit tricky.
I'm using PyInstaller. πŸ‘ πŸŒ™ πŸŒ‰

.Deb packaging:

First, you will need to Install PyInstaller:
sudo pip3 install PyInstaller

Then, go into the project folder and type this:

sudo pyinstaller -F <main.py>

For a standard program :

  • All the modules must be at the Root folder of the project before compiling all the project.

After all :

For a kivy program :

The Reason why I don't want to deploy my kivy progams, is that there is always a problem with a OpenGL drivers somewhere on any kind of plateform use (PC/RPI).
Maybe later they will find the problem and fix it but today it's just frustrating!

The error report from console when the errors occured on Raspberry Pi 3 B+:

[---RPI GL DRIVER ENABLE---]
symbol lookup error: /usr/lib/libGLX_mesa.so.0: undefined symbol: drmGetDevice2

[---RPI GL DRIVER DISABLE---]
MESA-LOADER: failed to open swrast (search paths /usr/lib/arm-linux-gnueabihf/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: swrast
[CRITICAL] [Window      ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
egl_rpi - ImportError: cannot import name 'bcm'
  File "/usr/local/lib/python3.5/dist-packages/kivy/core/__init__.py", line 63, in core_select_lib
  File "/usr/local/lib/python3.5/dist-packages/PyInstaller/loader/pyimod03_importers.py", line 623, in exec_module
  File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/window_egl_rpi.py", line 12, in <module>

sdl2 - RuntimeError: b'Could not create GL context: BadValue (integer parameter out of range for operation)'
  File "/usr/local/lib/python3.5/dist-packages/kivy/core/__init__.py", line 71, in core_select_lib
  File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/window_sdl2.py", line 152, in __init__
  File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/__init__.py", line 981, in __init__
  File "/usr/local/lib/python3.5/dist-packages/kivy/core/window/window_sdl2.py", line 290, in create_window
  File "kivy/core/window/_window_sdl2.pyx", line 232, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (/tmp/pip-wheel-rxdsqi5z/Kivy/kivy/core/window/_window_sdl2.c:4820)
  File "kivy/core/window/_window_sdl2.pyx", line 74, in kivy.core.window._window_sdl2._WindowSDL2Storage.die (/tmp/pip-wheel-rxdsqi5z/Kivy/kivy/core/window/_window_sdl2.c:3434)

x11 - ImportError: No module named 'kivy.core.window.window_x11'
  File "/usr/local/lib/python3.5/dist-packages/kivy/core/__init__.py", line 63, in core_select_lib

[CRITICAL] [App         ] Unable to get a Window, abort.

Thank you all,
ROCHAT Franck 🍭 .