cx_Freeze import error with h5py (Python 2.7 on Windows 64 bits)

277 views
Skip to first unread message

GG

unread,
Oct 22, 2014, 5:42:00 PM10/22/14
to h5...@googlegroups.com
An error is generated when I try to execute the frozen version (h5py_example.exe) of a very simple h5py script (the h5py_example.py script runs just fine in python).

h5py_example.py ----------------------------------------------
import h5py


f=h5py.File("package_test.h5")

f.close()

----------------------------------------------

I am using the following


setup.py ------------------------------

import sys

from cx_Freeze import setup, Executable


base = None

if sys.platform == 'win32':

base = 'Win32GUI'


# adding the base removes the consol :-)

executables = [

Executable('h5py_example.py',base = base,icon=None

)

]


excludes = []

includes = []

packages = []

path = []

setup(name='simpleH5pyExec',

version='0.1',

description='Sample h5py script',

author ='GG',

author_email = 'GG,

options = {"build_exe": {"includes": includes,

"excludes": excludes,

"packages": packages,

"path": path

}

},

executables=executables

)


----------------------------


the error happens during execution of the compiled program:



I do not know how to go about it.


During the freezing process using cx_Freeze among many other modules the following are added


....

adding 'Program Files\simpleH5pyExec\h5py.defs.pyd'
adding 'Program Files\simpleH5pyExec\h5py.utils.pyd'
adding 'Program Files\simpleH5pyExec\h5py._proxy.pyd'
adding 'Program Files\simpleH5pyExec\h5py_example.exe'
adding 'Program Files\simpleH5pyExec\hdf5.dll'
adding 'Program Files\simpleH5pyExec\hdf5_hl.dll'

.....


I suspect the problem is that it does not add something as h5py._errors.pyd


but I do not know how to make this happen.


Please keep in mind I just started with Python.


Thanks for any help.


Gio




Message has been deleted

GG

unread,
Oct 22, 2014, 5:53:47 PM10/22/14
to h5...@googlegroups.com
Ops the image of the window error does not appear in this site. The error was:


from h5py import _errors
ImportError: cannot import name_errors

Niteck

unread,
Dec 16, 2014, 4:57:26 AM12/16/14
to h5...@googlegroups.com
Hello 

we do run in the same problem by using Python 3.4 and h5py 2.4.0b1 (Windows 64bit). Are there any updates regarding to that issue?

Your help is much appreciated.

Servus
Reply all
Reply to author
Forward
0 new messages