-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python2 kernel death in Ubuntu on Windows #1331
Comments
This is the key:
which is a C-level error in zeromq when starting the kernel, possibly related to funkiness in the Ubuntu+Windows environment. How did you install your Python packages, specifically pyzmq? |
I installed the jupyter dependent packages (including pyzmq) with the following commands.
|
@minrk I wonder if unicode/characters are getting in the way as well here with Python:
|
@kozo2 can you install zeromq with apt, and then reinstall pyzmq:
|
@minrk I installed zeromq with apt, and reinstalled pyzmq with pip
|
I suspect that libzmq has some issues in the pseudo-linux context. Getting to the bottom of that is probably the key. For instance, can you run the pyzmq tests:
and see what you get? It's possible that you will need to build libzmq from source to get it to properly detect its environment, and also possible that it will need patches to run. |
I got
Next, I will try to build libzmq from source. |
@minrk @kozo2 You may already be aware of this resource, but I'll pass it along as an FYI. There is an "unofficial" binaries for Python Packages website maintained by Christoph Gohlke, Laboratory for Fluorescence Dynamics, University of California, Irvine. I don't know if this resource will be helpful for Ubuntu on Windows, but may be helpful when working with Windows. There's a ZeroMQ binary towards the end of the home page. |
@willingc thanks, yes, that's useful for the Windows side, but here I think we want linux binaries, which we are currently getting from |
@minrk I agree. FYI. I did a quick scan of the Microsoft blog post comments and the Microsoft issue tracker. It looks like socket support is a known issue/area that needs improvement. |
Thanks for finding that, @willingc! |
Hi all. I just built Libzmq in this context to get to the meat of the error. I've attached my test-suite log: It appears that line 186 of /src/tcp_address.cpp is causing the error.
|
@MadcowD Great job tracking the error down. |
For what it's worth, Bash on Windows does not currently expose any network interfaces. Networking is available, but no information is exposed about the underlying physical (or virtual) hardware; not even a loopback device. |
@willingc How do I get Bash to recognize pyzmq? I've the same problem. Have any one of you solved it yet? |
@adonese If you could provide a bit more detail, it will assist us in helping you.
Thanks! |
Sorry I thought this issue is in Bash on Ubuntu on Windows page :) None of them have actually helped me. Regarding the unofficial Python packages, I just didn't how do I get Bash to recognize Windows' |
Hi @adonese, Hmm...I've checked around a bit since I actually don't have access to a Bash on Ubuntu on Windows system. It looks like this issue on the Bash on Windows issue tracker has some promise microsoft/WSL#185 If you find one of those work for you, please drop us a note here. Good luck! |
@adonese -- take a look at the link @willingc posted; a bunch of us have worked out the fix there. @willingc FYI: If you're interested in trying out Bash on Ubuntu on Windows (aka "WSL"), I believe you can get a free VM from modern.ie: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ Download the latest "Preview" VM; older ones don't support WSL yet. Its license expires after a month or a few months or so, but you're allowed to download a new VM when your current one expires. It doesn't come with WSL preinstalled; you have to run through its install process. Maybe not worth it, but FYI it's an option. |
@aseering Thanks for passing along the info and for finding the solution 🍰 Closing issue. ResolutionSee Bash on Windows issue tracker microsoft/WSL#185 |
In case people are wondering how to get it working using pip uninstall pyzmq
sudo add-apt-repository ppa:aseering/wsl
sudo apt-get update
sudo apt-get install libzmq3 libzmq3-dev
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
pip install --no-use-wheel -v pyzmq
pip install jupyter |
@gglanzani Thanks for telling me that information, but it core-dumped like
|
@kozo2 Are you sure it has nothing to do with the missing It's working properly for me + 2 other that commented on the BOW repo (see link above) |
@gglanzani @aseering , I am also having problems with running Jupyter notebook from my bash shell on WSL. I'd prefer to get it working in WSL/bash rather than trying to use virtualbox/vagrant, etc. Please help!! I am able to bring up my Jupyter notebook, but as soon as I tried to run even the most basic notebook, my connection fails. Looks like something to do with zeromq or the Python versions. Error message from the Jupyter console: Surface Pro 3. Using Windows Subsystem for Linux (WSL). Windows 10 root@mypc:/mnt/c/Users/myid/mylinux# python --version Python 2.7.6
I did execute the below code, but even after that I am getting the same issues: Note: * This is the way I originally installed Python/pip/ Jupyter* Thanks! |
Hi @HemanK -- it sounds like the |
Hi @aseering , root@mypc:/mnt/c/Users/myid/mylinux/tf-tutorial# find /usr $HOME -name mq. and here is the result of ldd So the libzmq.so files are in /usr/lib/x86_64-linux-gnu and /usr/local/python2.7/deist-packages/zmq. I wonder if I am missing some packages and whether I should try to reinstall bash on Windows Any suggestions? Thanks! |
Hi @HemanK -- you said that you ran Anyway, I do see something interesting in the list of files above: There's a Perhaps someone from the Jupyter project ( @minrk @willingc ? ) could comment -- are y'all now bundling your own version of libzmq? If so, would you consider pulling in a newer version from the libzmq project that contains the fix to this issue? Or, if you don't want to upgrade, you could backport the patch; as patches go, this one is very simple. |
Hi @aseering , I can see only object that starts with pyz_. It is the pyzmq_ egg-info: I am not very familiar with how that works... Will wait for feedback from you or @minrk or @willingc root@mypc:/mnt/c/Users/myid/mylinux/tf-tutorial# find /usr $HOME -name pyz* /usr/local/lib/python2.7/dist-packages/pyzmq-16.0.0-py2.7.egg-info root@mypc:/mnt/c/Users/myid/mylinux/tf-tutorial# cd /usr/local/lib/python2.7/dist-packages/pyzmq-* root@mypc:/usr/local/lib/python2.7/dist-packages/pyzmq-16.0.0-py2.7.egg-info# ls -ltr root@mypc:/usr/local/lib/python2.7/dist-packages/pyzmq-16.0.0-py2.7.egg-info# view SOURCES.txt Thanks! |
Same issue described; error is as follows:
System Information:
I am running jupyter notebook on Ubuntu on Windows. Python installation is the default from Anaconda2-4.2.0-Linux-x86_64.sh, and I am using the jupyter-notebook app that comes preinstalled with anaconda2. |
Hi @aseering @HemanK @ebridge2, I'm traveling at the moment so I don't have access to a Windows system. I will have access over the weekend and will try to replicate or troubleshoot. Thanks. cc @minrk @takluyver |
Can you try a manual download and install of pyzmq: wget https://pypi.io/packages/source/p/pyzmq/pyzmq-16.0.0.tar.gz
tar -xzf pyzmq-16.0.0.tar.gz
cd pyzmq-16.0.0
python setup.py install --zmq=/usr/lib and share the complete output? |
Hi @minrk , I had some issues with my laptop and have to get a replacement laptop from my office this week, so I it may take me sometime to get everything setup again and to resume my testing. In the meanwhile I installed CNTK (Microsoft Cognitive Toolkit for Deep Learning, which is similar to Tensorflow) and got it working quickly on my Windows laptop. That installation was using Anaconda, Python 3.4 and Jupyter. Hope to compare Tensorflow and CNTK once I get Tensor flow also working later. So look forward to getting Tensor Flow installed and working within the next couple of weeks. Thanks! |
@tildebyte -- what you describe would be correct for a source package, but pyzmq is distributed on PyPI as a binary package by default. |
@aseering I hear you, but |
@minrk - I followed your instructions from #1331 (comment) and I'm seeing the exact same result as the OP (although with the slightly different line number of EDIT: I eventually got this to work by manually building a patched version of pyzmq with a fix from microsoft/WSL#185 |
For what it's worth, I'm guessing (haven't checked recently) that WSL has worked around this issue in the latest Insider build. |
@aseering Do you have confirmation that this is the case? My situation is identical to @HemanK 's and I've thought about switching over to the Insider channel to see if the updates to WSL resolve issues like this, but value the reliability of a more stable build for my main machine. A quick verification that this works better on the latest Insider Build would be all the push I need to switch. Thanks for all the support that you've been providing on this issue! |
@TheNathanielWatkins -- glad I could help! I can confirm that Ubuntu's stock Notebook package now works properly without my patch. I tested on what is currently the latest Insider build (14986). We're told that the relevant change will be released to stable Windows as part of the Creators release in a few months. I haven't tested with other Jupyter Notebook versions, but I would expect them to work as well. If you want to test yourself, you could download the "Preview" VM from Microsoft and test there. The VM is based on a slightly older Insider build; you might need to update it. (Which you can probably do through Windows Update, but I haven't actually tried...) |
Wow! Thank you @aseering. You're definitely my internet hero of 01/05/17. Took a while to get switched over to the Insider Preview (why do they make us wait 24 hours to switch?) and re-setup, but now that it's up, everything seems to be working perfectly now. Combined with a BROWSER hack (detailed here, I can now seemlessly run Jupyter in my Windows native Chrome. |
Hi, Nima |
Hi @nimasasa -- for what it's worth, matplotlib works fine for me. That said, I'm using a recent Insider Build of Windows despite its potential bugs, because its support for Linux features is so much better. |
@nimasasa Check that your versions are up to date too.
|
If you haven't already done this, try running |
Closing due to inactivity and also because Python 2 has now reached end of life. Thanks all! |
Python2 kernel died when I ran
jupyter-notebook
from Ubuntu on Windows .How can I help fix this ?
If there is something that I should report (dependent package versions, etc...), please tell me.
The text was updated successfully, but these errors were encountered: