Note
Binary files refers to DLLs, dynamic libraries, shared object-files, and such, which PyInstaller is going to search for further binary dependencies. Files like images and PDFs should go into the datas.
You can add binary files to the bundle by using the --add-binary command option, or by adding them as a list to the spec file. In the spec file, make a list of tuples that describe the files needed. Assign the list of tuples to the binaries= argument of Analysis.
Normally PyInstaller learns about .so and .dll libraries by analyzing the imported modules. Sometimes it is not clear that a module is imported; in that case you use a --hidden-import= command option. But even that might not find all dependencies.
Suppose you have a module special_ops.so that is written in C and uses the Python C-API. Your program imports special_ops, and PyInstaller finds and includes special_ops.so. But perhaps special_ops.so links to libiodbc.2.dylib. PyInstaller does not find this dependency. You could add it to the bundle this way:
a = Analysis(...
binaries=[ ( '/usr/lib/libiodbc.2.dylib', '.' ) ],
...
Or via the command line (again, see What to bundle, where to search for platform-specific details):
pyinstaller --add-binary '/usr/lib/libiodbc.2.dylib:.' myscript.py
As with data files, if you have multiple binary files to add, create the list in a separate statement and pass the list by name.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/f6ba237f-1061-46eb-9046-78280c953871%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.
Have you done a search on your machine?
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/37b0be72-f732-4178-a18e-ec692a9c80a6%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5d7b2fb7.1c69fb81.7b535.2704SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/37b0be72-f732-4178-a18e-ec692a9c80a6%40googlegroups.com.
Is gstreamer installed? If you do a ‘pip list’ does it show gstreamer?
Does you app use any video?
From: yi tian
Sent: Saturday, September 14, 2019 1:12 AM
To: Kivy users support
Subject: Re: [kivy-users] Pyinstaller compile kivy but gstreamer-1.0-0.dllandglib-2.0-0.dllcan't find
Yes, I searched on the computer and didn't have these two files.
Moreover, I am using the same project when I use it today.
Found that this time is three less .dll, so weird
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/87698c03-8099-4f39-bc8f-9b4c61836f07%40googlegroups.com.
@shrinivas sagit
If the error your seeing is a python runtime error, that is you successfully build an executable, and when you run it you see the error:
OSError: not found
[9114] Failed to execute script main
Are you setting that font excplicity somewhere in the app? If you are, you need to add the location of the fonts file to datas in your spec file. Something like this:
Datas = [(‘myprojectpath /kivy/fonts/Roboto-Regular.TTF’, ’directory path for your bundle’)]
The tuple is (source file, directory path in the bundle). The datas list can have a list of files.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAAytCshh177rvpox7-EO%2BK6xTQ3%3DM%3DLn6H-%3DD9K1Xc75bEYx_w%40mail.gmail.com.