部署python-gst。 Windows上的Pyinstaller在gi包上失败 - DLL加载失败

时间:2015-04-07 10:47:33

标签: python pyinstaller python-gstreamer

我正在尝试在python(python-gst)中部署运行gstreamer绑定的程序。我正在使用pyinstaller。我正在运行Windows 7,python-2.7 64位。下面是一个最小的工作示例 - pyinstallertest.py:

import gi

print 'hello world'

然后我运行pyinstaller foo.spec时没有任何错误或警告,其中foo.spec是以下文件:

import os
gst_plugin_path = os.environ.get('GST_PLUGIN_PATH').split('lib')[0]
a = Analysis(['.\\pyinstallertest.py'],
             pathex=['C:\\pyinstaller_test'],
             hiddenimports=[],
             hookspath=None,
             runtime_hooks=None)
pyz = PYZ(a.pure)
exe = EXE(pyz,
          a.scripts,
          exclude_binaries=True,
          name='pytest.exe',
          debug=False,
          strip=None,
          upx=True,
          console=True )


coll = COLLECT(exe, Tree('./'),
               Tree(gst_plugin_path),
               Tree(os.path.join(gst_plugin_path, 'bin')),
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=None,
               upx=True,
               name='pytest')

在\ dist \ pytest \中运行生成的pytest.exe时失败并显示以下错误:

File "C:\python27\lib\site-packages\pyinstaller-2.1-py2.7.egg\PyInstaller\loader\pyi_importers.py", line 412, in load_module
    module = imp.load_module(fullname, fp, filename, self._c_ext_tuple)
ImportError: DLL load failed: The specified procedure could not be found.

有关如何解决此问题的任何想法,或在包含gstreamer(和gi包)的窗口中部署python程序的其他方法?

0 个答案:

没有答案