Search code examples
pythonzeromqpyzmqnuitka

Nuitka with zeroMQ


I am trying to use Nuitka to compile a simple zeroMQ example and am having problems. I have used the following command to compile:

nuitka --standalone --portable --remove-output --recurse-all --python-version=3.4 testclient.py

and I get the following compile time warning:

Nuitka:WARNING:testclient.py:1: Cannot find 'zmq' as absolute import.

When I run the exe the run time error is:

ImportError: No module named 'zmq'

Am I doing something wrong or is there an incompatibility with nuitka and zmq? ( The testclient.py works fine in the interpreter. )

Can anyone help with fixing this? ( I post this here instead of emailing the Nuitka author directly so others can learn from my difficulties aswell )

Using Ubuntu 14.04 and Python3.4.

Edit: Having similar problems using Windows 7 with Anaconda Python 3.4.


Solution

  • Extract egg packages so that plain .py files are accessible. You can do it by adding

    [easy_install]
    zip_ok = false
    

    to your ~/.pydistutils

    and reinstalling dependencies.

    For some reason nuitka 0.5.14.3 does not like compressed .egg files