-
Notifications
You must be signed in to change notification settings - Fork 861
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
Cannot connect to jupyter/ipython instance #185
Comments
Thanks for trying this out. Could you collect a strace for the failing command to what might be failing? |
I can confirm this bug. You can find the strace here: https://gist.github.com/chrisfilo/2dd2c47592423291bf16db6348d26c6a |
It seems that this bug is caused by jupyter/notebook#1331 |
Trying to get the same thing to run too, and with the same result. I'm on a Surface 3 4GB/128GB and happy to aid with testing/pinning things down. Jupyter is such an excellent tool and being able to run this on Bash on Windows would be amazing. |
Same setup as @arthurhjorth here and also happy to help out. Loving bash on windows so far. Getting jupyter up and running would be the icing on the cake. |
I came up with a workaround based on @MadcowD 's investigation on jupyter/notebook#1331 . I submitted it upstream as zeromq/libzmq#2013 , and posted an updated Ubuntu 14.04 package to a PPA in case anyone would like to try to use it. Standard disclaimers -- I make no guarantees about either security or correctness; if it eats your data or steps on your cat I take no responsibility. But it seems to work for me. Of course, getting a fix into WSL would be ideal. My cursory understanding of this code is that WSL would need to implement |
@aseering can you please explain how to use this fix? I can 'make install' for libzmq from repo source (including this fix) but how do I setup Jupyter to use the custom libzmq build? - it is still giving the same error that is quoted in the original post. Thank you! |
@sgraphics are you familiar with Ubuntu PPAs? I would suggest using the PPA that I created that contains the fix. The simplest way to do so would be, I believe:
That last command would normally install Ubuntu's libzmq; but because you've added my PPA containing the updated package, it will get the updated package instead. If you want to inspect the source code, you're welcome to download it from the PPA's website (see the link above). You can also follow the first two steps above, then run Unfortunately, |
@aseering this works perfectly. Thanks a million! |
@aseering |
I had the same issue as @pulinagrawal.
|
@pulinagrawal @jzuhone -- hm... Could you post the output of |
I've posted a bug report about this issue to the Ubuntu libzmq3 bugtracker: https://bugs.launchpad.net/ubuntu/+source/zeromq3/+bug/1602900 The fix is known; hopefully they will agree to backport it so that WSL users don't have to keep doing this dance to install packages from a PPA. |
this fix doesn't work for my Surface 3... Desired=Unknown/Install/Remove/Purge/Hold |
@mrsiamen -- it sounds like you have the new package but it's not getting used for some reason. Is this a clean install of WSL? Did you try installing libzmq3 yourself before using the PPA? Could you post the results of the following commands?:
For reference, on my machine, I see:
|
on
|
@pulinagrawal -- Sounds like you're not using Ubuntu's iPython package? This fix only fixes Ubuntu's libzmq package. If you're using an iPython that pulls in libzmq from elsewhere, they will need to apply the fix as well. To be specific, I'm testing as follows:
If you want to track this down further, you could run a command like
to try to figure out the actual path to the Python zmq module that you're running. Then update the first command above with the appropriate path and re-run Another approach, just a guess: Are you getting ipython through Anaconda? I don't personally use Anaconda on Linux (I do on Mac/Windows) because it tends to cause this sort of confusion, and because there's less need for it -- |
@aseering Thanks for keep tracking on this:). looks like I'm facing the same issue as pulinagrawal does. |
I try to install the fixed libzmq3 before installing ipython notebook and it works now. libzmq.so.3 => /usr/lib/x86_64-linux-gnu/libzmq.so.3 (0x00007fb3722e0000) |
@aseering Could you possibly package this for conda??? unfortunately I have to use a python distribution that is through conda (specific not available packages). Or prehaps tell me how to link it? |
Thank You for the help!! It is fixed now. I uninstalled ipython and jupyter. I removed the zmq folder from dist-packages. I might have broken other stuff by just deleting the zmq folder. So I guess better method would have been to use uninstall on python-zmq. But I did not know the name of the package then. But it works for now. |
@tanguita , sorry for the delay -- I believe Anaconda manages their own packages so they would have to incorporate this patch themselves. Feel free to go to Anaconda's bug tracker and file a bug there. If they have questions, I'd be happy to help them with the process. If you want to get the source code for the patched libzmq, first run the commands above to get the updated package; then run
This will download the source package from my PPA. You can "cd" into it, read zmq's documentation, and see how to build it. Alternatively, you can just install the binary package and take the pre-built libzmq that it installs, and try replacing Anaconda's libzmq with Ubuntu's. But that will only work if the two are the same or similar versions; I haven't tested it myself. |
@aseering, This is not strictly true--one can create a package for Anaconda and upload it to one's own conda channel: Then others can install it in their conda distribution. |
This is what I thought but do not know how to do it.. On 21/07/16 11:25, John ZuHone wrote:
|
Ah, thanks @jzuhone , I didn't realize people can create their own packages. I'll look into that, but I'm a bit busy these days and I'm not a big Anaconda user so I'd have a bunch to learn... The actual code change to libzmq is quite small; you can see it here. If anyone here knows more about Anaconda packaging, feel free to apply that patch and add it to a channel. |
Hi @arthurhjorth -- what arguments are you running
There are a few weird edge cases to consider:
All of the above assumes that you're using the standard version of Python packaged for Ubuntu Linux (which is what WSL uses). If you're running on CentOS, or Mac, or on Ubuntu using an alternative version of Python such as Anaconda or Linuxbrew, or if you compile and install Python yourself from source, then at minimum the number and location of paths in Python's search path will change; also, some of those installations will reconfigure your system to not require |
@jzuhone Hey man thks for the fix. I tried to fix this for days now and your package made it work like a charm! I appreciate it! |
Aye, also just saved by @jzuhone. For anyone working from an anaconda install, his package totally works. Thanks! |
Hey, @aseering I'm getting |
I reinstalled 14.04 from scratch, but still getting |
Hi @fedorzh -- for what it's worth, an alternative fix is bundled into the latest Insider build. So if you're willing to run an Insider build (either Fast or Slow Ring is new enough), then you no longer need my fix. (Also, Insider builds have native official support for Ubuntu 16.04, as well as many other WSL fixes and improvements.) If you are staying with regular Windows, though -- how did you install iPython Notebook? My fix only works if you installed it via If you need to use a version of Notebook that's installed from some other source, others on this thread (for example, @jzuhone ) have created packages for other packaging systems. |
@aseering I install jupyter with |
@fedorzh -- hm... You could try installing the |
Also -- if you're installing anything from source on Ubuntu (including the command that I recommended above), first you want to run |
Hi, Nima |
@nimasasa - Thanks for your post.
Which kernel are you referring to? Is your setup on native Linux or WSL/bash? |
@sunilmut I ma using WSL. I know it does not support graphical applications officially. But I was able to use Xming. Now, my problem is I can have anaconda and Jupyter on my chrome to run my codes, but when I am trying to plot something, my python kernel dies. |
Thanks @jzuhone!
Not going for the fast ring because I've faced BSOD's before.. ;) |
Thanks @jzuhone! |
How to get tensorflow gpu support? I have cuda and tensorflow-gpu installed on Windows but not on Windows bash. Any suggestions on using the GPU with GYM on windows Bash. |
@ahsteven it's impossible to run tensorflow with gpu on WSL. |
@Yangff Did you try using VcxSrv to run it with 17063? (I'm unable to go Insiders to test myself). You can now run VSCode from WSL so I wouldn't be surprised if other GUI dev tools are able to work now too. It will be interesting to see what now works and what still doesn't and what is preventing them at this point from running. |
No, I have not. I plan to setup a dual boot soon so I will just leave it
for now.
…On Wed, Dec 20, 2017 at 1:39 PM, DarthSpock ***@***.***> wrote:
@Yangff <https://github.com/yangff> Did you try using VcSrv to run it
with 17063? (I'm unable to go Insiders to test myself). You can now run
VSCode from WSL so I wouldn't be surprised if other GUI dev tools are able
to work now too. It will be interesting to see what now works and what
still doesn't and what is preventing them at this point from running.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#185 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AJsMv4O3uSnDRRU-VEPSw3PjIFubJEDSks5tCVRggaJpZM4IG4pi>
.
|
Despite @jzuhone's herculean efforts on his build of zeromq, my WSL/jupyter installation isn't working with matplotlib. For example, a notebook consisting simply of: from matplotlib import pyplot
pyplot.plot([1, 2, 3], [3, 1, 2], 'ko') Kills the kernel. Is this still expected on non-Insider builds of Windows 10? Should bug my IT department to let me into the Insider program? Output of `conda list`paul@POR-PHOBSON10:/mnt/c/Users/phobson$ conda list # packages in environment at /home/paul/miniconda: # _nb_ext_conf 0.4.0 py35_1 anaconda-client 1.6.6 py35h6b90917_0 asn1crypto 0.23.0 py35h4ab26a5_0 beautifulsoup4 4.6.0 py35h442a8c9_1 bleach 2.1.1 py35hd5e75dd_0 ca-certificates 2017.08.26 h1d4fec5_0 certifi 2017.11.5 py35h9749603_0 cffi 1.11.2 py35hc7b2db7_0 chardet 3.0.4 py35hb6e9ddf_1 clyent 1.2.2 py35h491ffcb_1 conda 4.4.7 py35_0 conda-build 3.2.1 py35_0 conda-env 2.6.0 h36134e3_1 conda-verify 2.0.0 py35he912c7b_0 cryptography 2.1.4 py35hbeb2da1_0 cycler 0.10.0 py35hc4d5149_0 dbus 1.10.22 h3b5a359_0 decorator 4.1.2 py35h3a268aa_0 entrypoints 0.2.3 py35h48174a2_2 expat 2.2.5 he0dffb1_0 filelock 2.0.13 py35h4160c53_0 fontconfig 2.12.4 h88586e7_1 freetype 2.8 hab7d2ae_1 glib 2.53.6 h5d9569c_2 glob2 0.6 py35hff66265_0 gmp 6.1.2 h6c8ec71_1 gst-plugins-base 1.12.2 he3457e5_0 gstreamer 1.12.2 h4f93127_0 html5lib 1.0.1 py35h2f9c1c0_0 icu 58.2 h9c2bf20_1 idna 2.6 py35h8605a33_1 intel-openmp 2018.0.0 hc7b2577_8 ipykernel 4.7.0 py35h2f9c1c0_0 ipython 6.2.1 py35hd850d2a_1 ipython_genutils 0.2.0 py35hc9e07d0_0 ipywidgets 7.0.5 py35h8147dc1_0 jedi 0.11.0 py35_2 jinja2 2.10 py35h480ab6d_0 jpeg 9b h024ee3a_2 jsonschema 2.6.0 py35h4395190_0 jupyter 1.0.0 py35hd38625c_0 jupyter_client 5.1.0 py35h2bff583_0 jupyter_console 5.2.0 py35h4044a63_1 jupyter_core 4.4.0 py35ha89e94b_0 libedit 3.1 heed3624_0 libffi 3.2.1 hd88cf55_4 libgcc 7.2.0 h69d50b8_2 libgcc-ng 7.2.0 h7cc24e2_2 libgfortran-ng 7.2.0 h9f7466a_2 libiconv 1.15 h63c8f33_5 libpng 1.6.32 hbd3595f_4 libsodium 1.0.15 hf101ebd_0 libstdcxx-ng 7.2.0 h7a57d05_2 libxcb 1.12 hcd93eb1_4 libxml2 2.9.4 h2e8b1d7_6 markupsafe 1.0 py35h4f4fcf6_1 matplotlib 2.1.1 py35ha26af80_0 mistune 0.8.1 py35h9251d8c_0 mkl 2018.0.1 h19d6760_4 nb_anacondacloud 1.4.0 py35_0 nb_conda 2.2.1 py35hccc8299_0 nb_conda_kernels 2.1.0 py35_0 nbconvert 5.3.1 py35hc5194e3_0 nbformat 4.4.0 py35h12e6e07_0 nbpresent 3.0.2 py35h9c03491_1 ncurses 6.0 h9df7e31_2 notebook 5.2.2 py35he644770_0 numpy 1.14.0 py35h3dfced4_0 openssl 1.0.2n hb7f436b_0 packaging 16.8 py35h2260b46_1 pandoc 1.19.2.1 hea2e7c5_1 pandocfilters 1.4.2 py35h1565a15_1 parso 0.1.1 py35h1b200a3_0 patchelf 0.9 hf79760b_2 path.py 10.5 py35h39c98c1_0 pcre 8.41 hc27e229_1 pexpect 4.3.0 py35hf410859_0 pickleshare 0.7.4 py35hd57304d_0 pip 9.0.1 py35h7e7da9d_4 pkginfo 1.4.1 py35hb526c55_1 prompt_toolkit 1.0.15 py35hc09de7a_0 ptyprocess 0.5.2 py35h38ce0a3_0 pyasn1 0.4.2 py35h8f845f4_0 pycosat 0.6.3 py35h6b6bb97_0 pycparser 2.18 py35h61b3040_1 pycrypto 2.6.1 py35h9852db7_1 pygments 2.2.0 py35h0f41973_0 pyopenssl 17.5.0 py35h4f8b8c8_0 pyparsing 2.2.0 py35h041ed72_1 pyqt 5.6.0 py35h0e41ada_5 pysocks 1.6.7 py35h6aefbb0_1 python 3.5.4 h417fded_24 python-dateutil 2.6.1 py35h90d5b31_1 pytz 2017.3 py35hb13c558_0 pyyaml 3.12 py35h46ef4ae_1 pyzmq 16.0.2 py35_0 qt 5.6.2 h974d657_12 qtconsole 4.3.1 py35h4626a06_0 readline 7.0 ha6073c6_4 requests 2.18.4 py35hb9e6ad1_1 ruamel_yaml 0.11.14 py35h8e2c16b_2 setuptools 36.5.0 py35ha8c1747_0 simplegeneric 0.8.1 py35h2ec4104_0 sip 4.18.1 py35h9eaea60_2 six 1.11.0 py35h423b573_1 sqlite 3.20.1 hb898158_2 terminado 0.6 py35hce234ed_0 testpath 0.3.1 py35had42eaf_0 tk 8.6.7 hc745277_3 tornado 4.5.2 py35hf879e1d_0 traitlets 4.3.2 py35ha522a97_0 urllib3 1.22 py35h2ab6e29_0 wcwidth 0.1.7 py35hcd08066_0 webencodings 0.5.1 py35hb6cf162_1 wheel 0.30.0 py35hd3883cf_1 widgetsnbextension 3.0.8 py35h84cb72a_0 xz 5.2.3 h55aa19d_2 yaml 0.1.7 had09818_2 zeromq 4.1.dev0 0 jzuhone zlib 1.2.11 ha838bed_2 |
@phobson - Can you clarify what you mean by Also, which version of Windows are you running. From your WSL bash prompt, output of |
Sorry I wasn't clear. I meant that trying to plot in a jupyter notebook with matplotlib was killing the ipython kernel. The windows/WSL/linux kernels were fine. I was just digging back into this and working with my IT department. I'm not sure which if these incantations did the trick, but we upgraded my windows build to 1709 and then uninstalled/reinstalled WSL/Ubuntu via 🤷♂️ |
@phobson - Thanks for the details. Good to know your issue was resolved. There is significant investment going into WSL. So, staying on the latest Windows release will always give you the most mileage, at least that's what we aim for. |
When attempting to run a jupyter notebook or qtconsole, I get error messages like this:
Invalid argument (bundled/zeromq/src/tcp_address.cpp:171)
The normal ipython prompt works fine.
The text was updated successfully, but these errors were encountered: