##language:en Recipe for py2exe and the zmq package === Error message === {{{ *** finding dlls needed *** error: libzmq.dll: No such file or directory }}} or {{{ Traceback (most recent call last): File "main.py", line 1, in File "zmq\__init__.pyc", line 38, in File "zmq\core\__init__.pyc", line 26, in File "zmq\core\error.pyc", line 12, in File "zmq\core\error.pyc", line 10, in __load File "error.pyx", line 34, in init zmq.core.error (zmq\core\error.c:1195) ImportError: No module named strtypes }}} === Solution === {{{ #!python from py2exe.build_exe import py2exe from distutils.core import setup import os import zmq # libzmq.dll is in same directory as zmq's __init__.py os.environ["PATH"] = \ os.environ["PATH"] + \ os.path.pathsep + os.path.split(zmq.__file__)[0] setup( console=[{"script": "main.py"}], options={ "py2exe": { "includes": ["zmq.utils", "zmq.utils.jsonapi", "zmq.utils.strtypes"] } } ) }}}