On Tue, 2010-01-12 at 12:58 -0800, CTW wrote:
> Hello
> 
> I developed a program that interacts with hdf5 files utilizing the
> h5py toolbox.  (I migrated from pytables for speed improvements.)
> The program seems to compile nicely, but when I try and run it I get
> the following:
> Traceback (most recent call last):
>   File "<string>", line 17, in <module>
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 439, in importHook
>     mod = _self_doimport(nm, ctx, fqname)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 524, in doimport
>     exec co in mod.__dict__
>   File "/nfs/isluga1/home/will/Desktop/install/build/pyi.linux2/h5Plot/
> outPYZ1.pyz/h5file", line 11, in <module>
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 439, in importHook
>     mod = _self_doimport(nm, ctx, fqname)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 524, in doimport
>     exec co in mod.__dict__
>   File "/usr/lib/python2.5/site-packages/h5py-1.2.1-py2.5-linux-
> i686.egg/h5py/__init__.py", line 32, in <module>
>     import h5, h5a, h5d, h5f, h5fd, h5g, h5l, h5o, h5i, h5p, h5r, h5s,
> h5t, h5z
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 439, in importHook
>     mod = _self_doimport(nm, ctx, fqname)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 498, in doimport
>     mod = importfunc(nm)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 300, in getmod
>     mod = owner.getmod(nm)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/
> archive.py", line 468, in getmod
>     return iu.DirOwner.getmod(self, self.prefix+'.'+nm)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 109, in getmod
>     mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
>   File "h5s.pxd", line 17, in h5py.h5d (h5py/h5d.c:3408)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 439, in importHook
>     mod = _self_doimport(nm, ctx, fqname)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 498, in doimport
>     mod = importfunc(nm)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 300, in getmod
>     mod = owner.getmod(nm)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/
> archive.py", line 468, in getmod
>     return iu.DirOwner.getmod(self, self.prefix+'.'+nm)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 109, in getmod
>     mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
>   File "h5s.pyx", line 1, in h5py.h5s (h5py/h5s.c:3738)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 439, in importHook
>     mod = _self_doimport(nm, ctx, fqname)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 498, in doimport
>     mod = importfunc(nm)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 300, in getmod
>     mod = owner.getmod(nm)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 109, in getmod
>     mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
>   File "utils.pyx", line 32, in h5py.utils (h5py/utils.c:2591)
>   File "/nfs/isluga1/home/will/Desktop/install/pyinstaller/iu.py",
> line 458, in importHook
>     raise ImportError, "No module named %s" % fqname
> ImportError: No module named _sync
> 
> I am working on Fedora 11, though I have tested on Ubuntu 9.04 and
> 9.10.

Try creating a file within hooks/ called hook-h5py.py, with the
following content:

hiddenimports = ["h5py._sync"]

then rebuild from scratch with PyInstaller.

The problem is that the Pyrex code imports _sync.py, and this specific
import cannot be seen by PyInstaller as it happens within the generated
C code.

-- 
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