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
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.
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
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:
Related
Tickets: #24
Which version is this?
Could you check it with dependecy walker by profiling C:\Python27\Lib\site-packages\gnome\gst-inspect.exe
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:
Related
Tickets: #24
Diff:
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)?
Does adding site-packages\gnome to PATH or use rev22 solve this issue?
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:
Related
Tickets: #24