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

Fernando Perez fperez.net at gmail.com
Wed Oct 2 20:32:43 EDT 2013


nasty! Thanks for these instructions Aron, I'm sure they'll save some other
poor soul quite a few hours...

f


On Wed, Oct 2, 2013 at 11:38 AM, Aron Ahmadia <aron at ahmadia.net> wrote:

> A better fix that I missed is this patch from Evgeny Sologubov
>
> diff -r 4a318a45c4c3 Lib/uuid.py
> --- a/Lib/uuid.py   Mon Aug 19 13:07:18 2013 -0400
> +++ b/Lib/uuid.py   Mon Aug 19 21:41:08 2013 +0400
> @@ -429,6 +429,8 @@
>              _uuid_generate_random = lib.uuid_generate_random
>          if hasattr(lib, 'uuid_generate_time'):
>              _uuid_generate_time = lib.uuid_generate_time
> +            if _uuid_generate_random is not None:
> +                break  # found everything we were looking for
>
>      # The uuid_generate_* functions are broken on MacOS X 10.5, as noted
>      # in issue #8621 the function generates the same sequence of values
>
> Happy computing,
> Aron
>
> On Mon, Sep 30, 2013 at 2:26 PM, Aron Ahmadia <aron at ahmadia.net> wrote:
> > 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-64bits
> > and 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
> >
> >
> >
> >
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>



-- 
Fernando Perez (@fperez_org; http://fperez.org)
fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)
fernando.perez-at-berkeley: contact me here for any direct mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20131002/3a5fd932/attachment.html>


More information about the IPython-dev mailing list