Thanks a lot,

I have created the file you proposed.
Then, when I run the program I get this.

Traceback (most recent call last):
  File "E:\Angel\pyinstaller_svn\iu.py", line 446, in importHook
    raise ImportError, "No module named %s" % fqname
ImportError: No module named numpy
Traceback (most recent call last):
  File "<string>", line 7, in <module>
  File "E:\Angel\pyinstaller_svn\iu.py", line 427, in importHook
    mod = _self_doimport(nm, ctx, fqname)
  File "E:\Angel\pyinstaller_svn\iu.py", line 512, in doimport
    exec co in mod.__dict__
  File "viewer\build\pyi.win32\viewer\outPYZ1.pyz/PyQt4.Qwt5", line
32, in <module>
  File "E:\Angel\pyinstaller_svn\iu.py", line 427, in importHook
    mod = _self_doimport(nm, ctx, fqname)
  File "E:\Angel\pyinstaller_svn\iu.py", line 486, in doimport
    mod = importfunc(nm)
  File "E:\Angel\pyinstaller_svn\iu.py", line 292, in getmod
    mod = owner.getmod(nm)
  File "E:\Angel\pyinstaller_svn\archive.py", line 463, in getmod
    return iu.DirOwner.getmod(self, self.prefix+'.'+nm)
  File "E:\Angel\pyinstaller_svn\iu.py", line 109, in getmod
    mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
ImportError: numpy.core.multiarray failed to import



I'm not sure what hook file should I modify / create now.


_______
>>> hasattr(PyQt4.Qwt5, "toNumpy")
True
_______


Thanks again.


On 24 abr, 11:04, Giovanni Bajo <[email protected]> wrote:
> On Fri, 24 Apr 2009 00:32:05 -0700 (PDT), "[email protected]"
>
> <[email protected]> wrote:
> > Hello,
>
> > I'm trying to make an exe from a simple application using Qwt to plot
> > some data. But it gives some problems.
>
> By a quick look at the Qwt SIP 
> module:http://pyqwt.cvs.sourceforge.net/viewvc/pyqwt/pyqwt5/sip/qwt5qt4/QwtM...
>
> It looks like Qwt5 has the following hiddent imports: QtCore, QtGui,
> QtSvg(optional), Numarray(optional), Numeric(optional), Numpy(optional).
>
> Try creating this file in PyInstaller: hooks/hook-PyQt4.Qwt5.Qwt.py. Within
> the file, write:
>
> hiddenimports = ["PyQt4.QtCore", "PyQt4.QtGui", "PyQt4.QtSvg"]
>
> then run PyInstaller's Build.py again and see what happens.
>
> It would be great to find a way to detect at runtime which optional
> dependencies Qwt5 was built with. For instance, it looks like you can use
> hasattr(PyQt4.Qwt5, "toNumpy") to find out if it was built with numpy
> dependency, etc. Can you please confirm this? If so, we can prepare a
> better import hooks which automatically handles also the numeric
> dependendencies.
> --
> Giovanni Bajo
> Develer S.r.l.http://www.develer.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to