0

I have a small python script for irc which needs jaraco.util to function. Requirement is to release it as binary on windows so I've tried with py2exe and pyinstaller.

I am using WinPython-64bit-2.7.6.4

I have some experience with py2exe from previous projects, I tried the 'includes' option as well but without any success. The error is pretty much standard:

ImportError: No module named jaraco

Or jaraco.util etc. if I try to include it via setup.py for the py2exe build.

      'includes': [
                   'jaraco.util',
                   'irc',
                   'ConfigParser',
          ],

Normally it should auto-detect the dependencies but if I leave it without the include it will build the exe but fail to execute with a similar error:

Traceback (most recent call last)
  File "irc\client.pyc", line 67, in <module>
ImportError: No module named jaraco.util.itertools

In winpython site-packages I have:

jaraco
jaraco.timing-1.0-py2.7-nspkg.pth
jaraco.timing-1.0-py2.7.egg-info
jaraco.util-10.6-py2.7-nspkg.pth
jaraco.util-10.6-py2.7.egg-info

I also tried to reinstall jaraco.util and to copy it manually after the build but it will still not work.

I've searched on-line for a solution for at least a couple of hours but to no avail. so I'm trying here maybe you guys have run into similar issues (or maybe I'm doing something wrong...)

Thank you

Yoel
  • 9,144
  • 7
  • 42
  • 57
Marius
  • 30
  • 4
  • The [FAQ](http://www.py2exe.org/index.cgi/FAQ#How_does_py2exe_decide_which_modules_you_need.3F) recommends analyzing the output of `python -m py2exe.mf -ddddd irc\client.py`? Can you post it? – Yoel Oct 09 '14 at 13:56

1 Answers1

1

I think the problem is that jaraco was installed via easy_install jaraco.util, thus creating python eggs, which aren't supported by py2exe, as detailed by its FAQ.

Try specifying the flag --always-unzip as an option to easy_install.

Yoel
  • 9,144
  • 7
  • 42
  • 57
  • Thank you, it worked (and I recall seeing somebody mention unzip while searching on this but I guess i was to tired last night and didn't pay to much attention to it) – Marius Oct 09 '14 at 14:30