Py2exe: error: libzmq.pyd: no such file or directory

During py2exe build, I get the following error:

creating python loader for extension 'win32clipboard' (C:\Python27\lib\site-packages\win32\win32clipboard.pyd -> win32clipboard.pyd)
creating python loader for extension '_rl_accel' (C:\Python27\lib\site-packages\_rl_accel.pyd -> _rl_accel.pyd)
*** finding dlls needed ***
error: libzmq.pyd: No such file or directory

Can someone explain if I really need it, where to find it or how to exclude it.

Thanks Mads

+5
source share
4 answers

It requires three steps to work:

  • Exclude libzmq.pydfrom dll with parameter dll_excludes. This avoids the "missing pyzmq.pyd" errors.
  • Exclude zmq.libzmq(same) from modules c excludes. This skips the usual .pyd renamind and proxying that py2exe does.
  • zmq.backend.cython includes, py2exe pyzmq. "no module named cffi", .

:

import zmq.libzmq

setup(
    # ...
    zipfile='lib/library.zip',
    options={
        'py2exe': {
            'includes': ['zmq.backend.cython'],
            'excludes': ['zmq.libzmq'],
            'dll_excludes': ['libzmq.pyd'],
        }
    },
    data_files=[
        ('lib', (zmq.libzmq.__file__,))
    ]
)
+10

, , , .

py2exe wiki ( , ). , 13.0.0 , libzmq.pyd libzmq.dll. Py2exe "zmq.libzmq.pyd", Windows, () zmq.core._device.pyd libzmq.pyd.

zmq.libzmq.pyd libzmq.pyd dist, py2exe. exex exex exe exe .

+3

, , :

+1

, , , libzmq - I-m-lzy.

  • libzmq.pyd C:\python27\Lib\sites-packages\zmq c:\python27\DLLs import zmq.libzmq
  • .

    Setting (# ... Parameters = {'py2exe': {'includes': ['zmq.backend.cython']}}, data_files = [('lib', (zmq.libzmq. File ,))])

0
source

All Articles