Hi,
I'm trying to create one exe file with the simple hello.py script:
import pandas as pd
import tables
import numexpr
if __name__ == '__main__':
tp = pd.HDFStore("toto.h5","w")
print tp
tp.close()
( pandas (0.13.1), tables (3.1.1), numexpr(2.4), python 2.7, Windows XP.)
# python c:\pyinstaller\pyinstaller.py hello.py
=> it creates /dist/hello/hello.exe
(it works, the toto.h5 file is created !)
Trying in one file:
# python c:\pyinstaller\utils\makespec.py -F hello.py
# python c:\pyinstaller\pyinstaller.py -F hello.spec
=> it created the /dist/hello.exe file
hello.exe creates a warning : Import error: Could not load "hdf5.dll",
please ensure it can be found in the system path.
=> Yes it can be found in system path.
I added the hdf5.dll and sz.dll in /dist with hello.exe and everything
works.
Is there a way to include both dlls in the exe file ? I tried to modify the
hello.spec file with the following lines:
a.binaries += [('hdf5.dll',
> 'C:\\Python27\\Lib\\site-packages\\tables\\hdf5.dll', 'BINARY')]
> a.binaries += [('sz.dll',
> 'C:\\Python27\\Lib\\site-packages\\tables\\sz.dll', 'BINARY')]
>
the debug trace show me the following messages:
C:\demo\hdftestpy\dist>hello.exe
hello.exe
Traceback (most recent call last):
File "<string>", line 5, in <module>
File "C:\pyinstaller\PyInstaller\loader\pyi_importers.py", line 270, in
load_module
exec(bytecode, module.__dict__)
File "C:\demo\hdftestpy\build\hello\out00-PYZ.pyz\tables", line 68, in
<module>
ImportError: Could not load "hdf5.dll", please ensure that it can be found
in the system path
LOADER: executable is C:\demo\HDFTES~1\dist\hello.exe
LOADER: homepath is C:\demo\HDFTES~1\dist
LOADER: _MEIPASS2 is D:\DOCUME~1\beal-mat\LOCALS~1\Temp\_MEI527962
LOADER: archivename is C:\demo\HDFTES~1\dist\hello.exe
LOADER: Already in the child - running user's code.
LOADER: manifestpath:
D:\DOCUME~1\beal-mat\LOCALS~1\Temp\_MEI527962\hello.exe.manifest
LOADER: Activation context created
LOADER: Activation context activated
LOADER: Python library:
D:\DOCUME~1\beal-mat\LOCALS~1\Temp\_MEI527962\python27.dll
LOADER: Manipulating evironment
LOADER: PYTHONPATH=D:\DOCUME~1\beal-mat\LOCALS~1\Temp\_MEI527962
LOADER: PYTHONHOME=D:\DOCUME~1\beal-mat\LOCALS~1\Temp\_MEI527962
LOADER: Manipulating Python's sys.path
LOADER: importing modules from CArchive
LOADER: extracted struct
LOADER: extracted pyi_os_path
LOADER: extracted pyi_archive
LOADER: extracted pyi_importers
LOADER: Installing import hooks
LOADER: out00-PYZ.pyz
LOADER: Running scripts
LOADER: RC: -1 from hello
LOADER: OK.
LOADER: Deactivating activation context
LOADER: Releasing activation context
LOADER: Done
LOADER: Cleaning up Python interpreter.
LOADER: executable is C:\demo\HDFTES~1\dist\hello.exe
LOADER: homepath is C:\demo\HDFTES~1\dist
LOADER: _MEIPASS2 is NULL
LOADER: archivename is C:\demo\HDFTES~1\dist\hello.exe
LOADER: Extracting binaries
WARNING: file already exists but should not:
D:\DOCUME~1\beal-mat\LOCALS~1\Temp\_MEI527962\Include\pyconfig.h
LOADER: Executing self as child
LOADER: Setting up to run child
LOADER: Creating child process
LOADER: Waiting for child process to finish...
LOADER: Back to parent
LOADER: Doing cleanup
LOADER: Freeing archive status for C:\demo\HDFTES~1\dist\hello.exe
I checked the file in the system path.
import os
> target = 'C:\\WINNT\\system32\\hdf5.dll'
>
> print os.path.isfile(target)
> => True
>
I don't know how to do it. Someone knows what to try next ?
Sevaader
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.