Pyinstaller compile kivy but gstreamer-1.0-0.dll and glib-2.0-0.dll can't find

215 views
Skip to first unread message

yi tian

unread,
Sep 12, 2019, 5:57:49 AM9/12/19
to Kivy users support
Hello everyone
I am using pyinstaller to compile exe.
This error occurred. Could not find lib
I don't know how to solve it?
I haven't found a good way to search it.
Thank you

1.png


Elliot Garbus

unread,
Sep 12, 2019, 2:01:36 PM9/12/19
to kivy-...@googlegroups.com

Adding Binary Files

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.dylibPyInstaller 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.

 

yi tian

unread,
Sep 13, 2019, 1:39:46 AM9/13/19
to Kivy users support
I want to know where these two .dll are downloaded.
Not on my computer
gstreamer-1.0-0.dll   andglib-2.0-0.dll


在 2019年9月13日星期五 UTC+8上午2:01:36,Elliot Garbus写道:

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.

Elliot Garbus

unread,
Sep 13, 2019, 1:57:19 AM9/13/19
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.

 

srinivas sagit

unread,
Sep 13, 2019, 10:39:58 PM9/13/19
to kivy-...@googlegroups.com
while using pyinstaller this error occurs OSError: File myprojectpath /kivy/fonts/Roboto-Regular.TTF not found
[9114] Failed to execute script main

வெள்., 13 செப்., 2019, முற்பகல் 11:27 அன்று Elliot Garbus <elli...@cox.net எழுதியது:

yi tian

unread,
Sep 14, 2019, 4:12:51 AM9/14/19
to Kivy users support
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

QQ截图20190914152816.png


I searched the computer again, without these three files.

在 2019年9月13日星期五 UTC+8下午1:57:19,Elliot Garbus写道:

Elliot Garbus

unread,
Sep 14, 2019, 10:04:21 AM9/14/19
to kivy-...@googlegroups.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.

 

Elliot Garbus

unread,
Sep 14, 2019, 10:15:41 AM9/14/19
to kivy-...@googlegroups.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. 

Reply all
Reply to author
Forward
0 new messages