Pyinstaller can't handle namespace packages correctly, such as zope.interface

Showing 1-10 of 10 messages
Pyinstaller can't handle namespace packages correctly, such as zope.interface Victor Lin 1/7/12 8:05 PM
I am using pyinstaller1.5.1 to trying to package my project, and I
noticed that zope.interface is not imported correctly

    W: no module named zope.interface (top-level import by
twisted.internet._threadedselect)

After tracing the code, I notice that the way pyinstaller treat
namespace package is wrong. zope.interface uses namespace package,
they shares zope package name but they are in different path. I have
another zope module named "zope.sqlalchemy" installed in my python
environment. As result, mf.py find zope directory of zope.sqlalchemy
at first

    C:\Python27\Lib\site-packages\zope.sqlalchemy-0.7-py2.7.egg\zope

then use the wrong path for looking the "interface" folder. Of course,
it does not exist

   C:\Python27\Lib\site-packages\zope.sqlalchemy-0.7-py2.7.egg\zope
\interface

I think this is kind of bug. Is there any workaround I can use now? Of
is this problem already fixed in trunk?

Thanks.
Victor Lin.






Re: Pyinstaller can't handle namespace packages correctly, such as zope.interface David Ripton 1/28/12 8:53 PM
It's still a problem as of the latest PyInstaller on Git.

The workaround for zope.interface is to drop a zero-byte __init__.py
into the zope/ directory.
Re: [PyInstaller] Re: Pyinstaller can't handle namespace packages correctly, such as zope.interface Hartmut Goebel 2/2/12 8:31 AM
Am 29.01.2012 05:53, schrieb David Ripton:
> It's still a problem as of the latest PyInstaller on Git.
>
> The workaround for zope.interface is to drop a zero-byte __init__.py
> into the zope/ directory.

Can you please open a ticket for this bug, stating both the problem and
the solution there. Thanks, this make sure it does not get lost.

Maybe you want to hack PyInstaller to fix it?

--
Schönen Gruß - Regards
Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult
Spezialist für IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/
Goebel Consult ist Mitglied bei http://www.7-it.de


Re: Pyinstaller can't handle namespace packages correctly, such as zope.interface David Ripton 2/2/12 6:15 PM
On Feb 2, 11:31 am, Hartmut Goebel <h.goe...@goebel-consult.de> wrote:
> Am 29.01.2012 05:53, schrieb David Ripton:
>
> > It's still a problem as of the latest PyInstaller on Git.
>
> > The workaround for zope.interface is to drop a zero-byte __init__.py
> > into the zope/ directory.
>
> Can you please open a ticket for this bug, stating both the problem and
> the solution there. Thanks, this make sure it does not get lost.

I added a ticket.
Re: Pyinstaller can't handle namespace packages correctly, such as zope.interface j_vinegar 7/19/12 7:27 AM
Il giorno giovedì 2 febbraio 2012 21:15:55 UTC-5, David Ripton ha scritto:
On Feb 2, 11:31 am, Hartmut Goebel <h.goe...@goebel-consult.de> wrote:
> Am 29.01.2012 05:53, schrieb David Ripton:
>
> > It's still a problem as of the latest PyInstaller on Git.
>
> > The workaround for zope.interface is to drop a zero-byte __init__.py
> > into the zope/ directory.

The workaround seems not to work for me, in the log I still get:

W: no module named zope.interface.implements (top-level import by twisted.internet.abstract)

any other ideas or workaorunds?
thanks
Joe

my setup:

ubuntu 12.04LTS
pyInstaller git commit c6d550
zope.interface (installed as .deb from ubuntu repository, package version 3.6.1-1ubuntu3)
python 2.7

 
Re: [PyInstaller] Re: Pyinstaller can't handle namespace packages correctly, such as zope.interface Hartmut Goebel 7/19/12 11:28 AM
Am 19.07.2012 16:27, schrieb j_vinegar:
W: no module named zope.interface.implements (top-level import by twisted.internet.abstract)

any other ideas or workaorunds?
thanks
Joe

my setup:

ubuntu 12.04LTS
pyInstaller git commit c6d550


Please use the current development version for the development branch. There have been lots of enhancements since 1.5.1


--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP

Goebel Consult
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/2011-10-aus-der-schublade-in-die-koepfe
Blog: http://www.goebel-consult.de/blog/20050620

Goebel Consult ist Mitglied bei http://www.7-it.de/

Re: [PyInstaller] Re: Pyinstaller can't handle namespace packages correctly, such as zope.interface j_vinegar 7/19/12 12:56 PM


Il giorno giovedì 19 luglio 2012 14:28:18 UTC-4, Hartmut Goebel ha scritto:
Am 19.07.2012 16:27, schrieb j_vinegar:
W: no module named zope.interface.implements (top-level import by twisted.internet.abstract)

any other ideas or workaorunds?
thanks
Joe

my setup:

ubuntu 12.04LTS
pyInstaller git commit c6d550


Please use the current development version for the development branch. There have been lots of enhancements since 1.5.1

I see that appending my question to a 1.5.1-related issue has probably mislead you:
as I've reported, I'm using commit c6d550,  the freshly pulled last *development* version.
I did that in good faith because it seems the same problem, sorry for that.

thanks for the quick reply anyway.

and, the problem is still here :)
Joe

Re: [PyInstaller] Re: Pyinstaller can't handle namespace packages correctly, such as zope.interface j_vinegar 7/19/12 2:06 PM

W: no module named zope.interface.implements (top-level import by twisted.internet.abstract)

a few more info:
new setup, using virtualenv and installing zope with pip, not from .deb package:

initially iu.py aborts with Import error "No module named zope"

once done the workaround ( empty __init__.py in ENV/lib/python2.7/site-packages/zope )
the EXE runs, but doesn't work properly. The first warning in pyinstaller log are still:


W: no module named zope.interface.implements (top-level import by twisted.internet.abstract)

so, is it a different beast, or just the same bug in a different incarnation?
Thanks,
Joe
Re: [PyInstaller] Re: Pyinstaller can't handle namespace packages correctly, such as zope.interface Hartmut Goebel 7/19/12 11:50 PM
Am 19.07.2012 23:06, schrieb j_vinegar:

W: no module named zope.interface.implements (top-level import by twisted.internet.abstract)

Please make sure you are really using the current development version of PyInstaller. This log-message has the format, 1.5.1 used. The format for current dev is '%(relativeCreated)d %(levelname)s: %(message)s' for quite some time now.

Please do not install the developer snapshot into the same directory as 1.5.1.

If this does not help, the best would be to build a minimalistic app and a minimalistic setup-shell script (or paster) we can just cut-and-past to reproduce the problem. As you already are using pip and virtuel-env, it should be easey once we have this files.


--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP

Goebel Consult
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/2012-02-bring-your-own-life-glosse
Blog: http://www.goebel-consult.de/blog/20041011

Goebel Consult ist Mitglied bei http://www.7-it.de/

Re: [PyInstaller] Re: Pyinstaller can't handle namespace packages correctly, such as zope.interface j_vinegar 7/20/12 4:38 PM
Il giorno venerdì 20 luglio 2012 02:50:26 UTC-4, Hartmut Goebel ha scritto:
Am 19.07.2012 23:06, schrieb j_vinegar:

W: no module named zope.interface.implements (top-level import by twisted.internet.abstract)

Please make sure you are really using the current development version of PyInstaller. This log-message has the format, 1.5.1 used. The format for current dev is '%(relativeCreated)d %(levelname)s: %(message)s' for quite some time now.

Please do not install the developer snapshot into the same directory as 1.5.1.

I did use the development tar.gz on the homepage. same result.

If this does not help, the best would be to build a minimalistic app and a minimalistic setup-shell script (or paster) we can just cut-and-past to reproduce the problem. As you already are using pip and virtuel-env, it should be easey once we have this files.

I would love to but unfortunately I'm quite new to python and the codebase I'm trying to pack is not mine and a bit complex, but it is floss:
https://gitweb.torproject.org/ooni-probe.git

maybe you can try directly and at least confirm the problem?
thanks
Joe