I'm trying to freeze my app using Esky and cx_freeze.
My setup.py looks something like this:
from esky.bdist_esky import Executable
from distutils.core import setup
includes = ["zmq"]
exe = Executable("main.py")
setup(
name = "Jarvis",
version = "0.1",
options = {"bdist_esky" : {"includes" : includes, "freezer_module": "cxfreeze"}},
scripts = [exe],
)
However, it seems like pyzmq is not properly included in the freeze.
I keep getting:
PS C:\jarvis\dist> .\main.exe
Traceback (most recent call last):
File "__main__.py", line 838, in <module>
File "__main__.py", line 331, in bootstrap
File "__main__.py", line 358, in chainload
File "__main__.py", line 834, in _chainload
File "main.py", line 50, in <module>
File "main.py", line 32, in start_agent
File "jarvis\agent\agent.pyc", line 1, in <module>
File "zmq\__init__.pyc", line 62, in <module>
File "zmq\backend\__init__.pyc", line 22, in <module>
File "zmq\backend\select.pyc", line 31, in select_backend
File "zmq\backend\cffi\__init__.pyc", line 12, in <module>
File "zmq\backend\cffi\constants.pyc", line 4, in <module>
File "zmq\backend\cffi\_cffi.pyc", line 18, in <module>
ImportError: No module named cffi
Any ideas on how to solve this problem?
EDIT2:: ok, there is an answer that solved it for me >> https://bitbucket.org/anthony_tuininga/cx_freeze/issue/55/failed-with-pyzmq-1401-py33-win-amd64egg
EDIT: as suggested, have been forced to use cython backend there is another error stack trace:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27
, in <module>
exec code in m.__dict__
File "send.py", line 5, in <module>
File "C:\Python27\lib\site-packages\zmq\__init__.py", line 70, in <module>
from zmq.backend import *
File "C:\Python27\lib\site-packages\zmq\backend\__init__.py", line 23, in <mod
ule>
_ns = select_backend(backend)
File "C:\Python27\lib\site-packages\zmq\backend\select.py", line 31, in select
_backend
mod = __import__(name, fromlist=public_api)
File "C:\Python27\lib\site-packages\zmq\backend\cython\__init__.py", line 26,
in <module>
from . import (constants, error, message, context,
File "ExtensionLoader_zmq_backend_cython_error.py", line 22, in <module>
File "ExtensionLoader_zmq_backend_cython_error.py", line 14, in __bootstrap__
ImportError: DLL load failed: The specified module could not be found.
I guess there is a problem with loading native libzmq.dll
(however, there is some zmq.libzmq.pyd
in the resulting dist
folder), have anybody solved this?