Hello,
I create a small example that reproduce the problem. I need to explain
better the situation. Recently VTK added a python wrapper to
QVTKWidget. This wrapper is based on Sip. Since there is a problem in
the original path of the library vtkCommPythonSip the VTK authors told
me to add the path of vtkCommnPythonSip to python. Using PyInstaller I
first got the error : 'vtk.__helper.LinkError: No module named
vtkCommonPythonSIP'. Now I check eveything better and I noted that if
I use an hook or if I add the path to scan for vtkCommonPythonSIP to
PyInstaller noting change. I can overcome the problem if I add
manually to sys.path the path of vtkCommonPythonSIP in my script. In
this case i got the 'SystemError: dynamic module not initialized
properly'. This is a small script that reproduce the error:
import sys
# Manually extend sys.path otherwise no module name vtkCommonPythonSIP
error
# appear in PyInstaller on my machine configuration
sys.path.append('/usr/local/lib/python2.6/dist-packages/VTK-5.7.0-
py2.6.egg/vtk')
import vtk
import PyQt4.QtGui as QtGui
class Test(vtk.QVTKWidget):
def __init__(self):
super(Test, self).__init__(None)
# Add A rendere
self._ren = vtk.vtkRenderer()
# Add a renderWindow
self._rw = vtk.vtkRenderWindow()
self._rw.AddRenderer(self._ren)
self.SetRenderWindow(self._rw)
if __name__ == "__main__":
import signal
signal.signal(signal.SIGINT, signal.SIG_DFL)
# Start ReSeF
app = QtGui.QApplication(sys.argv)
w = Test()
w.show()
app.exec_()
I hope it can help.
Thanks,
Nicola
On Nov 26, 9:28 am, Giovanni Bajo <[email protected]> wrote:
> On Fri, 26 Nov 2010 00:00:46 -0800 (PST), Nicola Creati
> <[email protected]>
> wrote:
>
>
>
> > Hello,
>
> > I'm trying to pack an application in which I make use of VTK.
> > Initially I got the following error:
>
> > Traceback (most recent call last):
> > File "<string>", line 121, in <module>
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 436, in importHook
> > mod = _self_doimport(nm, ctx, fqname)
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 521, in doimport
> > exec co in mod.__dict__
> > File "rsf/build/pyi.linux2/rsf/outPYZ2.pyz/vtk", line 124, in
> > <module>
> > File "rsf/build/pyi.linux2/rsf/outPYZ2.pyz/vtk.__helper", line 32,
> > in refine_import_err
> > vtk.__helper.LinkError: No module named vtkCommonPythonSIP
>
> > Then I added an hook to make PyInstaller found vtkCommonPythonSIP and
> > it worked but I got a different error:
>
> > Traceback (most recent call last):
> > File "<string>", line 122, in <module>
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 436, in importHook
> > mod = _self_doimport(nm, ctx, fqname)
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 521, in doimport
> > exec co in mod.__dict__
> > File "rsf/build/pyi.linux2/rsf/outPYZ2.pyz/vtk", line 121, in
> > <module>
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 436, in importHook
> > mod = _self_doimport(nm, ctx, fqname)
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 521, in doimport
> > exec co in mod.__dict__
> > File "rsf/build/pyi.linux2/rsf/outPYZ2.pyz/vtk.qvtk", line 8, in
> > <module>
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 436, in importHook
> > mod = _self_doimport(nm, ctx, fqname)
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 495, in doimport
> > mod = importfunc(nm)
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 297, in getmod
> > mod = owner.getmod(nm)
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/archive.py", line 468, in getmod
> > return iu.DirOwner.getmod(self, self.prefix+'.'+nm)
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 109, in getmod
> > mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 436, in importHook
> > mod = _self_doimport(nm, ctx, fqname)
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 495, in doimport
> > mod = importfunc(nm)
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 297, in getmod
> > mod = owner.getmod(nm)
> > File "/home/ncreati/wip/VTK_software/resefQT/qt/packaging/
> > pyinstaller/iu.py", line 109, in getmod
> > mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
> > SystemError: dynamic module not initialized properly
>
> > Can someone help please?
>
> Hi Nicola,
>
> which version of PyInstaller are you using? Can you try with PyInstaller
> 1.5-rc1 just released on the website?
>
> Following the traceback and adding some prints, can you please isolate
> which module generates this SystemError? Can you provide me with a small
> source code that exhibits the problem?
> --
> Giovanni Bajo :: [email protected]
> Develer S.r.l. :: http://www.develer.com
>
> My Blog:http://giovanni.bajo.it
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pyinstaller?hl=en.