[IPython-dev] Fixing silent failures with IPython Notebook / uuid on Cygwin64

Aron Ahmadia aron@ahmadia....
Mon Sep 30 13:26:08 CDT 2013


Just a heads up for anybody who is trying to do development in Cygwin64.

First off, you will need to follow the instructions here for getting
ZMQ/PYZMQ:

https://github.com/zeromq/pyzmq/issues/113

If you are trying to run the notebook, you may encounter silent failures
when running IPython Notebook from the command line:

$ ipython notebook

(Simply exits with no messages/errors)

This is coming from a segfault in the Cygwin64 Python uuid module.  I tried
to follow the instructions here:
http://stackoverflow.com/questions/18947163/uuid-python-import-fails-on-cygwin-64bitsand
here:
http://bugs.python.org/file20685/issue11063.patch but this didn't fix the
crash.

My stop-gap solution is to disable the call to _uuid_generate in uuid4
post-patch.  This is reasonably safe, and just uses a different random
number generator instead of the system-provided uuid function.

def uuid4():
    """Generate a random UUID."""

    # When the system provides a version-4 UUID generator, use it.

+    # AA disabling _uuid_generate
+    uuid_generate_random = None
-    uuid_generate_random = _uuid_generate("uuid_generate_random")

The CPython and Cygwin folks appear to be aware of this issue, but since it
took some of my time to debug, I'm hoping this will help others
encountering similar problems in the future.

After switching away from a GitHub release build, I've got IPython Notebook
and the majority of its dependencies building from source using HashDist on
Cygwin64 with a few things coming from the system, such as the broken
Python patched above.

Happy coding.

A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20130930/e7cb1548/attachment.html 


More information about the IPython-dev mailing list