Hi again,
unfortunately it doesn't help, when I run the .exe I get the same
error. This is the whole output:
C:\Documents and Settings\vmas\Mis documentos\dist\prova>prova.exe
Cannot open archive: C:\Documents and Settings\vmas\Mis documentos\dist
\prova\pr
ova.pkg
Extracting binaries
C:\Documents and Settings\vmas\Mis documentos\dist\prova\python25.dll
Manipulating evironment
PYTHONPATH=C:/Documents and Settings/vmas/Mis documentos/dist/prova
v
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# C:\Python25\Lib\warnings.pyc matches C:\Python25\Lib\warnings.py
import warnings # precompiled from C:\Python25\Lib\warnings.pyc
# C:\Python25\Lib\types.pyc matches C:\Python25\Lib\types.py
import types # precompiled from C:\Python25\Lib\types.pyc
import _types # builtin
# C:\Python25\Lib\linecache.pyc matches C:\Python25\Lib\linecache.py
import linecache # precompiled from C:\Python25\Lib\linecache.pyc
# C:\Python25\Lib\os.pyc matches C:\Python25\Lib\os.py
import os # precompiled from C:\Python25\Lib\os.pyc
import nt # builtin
# C:\Python25\Lib\ntpath.pyc matches C:\Python25\Lib\ntpath.py
import ntpath # precompiled from C:\Python25\Lib\ntpath.pyc
# C:\Python25\Lib\stat.pyc matches C:\Python25\Lib\stat.py
import stat # precompiled from C:\Python25\Lib\stat.pyc
# C:\Python25\Lib\UserDict.pyc matches C:\Python25\Lib\UserDict.py
import UserDict # precompiled from C:\Python25\Lib\UserDict.pyc
# C:\Python25\Lib\copy_reg.pyc matches C:\Python25\Lib\copy_reg.py
import copy_reg # precompiled from C:\Python25\Lib\copy_reg.pyc
importing modules from CArchive
import marshal # builtin
iu
import imp # builtin
struct
import _struct # builtin
archive
Installing import hooks
outPYZ1.pyz
Running scripts
import win32api # dynamically loaded from C:/Documents and Settings/
vmas/Mis doc
umentos/dist/prova\win32api.pyd
import zlib # builtin
import _codecs # builtin
import numpy.core.multiarray # dynamically loaded from C:\Documents
and Settings
\vmas\Mis documentos\dist\prova\numpy.core.multiarray.pyd
import numpy.core.umath # dynamically loaded from C:\Documents and
Settings\vmas
\Mis documentos\dist\prova\numpy.core.umath.pyd
import _sre # builtin
import numpy.core._sort # dynamically loaded from C:\Documents and
Settings\vmas
\Mis documentos\dist\prova\numpy.core._sort.pyd
import numpy.core._dotblas # dynamically loaded from C:\Documents and
Settings\v
mas\Mis documentos\dist\prova\numpy.core._dotblas.pyd
import cPickle # builtin
import cStringIO # builtin
import numpy.core.scalarmath # dynamically loaded from C:\Documents
and Settings
\vmas\Mis documentos\dist\prova\numpy.core.scalarmath.pyd
import time # builtin
import operator # builtin
import math # builtin
import numpy.lib._compiled_base # dynamically loaded from C:\Documents
and Setti
ngs\vmas\Mis documentos\dist\prova\numpy.lib._compiled_base.pyd
import itertools # builtin
import numpy.linalg.lapack_lite # dynamically loaded from C:\Documents
and Setti
ngs\vmas\Mis documentos\dist\prova\numpy.linalg.lapack_lite.pyd
import numpy.fft.fftpack_lite # dynamically loaded from C:\Documents
and Setting
s\vmas\Mis documentos\dist\prova\numpy.fft.fftpack_lite.pyd
import numpy.random.mtrand # dynamically loaded from C:\Documents and
Settings\v
mas\Mis documentos\dist\prova\numpy.random.mtrand.pyd
import _ctypes # dynamically loaded from C:/Documents and Settings/
vmas/Mis docu
mentos/dist/prova\_ctypes.pyd
import strop # builtin
import thread # builtin
import collections # builtin
import msvcrt # builtin
import _subprocess # builtin
import _weakref # builtin
import tables._comp_lzo # dynamically loaded from C:\Documents and
Settings\vmas
\Mis documentos\dist\prova\tables._comp_lzo.pyd
Traceback (most recent call last):
File "<string>", line 5, in <module>
File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
\iu.py", line 4
14, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
\iu.py", line 4
99, in doimport
exec co in mod.__dict__
File "C:\Documents and Settings\vmas\Mis documentos\build
\pyi.win32\prova\outP
YZ1.pyz/tables", line 56, in <module>
File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
\iu.py", line 4
14, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
\iu.py", line 4
73, in doimport
mod = importfunc(nm)
File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
\iu.py", line 2
82, in getmod
mod = owner.getmod(nm)
File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
\archive.py", l
ine 418, in getmod
return iu.DirOwner.getmod(self, self.prefix+'.'+nm)
File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
\iu.py", line 1
09, in getmod
mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
File "utilsExtension.pyx", line 100, in tables.utilsExtension
AttributeError: 'module' object has no attribute '_comp_lzo'
RC: -1 from prova
OK.
Vicent
On 20 dic, 01:38, Giovanni Bajo <[email protected]> wrote:
> On mer, 2008-12-17 at 09:41 -0800, Vicent wrote:
>
>
>
> > I forgot to mention that I'm using the svn trunk PyInstaller and
> > Windows XP.
>
> > On Dec 17, 4:45 pm, Vicent <[email protected]> wrote:
> > > Hi,
>
> > > I'm newbie to PyInstaller... and I've problems. I've the following
> > > simple script, prova.py:
>
> > > #!/usr/bin/env python
> > > import tables
>
> > > print 'Hello'
>
> > > and the following spec file, prova.spec:
>
> > > # -*- mode: python -*-
> > > a = Analysis([os.path.join(HOMEPATH,'support\\_mountzlib.py'),
> > > os.path.join(HOMEPATH,'support\\useUnicode.py'), 'prova.py'],
> > > pathex=['C:\\Documents and Settings\\vmas\\Mis
> > > documentos'])
> > > pyz = PYZ(a.pure)
> > > exe = EXE(pyz,
> > > a.scripts + [('v', '', 'OPTION')],
> > > exclude_binaries=0,
> > > name='build\\pyi.win32\\prova\\prova.exe',
> > > debug=True,
> > > strip=False,
> > > upx=True,
> > > console=True)
> > > coll = COLLECT( exe,
> > > a.binaries,
> > > a.zipfiles,
> > > strip=False,
> > > upx=True,
> > > name=os.path.join('dist', 'prova'))
>
> > > After building prova.spec I run the generated prova.exec. I get the
> > > following error:
>
> > > ...
>
> > > import tables._comp_lzo # dynamically loaded from C:\Documents and
> > > Settings\vmas
> > > \Mis documentos\dist\prova\tables._comp_lzo.pyd
> > > Traceback (most recent call last):
> > > File "<string>", line 3, in <module>
> > > File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > > \iu.py", line 4
> > > 14, in importHook
> > > mod = _self_doimport(nm, ctx, fqname)
> > > File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > > \iu.py", line 4
> > > 99, in doimport
> > > exec co in mod.__dict__
> > > File "C:\Documents and Settings\vmas\Mis documentos\build
> > > \pyi.win32\prova\outP
> > > YZ1.pyz/tables", line 56, in <module>
> > > File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > > \iu.py", line 4
> > > 14, in importHook
> > > mod = _self_doimport(nm, ctx, fqname)
> > > File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > > \iu.py", line 4
> > > 73, in doimport
> > > mod = importfunc(nm)
> > > File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > > \iu.py", line 2
> > > 82, in getmod
> > > mod = owner.getmod(nm)
> > > File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > > \archive.py", l
> > > ine 418, in getmod
> > > return iu.DirOwner.getmod(self, self.prefix+'.'+nm)
> > > File "C:\Documents and Settings\vmas\Mis documentos\PyInstaller
> > > \iu.py", line 1
> > > 09, in getmod
> > > mod = imp.load_module(nm, fp, attempt, (ext, mode, typ))
> > > File "utilsExtension.pyx", line 100, in tables.utilsExtension
> > > AttributeError: 'module' object has no attribute '_comp_lzo'
> > > RC: -1 from prova
> > > OK.
>
> > > I've tried adding a hook, hook-tables.py:
>
> > > hiddenimports = ['_comp_lzo']
>
> > ---------~----~----~----~------~----~------~--~---
>
> I gave a look. It looks like it should be sufficient to add:
>
> hiddenimports = ['tables._comp_lzo', 'tables._comp_bzip2']
>
> These are the hidden imports (that comes from utilsExtension.pyx). Let
> me know if it works for you.
> --
> 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
-~----------~----~----~----~------~----~------~--~---