如何使pyzmq(截至14.3.1)和cx_Freeze(截至4.3.3)一起工作?默认情况下,cz_Freeze不包含所有必需的pyzmq组件,至少在Windows上。
答案 0 :(得分:2)
以下对setup.py的调整对我来说很有用,至少在Windows上是这样的(见评论):
from cx_Freeze import setup, Executable
import zmq.libzmq
build_exe_options = {
# zmq.backend.cython seems to be left out by default
'packages': ['zmq.backend.cython', ],
# libzmq.pyd is a vital dependency
'include_files': [zmq.libzmq.__file__, ],
}
setup(
name='myapp',
version='0.0.1',
description='My App',
options={'build_exe': build_exe_options},
executables=[Executable('bin/myapp.py')],
)