Menu

#24 PyGI Gstreamer + Kivy problem

1.0
open
nobody
None
2015-09-19
2015-08-21
Glen Diener
No

I have successfully used pygi in a couple of msys implementations without problem, thanks for a great project!

However, I have an installation of msys2 (msys2-x86_64-20150512, https://sourceforge.net/projects/msys2/), with both python 2.7 and 3.4 installed from pacman.
Using pygi-aio-3.14.0_rev19-setup, I can't install to either location. Specifically, I can
add the path to pythonX.Y directory as the portable python directory, but in the following dialog box, the path is never displayed as an option: its as if the installer doesn't recognize the paths as valid python installations.

I've tried installing 'by hand' using an earlier version of pygi, pygi-aio-3.4.2_rev11, and following the included readme. Unfortunately, this doesn't result in a working system:

$ python -i
Python 2.7.10 (default, Jul 8 2015, 15:10:39)
[GCC 5.1.0] on win32
Type "help", "copyright", "credits" or "license" for more information.

import gi
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:/msys64/mingw64/lib/python2.7/site-packages/gi/init.py", line 27, in <module>
from ._gi import _API, Repository
ImportError: DLL load failed: %1 is not a valid Win32 application.

Is there something wrong, or am I just hoping for too much?

thanks!
I have successfully used pygi in a couple of msys implementations without problem, thanks for a great project!

However, I have an installation of msys2 (msys2-x86_64-20150512, https://sourceforge.net/projects/msys2/), with both python 2.7 and 3.4 installed from pacman.
Using pygi-aio-3.14.0_rev19-setup, I can

Related

Tickets: #24

Discussion

  • tumagonx

    tumagonx - 2015-08-21

    mingw python might works but with mismatch runtime (msvcrt.dll vs msvcr90/msvcr100.dll). This installer really intended for official python (msvc)

    the win32 not valid could be mismatch 32bit/64bit, note that you can unpack newer installer too with 7zip.

     
  • tumagonx

    tumagonx - 2015-08-21

    FYI installer check the following
    import distutils.sysconfig; print (distutils.sysconfig.get_python_version())
    import distutils.sysconfig; print (distutils.sysconfig.get_python_lib())
    import sys; print (sys.maxsize)

    Aditionally without dos 8+3 name enabled you will encounter this bug when custom path specified: https://sourceforge.net/p/pygobjectwin32/tickets/21/

     

    Last edit: tumagonx 2015-08-21
    • Glen Diener

      Glen Diener - 2015-08-24

      Thanks for the info...I wasn't able to load gi using the mingw python,
      but was successfull using the official python. For some reason, I
      can't load any gstreamer elements from libgstvideoparsersbad, even
      though the dll is installed. Odd, because there is no problem with a
      few dozen other gstream er elements.

      (python.exe:2588): GStreamer-WARNING **: Failed to load plugin
      'C:\Python27\Lib\site-packages\gnome\lib\gstreamer-1.0\libgstvideoparsersbad.dll':
      'C:\Python27\Lib\site-packages\gnome\lib\gstreamer-1.0\libgstvideoparsersbad.dll':
      The specified module could not be found.

      On Fri, Aug 21, 2015 at 5:09 PM, tumagonx tumagonx@users.sf.net wrote:

      FYI installer check the following
      import distutils.sysconfig; print (distutils.sysconfig.get_python_version())
      import distutils.sysconfig; print (distutils.sysconfig.get_python_lib())
      import sys; print (sys.maxsize)


      [tickets:#24] can't install to msys2

      Status: open
      Milestone: 1.0
      Created: Fri Aug 21, 2015 10:23 PM UTC by Glen Diener
      Last Updated: Fri Aug 21, 2015 10:59 PM UTC
      Owner: nobody

      I have successfully used pygi in a couple of msys implementations without
      problem, thanks for a great project!

      However, I have an installation of msys2 (msys2-x86_64-20150512,
      https://sourceforge.net/projects/msys2/), with both python 2.7 and 3.4
      installed from pacman.
      Using pygi-aio-3.14.0_rev19-setup, I can't install to either location.
      Specifically, I can
      add the path to pythonX.Y directory as the portable python directory, but in
      the following dialog box, the path is never displayed as an option: its as
      if the installer doesn't recognize the paths as valid python installations.

      I've tried installing 'by hand' using an earlier version of pygi,
      pygi-aio-3.4.2_rev11, and following the included readme. Unfortunately, this
      doesn't result in a working system:

      $ python -i
      Python 2.7.10 (default, Jul 8 2015, 15:10:39)
      [GCC 5.1.0] on win32
      Type "help", "copyright", "credits" or "license" for more information.

      import gi
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "C:/msys64/mingw64/lib/python2.7/site-packages/gi/init.py", line 27, in
      <module>
      from ._gi import _API, Repository
      ImportError: DLL load failed: %1 is not a valid Win32 application.

      Is there something wrong, or am I just hoping for too much?

      thanks!


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/pygobjectwin32/tickets/24/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Tickets: #24

  • tumagonx

    tumagonx - 2015-08-24

    Which version is this?
    Could you check it with dependecy walker by profiling C:\Python27\Lib\site-packages\gnome\gst-inspect.exe

     
    • Glen Diener

      Glen Diener - 2015-08-26

      Sorry to take so long to respond, it took some time to try to sort
      this out. Running depend was unhelpful, but I'm pretty sure that this
      is not a problem with aio itself, but with dll load order and/or a
      build of kivy.

      I'm using vs 3.14.0_rev20, and the 'official' pre-built python 2.7.10
      from python.org. I'm porting an application from Linux to windows: a
      Python application using Kivy (Kivy.org) and gstreamer.

      Here's a 2-line demo that demonstrates what I'm seeing:

      import gi
      import kivy

      ...that's it, it works fine. But reverse the import order to this:

      import kivy
      import gi

      ...and this is the result:
      ,,,,
      Traceback (most recent call last):
      File "a.py", line 2, in <module>
      import gi
      File "C:\Python27\lib\site-packages\gi__init__.py", line 42, in <module>
      from . import _gi
      ImportError: DLL load failed: The specified module could not be found.

      Presumably, kivy is pulling in something that interferes with gi, or
      interfering with the dll load paths?

      Here's a 5-line script that illustrates the issue I originally reported:

      from gi.repository import Gst
      Gst.init(None)
      print Gst.ElementFactory.make('h264parse')
      import kivy
      print Gst.ElementFactory.make('h264parse')

      This works fine, both h264parse elements (defined in the
      'videoparsersbad.dl') elements, lines 3 and 5, are successfully
      created. But comment out line 3 and the second creation will fail
      with this:

      (python.exe:3384): GStreamer-WARNING **: Failed to load plugin
      'C:\Python27\Lib\site-packages\gnome\lib\gstreamer-1.0\libgstvideoparsersbad.dll':
      'C:\Python27\Lib\site-packages\gnome\lib\gstreamer-1.0\libgstvideoparsersbad.dll':
      The specified module could not be found.

      Seems that unless the dll containing the element is loaded before kivy
      is imported, it fails. Behavior with other gstreamer elements is
      similar. This is using the development version of Kivy, built with
      msvc.

      On Mon, Aug 24, 2015 at 4:37 PM, tumagonx tumagonx@users.sf.net wrote:

      Which version is this?
      Could you check it with dependecy walker by profiling
      C:\Python27\Lib\site-packages\gnome\gst-inspect.exe


      [tickets:#24] can't install to msys2

      Status: open
      Milestone: 1.0
      Created: Fri Aug 21, 2015 10:23 PM UTC by Glen Diener
      Last Updated: Fri Aug 21, 2015 11:09 PM UTC
      Owner: nobody

      I have successfully used pygi in a couple of msys implementations without
      problem, thanks for a great project!

      However, I have an installation of msys2 (msys2-x86_64-20150512,
      https://sourceforge.net/projects/msys2/), with both python 2.7 and 3.4
      installed from pacman.
      Using pygi-aio-3.14.0_rev19-setup, I can't install to either location.
      Specifically, I can
      add the path to pythonX.Y directory as the portable python directory, but in
      the following dialog box, the path is never displayed as an option: its as
      if the installer doesn't recognize the paths as valid python installations.

      I've tried installing 'by hand' using an earlier version of pygi,
      pygi-aio-3.4.2_rev11, and following the included readme. Unfortunately, this
      doesn't result in a working system:

      $ python -i
      Python 2.7.10 (default, Jul 8 2015, 15:10:39)
      [GCC 5.1.0] on win32
      Type "help", "copyright", "credits" or "license" for more information.

      import gi
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "C:/msys64/mingw64/lib/python2.7/site-packages/gi/init.py", line 27, in
      <module>
      from ._gi import _API, Repository
      ImportError: DLL load failed: %1 is not a valid Win32 application.

      Is there something wrong, or am I just hoping for too much?

      thanks!


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/pygobjectwin32/tickets/24/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Tickets: #24

  • tumagonx

    tumagonx - 2015-08-27
    • summary: can't install to msys2 --> PyGI Gstreamer + Kivy problem
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -21,3 +21,7 @@
     Is there something wrong, or am I just hoping for too much?
    
     thanks!
    +I have successfully used pygi in a couple of msys implementations without problem, thanks for a great project!
    +
    +However, I have an installation of msys2 (msys2-x86_64-20150512, https://sourceforge.net/projects/msys2/), with both python 2.7 and 3.4 installed from pacman.
    +Using pygi-aio-3.14.0_rev19-setup, I can
    
     
  • tumagonx

    tumagonx - 2015-08-27

    Yes, I was encountered sort issue especially when two many plugins installed. I do profiling "python file.py" to see which dll exactly loaded before other plugin failed.

    I see that Kivy also contain gstreamer, could you tell how you install it with pygi (I haven't tried myself)?

     
  • tumagonx

    tumagonx - 2015-09-19

    Does adding site-packages\gnome to PATH or use rev22 solve this issue?

     
    • Glen Diener

      Glen Diener - 2015-09-29

      Hi tumagonx, sorry for the delay in responding...my day job has gotten
      me away from this for the time being, but I'll definitely get back to
      you as soon as I can, hopefully within a week...

      Thanks!

      -glen

      On Sat, Sep 19, 2015 at 2:11 PM, tumagonx tumagonx@users.sf.net wrote:

      Does adding site-packages\gnome to PATH or use rev22 solve this issue?


      [tickets:#24] PyGI Gstreamer + Kivy problem

      Status: open
      Milestone: 1.0
      Created: Fri Aug 21, 2015 10:23 PM UTC by Glen Diener
      Last Updated: Thu Aug 27, 2015 06:17 PM UTC
      Owner: nobody

      I have successfully used pygi in a couple of msys implementations without
      problem, thanks for a great project!

      However, I have an installation of msys2 (msys2-x86_64-20150512,
      https://sourceforge.net/projects/msys2/), with both python 2.7 and 3.4
      installed from pacman.
      Using pygi-aio-3.14.0_rev19-setup, I can't install to either location.
      Specifically, I can
      add the path to pythonX.Y directory as the portable python directory, but in
      the following dialog box, the path is never displayed as an option: its as
      if the installer doesn't recognize the paths as valid python installations.

      I've tried installing 'by hand' using an earlier version of pygi,
      pygi-aio-3.4.2_rev11, and following the included readme. Unfortunately, this
      doesn't result in a working system:

      $ python -i
      Python 2.7.10 (default, Jul 8 2015, 15:10:39)
      [GCC 5.1.0] on win32
      Type "help", "copyright", "credits" or "license" for more information.

      import gi
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "C:/msys64/mingw64/lib/python2.7/site-packages/gi/init.py", line 27, in
      <module>
      from ._gi import _API, Repository
      ImportError: DLL load failed: %1 is not a valid Win32 application.

      Is there something wrong, or am I just hoping for too much?

      thanks!
      I have successfully used pygi in a couple of msys implementations without
      problem, thanks for a great project!

      However, I have an installation of msys2 (msys2-x86_64-20150512,
      https://sourceforge.net/projects/msys2/), with both python 2.7 and 3.4
      installed from pacman.
      Using pygi-aio-3.14.0_rev19-setup, I can


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/pygobjectwin32/tickets/24/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Tickets: #24


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.