Cannot connect to jupyter/ipython instance #185

Closed
jzuhone opened this Issue Apr 13, 2016 · 122 comments

Comments

Projects
None yet
@jzuhone

jzuhone commented Apr 13, 2016

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.

@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Apr 14, 2016

Member

Thanks for trying this out. Could you collect a strace for the failing command to what might be failing?

Member

sunilmut commented Apr 14, 2016

Thanks for trying this out. Could you collect a strace for the failing command to what might be failing?

@chrisfilo

This comment has been minimized.

Show comment
Hide comment
@chrisfilo

chrisfilo May 19, 2016

I can confirm this bug. You can find the strace here: https://gist.github.com/chrisfilo/2dd2c47592423291bf16db6348d26c6a

I can confirm this bug. You can find the strace here: https://gist.github.com/chrisfilo/2dd2c47592423291bf16db6348d26c6a

@chrisfilo

This comment has been minimized.

Show comment
Hide comment
@chrisfilo

chrisfilo May 19, 2016

It seems that this bug is caused by jupyter/notebook#1331

It seems that this bug is caused by jupyter/notebook#1331

@arthurhjorth

This comment has been minimized.

Show comment
Hide comment
@arthurhjorth

arthurhjorth May 19, 2016

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.

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.

@guydepauw

This comment has been minimized.

Show comment
Hide comment
@guydepauw

guydepauw May 20, 2016

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.

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.

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering May 27, 2016

Contributor

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 getifaddrs(), and would I think need to at minimum report on the existence of a loopback interface.

Contributor

aseering commented May 27, 2016

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 getifaddrs(), and would I think need to at minimum report on the existence of a loopback interface.

@sgraphics

This comment has been minimized.

Show comment
Hide comment
@sgraphics

sgraphics Jun 12, 2016

@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!

@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!

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Jun 12, 2016

Contributor

@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:

sudo add-apt-repository ppa:aseering/wsl
sudo apt-get update
sudo apt-get install libzmq3

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 apt-get source libzmq3, which will download the source code for the package to the current directory. Note that PPAs can contain updated versions of any package; you should only add PPAs that you trust.

Unfortunately, make install will not work in this case: The upstream version that contains the fix is also too new to work on Ubuntu 14.04. The PPA contains the same fix but applied to the source code used by the official Ubuntu 14.04 package. (I downloaded the Ubuntu source using apt-get source, then used quilt to apply the diff containing my fix, and uploaded the updated package.)

Contributor

aseering commented Jun 12, 2016

@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:

sudo add-apt-repository ppa:aseering/wsl
sudo apt-get update
sudo apt-get install libzmq3

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 apt-get source libzmq3, which will download the source code for the package to the current directory. Note that PPAs can contain updated versions of any package; you should only add PPAs that you trust.

Unfortunately, make install will not work in this case: The upstream version that contains the fix is also too new to work on Ubuntu 14.04. The PPA contains the same fix but applied to the source code used by the official Ubuntu 14.04 package. (I downloaded the Ubuntu source using apt-get source, then used quilt to apply the diff containing my fix, and uploaded the updated package.)

@guydepauw

This comment has been minimized.

Show comment
Hide comment
@guydepauw

guydepauw Jun 15, 2016

@aseering this works perfectly. Thanks a million!

@aseering this works perfectly. Thanks a million!

@pulinagrawal

This comment has been minimized.

Show comment
Hide comment
@pulinagrawal

pulinagrawal Jul 13, 2016

@aseering
I am getting an error 'Invalid argument' in line 190 of tcp_address.cpp even after updating the libzmq3 as you described above.
I couldn't build from source because it was asking for source URI when I was trying to download source.

@aseering
I am getting an error 'Invalid argument' in line 190 of tcp_address.cpp even after updating the libzmq3 as you described above.
I couldn't build from source because it was asking for source URI when I was trying to download source.

@jzuhone

This comment has been minimized.

Show comment
Hide comment
@jzuhone

jzuhone Jul 13, 2016

I had the same issue as @pulinagrawal.

On Jul 13, 2016, at 11:22 AM, Pulin Agrawal notifications@github.com wrote:

@aseering

I am getting an error 'Invalid argument' in line 190 of tcp_address.cpp even after updating the libzmq3 as you described above.
I couldn't build from source because it was asking for source URI when I was trying to download source.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

jzuhone commented Jul 13, 2016

I had the same issue as @pulinagrawal.

On Jul 13, 2016, at 11:22 AM, Pulin Agrawal notifications@github.com wrote:

@aseering

I am getting an error 'Invalid argument' in line 190 of tcp_address.cpp even after updating the libzmq3 as you described above.
I couldn't build from source because it was asking for source URI when I was trying to download source.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Jul 14, 2016

Contributor

@pulinagrawal @jzuhone -- hm... Could you post the output of dpkg -l libzmq3? It should indicate that you have version 4.0.4+dfsg-2wsl1 installed. (The wsl1 at the end is the key.)

Contributor

aseering commented Jul 14, 2016

@pulinagrawal @jzuhone -- hm... Could you post the output of dpkg -l libzmq3? It should indicate that you have version 4.0.4+dfsg-2wsl1 installed. (The wsl1 at the end is the key.)

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Jul 14, 2016

Contributor

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.

Contributor

aseering commented Jul 14, 2016

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.

@mrsiamen

This comment has been minimized.

Show comment
Hide comment
@mrsiamen

mrsiamen Jul 16, 2016

this fix doesn't work for my Surface 3...
I can still see the message
Invalid argument (bundled/zeromq/src/tcp_address.cpp:171)

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-========================-=================-=================-=====================================================
ii libzmq3:amd64 4.0.4+dfsg-2wsl1 amd64 lightweight messaging kernel (shared library)

this fix doesn't work for my Surface 3...
I can still see the message
Invalid argument (bundled/zeromq/src/tcp_address.cpp:171)

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-========================-=================-=================-=====================================================
ii libzmq3:amd64 4.0.4+dfsg-2wsl1 amd64 lightweight messaging kernel (shared library)

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Jul 16, 2016

Contributor

@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?:

ldd /usr/lib/python2.7/dist-packages/zmq/backend/cython/utils.x86_64-linux-gnu.so | grep zmq
md5sum /usr/lib/x86_64-linux-gnu/libzmq.so.3.1.0

For reference, on my machine, I see:

$ ldd /usr/lib/python2.7/dist-packages/zmq/backend/cython/utils.x86_64-linux-gnu.so | grep zmq
        libzmq.so.3 => /usr/lib/x86_64-linux-gnu/libzmq.so.3 (0x00007f72cc2a0000)
$ md5sum /usr/lib/x86_64-linux-gnu/libzmq.so.3
87b97738b28a38a8e89796ecd41862b0  /usr/lib/x86_64-linux-gnu/libzmq.so.3.1.0
Contributor

aseering commented Jul 16, 2016

@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?:

ldd /usr/lib/python2.7/dist-packages/zmq/backend/cython/utils.x86_64-linux-gnu.so | grep zmq
md5sum /usr/lib/x86_64-linux-gnu/libzmq.so.3.1.0

For reference, on my machine, I see:

$ ldd /usr/lib/python2.7/dist-packages/zmq/backend/cython/utils.x86_64-linux-gnu.so | grep zmq
        libzmq.so.3 => /usr/lib/x86_64-linux-gnu/libzmq.so.3 (0x00007f72cc2a0000)
$ md5sum /usr/lib/x86_64-linux-gnu/libzmq.so.3
87b97738b28a38a8e89796ecd41862b0  /usr/lib/x86_64-linux-gnu/libzmq.so.3.1.0
@pulinagrawal

This comment has been minimized.

Show comment
Hide comment
@pulinagrawal

pulinagrawal Jul 16, 2016

@aseering

on dpkg on libzmq3 I do have wsl1 at the end

ldd gives
ldd: /usr/lib/python2.7/dist-packages/zmq/backend/cython/utils.x86_64-linux-gnu.so: No such file or directory

md5sum is the same as your output

@aseering

on dpkg on libzmq3 I do have wsl1 at the end

ldd gives
ldd: /usr/lib/python2.7/dist-packages/zmq/backend/cython/utils.x86_64-linux-gnu.so: No such file or directory

md5sum is the same as your output

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Jul 16, 2016

Contributor

@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:

  • Uninstall and fully remove any third-party ipython versions that you may have installed
  • Run the command sudo apt-get install ipython
  • Once ipython has successfully installed, run ipython notebook --no-browser. It should print out a URL. Open a browser in Windows; navigate to that URL.

If you want to track this down further, you could run a command like

find /usr $HOME -type d -name zmq | grep -v IPython

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 ldd; that should tell you where the third-party libzmq that you're using lives.

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 -- apt-get install and pip install work well on their own.

Contributor

aseering commented Jul 16, 2016

@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:

  • Uninstall and fully remove any third-party ipython versions that you may have installed
  • Run the command sudo apt-get install ipython
  • Once ipython has successfully installed, run ipython notebook --no-browser. It should print out a URL. Open a browser in Windows; navigate to that URL.

If you want to track this down further, you could run a command like

find /usr $HOME -type d -name zmq | grep -v IPython

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 ldd; that should tell you where the third-party libzmq that you're using lives.

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 -- apt-get install and pip install work well on their own.

@mrsiamen

This comment has been minimized.

Show comment
Hide comment
@mrsiamen

mrsiamen Jul 16, 2016

@aseering Thanks for keep tracking on this:). looks like I'm facing the same issue as pulinagrawal does.
Will try to confirm the path.

@aseering Thanks for keep tracking on this:). looks like I'm facing the same issue as pulinagrawal does.
Will try to confirm the path.

@mrsiamen

This comment has been minimized.

Show comment
Hide comment
@mrsiamen

mrsiamen Jul 17, 2016

I try to install the fixed libzmq3 before installing ipython notebook and it works now.
the kernel doesn't crash anymore. thank you guy for helping on this :)

libzmq.so.3 => /usr/lib/x86_64-linux-gnu/libzmq.so.3 (0x00007fb3722e0000)
87b97738b28a38a8e89796ecd41862b0 /usr/lib/x86_64-linux-gnu/libzmq.so.3.1.0

I try to install the fixed libzmq3 before installing ipython notebook and it works now.
the kernel doesn't crash anymore. thank you guy for helping on this :)

libzmq.so.3 => /usr/lib/x86_64-linux-gnu/libzmq.so.3 (0x00007fb3722e0000)
87b97738b28a38a8e89796ecd41862b0 /usr/lib/x86_64-linux-gnu/libzmq.so.3.1.0

@tanguita

This comment has been minimized.

Show comment
Hide comment
@tanguita

tanguita Jul 17, 2016

@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?

tanguita commented Jul 17, 2016

@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?

@pulinagrawal

This comment has been minimized.

Show comment
Hide comment
@pulinagrawal

pulinagrawal Jul 17, 2016

@aseering @mrsiamen

Thank You for the help!! It is fixed now.

I uninstalled ipython and jupyter. I removed the zmq folder from dist-packages.
I installed libzmq3 then installed ipython. It did not run yet because I guess removing zmq removed other stuff as well. So, I installed python-zmq. Now it is running.

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.

@aseering @mrsiamen

Thank You for the help!! It is fixed now.

I uninstalled ipython and jupyter. I removed the zmq folder from dist-packages.
I installed libzmq3 then installed ipython. It did not run yet because I guess removing zmq removed other stuff as well. So, I installed python-zmq. Now it is running.

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.

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Jul 21, 2016

Contributor

@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

apt-get source libzmq

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.

Contributor

aseering commented Jul 21, 2016

@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

apt-get source libzmq

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.

@jzuhone

This comment has been minimized.

Show comment
Hide comment
@jzuhone

jzuhone Jul 21, 2016

@aseering, This is not strictly true--one can create a package for Anaconda and upload it to one's own conda channel:

https://conda.anaconda.org/

Then others can install it in their conda distribution.

jzuhone commented Jul 21, 2016

@aseering, This is not strictly true--one can create a package for Anaconda and upload it to one's own conda channel:

https://conda.anaconda.org/

Then others can install it in their conda distribution.

@tanguita

This comment has been minimized.

Show comment
Hide comment
@tanguita

tanguita Jul 21, 2016

This is what I thought but do not know how to do it..

On 21/07/16 11:25, John ZuHone wrote:

@aseering https://github.com/aseering, This is not strictly
true--one can create a package for Anaconda and upload it to one's own
conda channel:

https://conda.anaconda.org/


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/AID11O3GdlLali0cfqZHhW1dxThfSg9mks5qX49tgaJpZM4IG4pi.

This is what I thought but do not know how to do it..

On 21/07/16 11:25, John ZuHone wrote:

@aseering https://github.com/aseering, This is not strictly
true--one can create a package for Anaconda and upload it to one's own
conda channel:

https://conda.anaconda.org/


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/AID11O3GdlLali0cfqZHhW1dxThfSg9mks5qX49tgaJpZM4IG4pi.

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Jul 21, 2016

Contributor

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.

Contributor

aseering commented Jul 21, 2016

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.

@tanguita

This comment has been minimized.

Show comment
Hide comment
@tanguita

tanguita Jul 22, 2016

@jzuhone Is this something you could do or point me on how? I have no idea where to start...

@jzuhone Is this something you could do or point me on how? I have no idea where to start...

@jzuhone

This comment has been minimized.

Show comment
Hide comment
@jzuhone

jzuhone Jul 23, 2016

@tanguita and others:

I compiled zeromq with the patch as an anaconda package, you can get it by doing:

conda install -c jzuhone zeromq=dev

At best I will keep it updated infrequently, but this should hold everyone over until the stable releases have the fix hopefully.

jzuhone commented Jul 23, 2016

@tanguita and others:

I compiled zeromq with the patch as an anaconda package, you can get it by doing:

conda install -c jzuhone zeromq=dev

At best I will keep it updated infrequently, but this should hold everyone over until the stable releases have the fix hopefully.

@jzuhone

This comment has been minimized.

Show comment
Hide comment
@jzuhone

jzuhone Jul 24, 2016

Sorry, found some issues with the above. Try:

conda install -c jzuhone zeromq=4.1.dev0

instead

jzuhone commented Jul 24, 2016

Sorry, found some issues with the above. Try:

conda install -c jzuhone zeromq=4.1.dev0

instead

@adonese

This comment has been minimized.

Show comment
Hide comment
@adonese

adonese Jul 27, 2016

@aseering
I've actually done all of the above. ldd and md5sum are like yours. My problem is that ipython can't detect my python installation. I've installed ipython using sudo apt get install ipython ipython-notebook.
And there are also some modules that I had to install using pip.
So how do I solve no native kernel is detected issue?

adonese commented Jul 27, 2016

@aseering
I've actually done all of the above. ldd and md5sum are like yours. My problem is that ipython can't detect my python installation. I've installed ipython using sudo apt get install ipython ipython-notebook.
And there are also some modules that I had to install using pip.
So how do I solve no native kernel is detected issue?

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Jul 27, 2016

Contributor

@adonese -- it sounds like your Python package directory has gotten corrupted. You should not be needing to pip install anything to get iPython Notebook working.

Do you have any important state (configuration, files, etc) inside your Bash environment? The simplest solution, though it's a bit heavyweight, would be to simply uninstall it per the instructions here:

https://msdn.microsoft.com/en-us/commandline/wsl/faq

then reinstall it per the instructions here:

https://msdn.microsoft.com/en-us/commandline/wsl/install_guide

and follow the steps above again to install the libzmq fix and install iPython Notebook.

Contributor

aseering commented Jul 27, 2016

@adonese -- it sounds like your Python package directory has gotten corrupted. You should not be needing to pip install anything to get iPython Notebook working.

Do you have any important state (configuration, files, etc) inside your Bash environment? The simplest solution, though it's a bit heavyweight, would be to simply uninstall it per the instructions here:

https://msdn.microsoft.com/en-us/commandline/wsl/faq

then reinstall it per the instructions here:

https://msdn.microsoft.com/en-us/commandline/wsl/install_guide

and follow the steps above again to install the libzmq fix and install iPython Notebook.

@adonese

This comment has been minimized.

Show comment
Hide comment
@adonese

adonese Jul 29, 2016

Thanks @aseering. I've finally got it to work. I had to uninstall WSL, the reinstalling it again. IPython is now fully working (It's IPython though, not Jupyter, but I guess the previous will work also on Jupyter).

You also have to install ipython notebook through sudo apt-get install ipython ipython-notebook.

adonese commented Jul 29, 2016

Thanks @aseering. I've finally got it to work. I had to uninstall WSL, the reinstalling it again. IPython is now fully working (It's IPython though, not Jupyter, but I guess the previous will work also on Jupyter).

You also have to install ipython notebook through sudo apt-get install ipython ipython-notebook.

@yasirs

This comment has been minimized.

Show comment
Hide comment
@yasirs

yasirs Jul 31, 2016

It's not working for me.

I tried finding my zmq directory like this:

$ find /usr $HOME -type d -name zmq
/usr/lib/python2.7/dist-packages/IPython/kernel/zmq
/usr/local/lib/python2.7/dist-packages/zmq

There is no directory such as /usr/lib/python2.7/dist-packages/zmq

On the other hand:

$ ldd /usr/local/lib/python2.7/dist-packages/zmq/backend/cython/utils.so
        linux-vdso.so.1 =>  (0x00007fffc4f64000)
        libzmq-feeff037.so.5.0.1 => /usr/local/lib/python2.7/dist-packages/zmq/backend/cython/../../.libs/libzmq-feeff037.so.5.0.1 (0x00007f8073273000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8073060000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8072e30000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8072a60000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8072750000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8072430000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8072210000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8073800000)

md5sum for this is:

$ md5sum /usr/local/lib/python2.7/dist-packages/zmq/backend/cython/../../.libs/libzmq-feeff037.so.5.0.1
cdcd394e58afa01a7c9981ac9cc90c97  /usr/local/lib/python2.7/dist-packages/zmq/backend/cython/../../.libs/libzmq-feeff037.so.5.0.1

But I do have the correct version of libzmq3:

$ dpkg -l libzmq3
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                 Version                 Architecture            Description
+++-====================================-=======================-=======================-==============================================================================
ii  libzmq3:amd64                        4.0.4+dfsg-2wsl1        amd64                   lightweight messaging kernel (shared library)

Can anyone help me understand what's going on?

yasirs commented Jul 31, 2016

It's not working for me.

I tried finding my zmq directory like this:

$ find /usr $HOME -type d -name zmq
/usr/lib/python2.7/dist-packages/IPython/kernel/zmq
/usr/local/lib/python2.7/dist-packages/zmq

There is no directory such as /usr/lib/python2.7/dist-packages/zmq

On the other hand:

$ ldd /usr/local/lib/python2.7/dist-packages/zmq/backend/cython/utils.so
        linux-vdso.so.1 =>  (0x00007fffc4f64000)
        libzmq-feeff037.so.5.0.1 => /usr/local/lib/python2.7/dist-packages/zmq/backend/cython/../../.libs/libzmq-feeff037.so.5.0.1 (0x00007f8073273000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f8073060000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8072e30000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8072a60000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f8072750000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f8072430000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f8072210000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8073800000)

md5sum for this is:

$ md5sum /usr/local/lib/python2.7/dist-packages/zmq/backend/cython/../../.libs/libzmq-feeff037.so.5.0.1
cdcd394e58afa01a7c9981ac9cc90c97  /usr/local/lib/python2.7/dist-packages/zmq/backend/cython/../../.libs/libzmq-feeff037.so.5.0.1

But I do have the correct version of libzmq3:

$ dpkg -l libzmq3
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                 Version                 Architecture            Description
+++-====================================-=======================-=======================-==============================================================================
ii  libzmq3:amd64                        4.0.4+dfsg-2wsl1        amd64                   lightweight messaging kernel (shared library)

Can anyone help me understand what's going on?

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Jul 31, 2016

Contributor

@yasirs -- you are not using the Ubuntu version of python-zmq. How did you install it?

Contributor

aseering commented Jul 31, 2016

@yasirs -- you are not using the Ubuntu version of python-zmq. How did you install it?

@JimSEOW

This comment has been minimized.

Show comment
Hide comment
@JimSEOW

JimSEOW Oct 18, 2016

In @benhillis case:
Invalid argument (src/tcp_address.cpp:172)
In my case:
Invalid argument (src/tcp_address.cpp:190)

Is this related to Bash on Windows? Any suggestion?

@Carmezim
Yes, it is a clean bash installation. Do you have stable Juypter running on bash on Window? If so, I would try again, before moving to Hyper-V Ubuntu.

JimSEOW commented Oct 18, 2016

In @benhillis case:
Invalid argument (src/tcp_address.cpp:172)
In my case:
Invalid argument (src/tcp_address.cpp:190)

Is this related to Bash on Windows? Any suggestion?

@Carmezim
Yes, it is a clean bash installation. Do you have stable Juypter running on bash on Window? If so, I would try again, before moving to Hyper-V Ubuntu.

@Carmezim

This comment has been minimized.

Show comment
Hide comment
@Carmezim

Carmezim Oct 18, 2016

@JimSEOW Yes, I had problems to get it working at first but after a fresh installation and following some instructions above it worked normally.

Carmezim commented Oct 18, 2016

@JimSEOW Yes, I had problems to get it working at first but after a fresh installation and following some instructions above it worked normally.

@jackchammons jackchammons added the python label Oct 24, 2016

@thwump

This comment has been minimized.

Show comment
Hide comment
@thwump

thwump Nov 9, 2016

@Yangff (or others that can help): I don't know what to do with the modified libzmq3 files you uploaded. I tried installing them using sudo dpkg -i filename and then sudo apt-get install -f afterwards, but it didn't seem to work.

How should this library get installed?

thwump commented Nov 9, 2016

@Yangff (or others that can help): I don't know what to do with the modified libzmq3 files you uploaded. I tried installing them using sudo dpkg -i filename and then sudo apt-get install -f afterwards, but it didn't seem to work.

How should this library get installed?

@Yangff

This comment has been minimized.

Show comment
Hide comment
@Yangff

Yangff Nov 10, 2016

@thwump dpkg -i should work.

Have you reinstalled pyzmq after change libzmq?

Yangff commented Nov 10, 2016

@thwump dpkg -i should work.

Have you reinstalled pyzmq after change libzmq?

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Nov 10, 2016

Contributor

For what it's worth, the latest WSL Insider build contains a change that might work around this issue. I'm not at a Windows machine right now but I would be interested to know if the stock libzmq does indeed work now.

Contributor

aseering commented Nov 10, 2016

For what it's worth, the latest WSL Insider build contains a change that might work around this issue. I'm not at a Windows machine right now but I would be interested to know if the stock libzmq does indeed work now.

@phobson

This comment has been minimized.

Show comment
Hide comment
@phobson

phobson Nov 10, 2016

@aseering forgive my ignorance. how does one update to the latest build? (I presume it takes more than just sudo apt-get update && sudo apt-get upgrade --yes)

phobson commented Nov 10, 2016

@aseering forgive my ignorance. how does one update to the latest build? (I presume it takes more than just sudo apt-get update && sudo apt-get upgrade --yes)

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Nov 10, 2016

Contributor

@phobson -- I'm guessing based on your question that you're running the standard stable version of Windows, and are not part of the Insider program? You can learn more about the program here:

https://insider.windows.com/

It's easy (and free) to join. Once you join, updates will automatically appear through Windows Update. But you can't selectively update (you can't just upgrade WSL, for example); you're opting in to receive a pre-release version of all of Windows. This new version contains new features; also new bugs :-)

Features added to the Insider releases eventually make it into the next major Windows release. So, if you don't choose to join the Insider program, you'll get the new features when the next major Windows version ships, probably some number of months from now.

Contributor

aseering commented Nov 10, 2016

@phobson -- I'm guessing based on your question that you're running the standard stable version of Windows, and are not part of the Insider program? You can learn more about the program here:

https://insider.windows.com/

It's easy (and free) to join. Once you join, updates will automatically appear through Windows Update. But you can't selectively update (you can't just upgrade WSL, for example); you're opting in to receive a pre-release version of all of Windows. This new version contains new features; also new bugs :-)

Features added to the Insider releases eventually make it into the next major Windows release. So, if you don't choose to join the Insider program, you'll get the new features when the next major Windows version ships, probably some number of months from now.

@arthurhjorth

This comment has been minimized.

Show comment
Hide comment
@arthurhjorth

arthurhjorth Dec 12, 2016

It works for me, but I need to run all pip install or pip3 install with sudo -H flag so that everything installs in the home directory. I do not use the -H flag when installing things with apt-get. I don't know enough about all this stuff to make sense of why, but doing that makes everything run "out of the box" for me!

(If anyone understands why this would work and can spare the time to explain it or point to a good resource on it, I would love to learn. I've googled around and read stuff online but still can't put together a coherent explanation in my head.)

It works for me, but I need to run all pip install or pip3 install with sudo -H flag so that everything installs in the home directory. I do not use the -H flag when installing things with apt-get. I don't know enough about all this stuff to make sense of why, but doing that makes everything run "out of the box" for me!

(If anyone understands why this would work and can spare the time to explain it or point to a good resource on it, I would love to learn. I've googled around and read stuff online but still can't put together a coherent explanation in my head.)

@jackchammons jackchammons added the bug label Dec 13, 2016

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Dec 13, 2016

Contributor

Hi @arthurhjorth -- what arguments are you running pip with?

sudo -H will not, by itself, cause things to be installed to your home directory. sudo (by default) runs commands as the root user rather than as your normal user account; root has elevated privileges to install things systemwide. sudo -H says, even though you're running as the root user, set the $HOME environment variable to point at your regular user's home directory. This affects programs that try to write to "the current user's home directory".

apt-get always installs software systemwide. (It's the Ubuntu package manager; it installs packages for your Ubuntu system.) Therefore, by default it must be run as root, and the value of the $HOME environment variable (and therefore the -H flag to sudo) doesn't affect it.

pip (and pip3) can install either systemwide or just for your current user account. By default, it decides where to install based on whether you run pip with the --user flag: With that flag, it will install to your home directory; without that flag, it will install systemwide. If you install systemwide, by default it will need to run as root. If you install to your home directory, you should not need to install as root -- this is very useful for users on shared machines who don't have sudo access.

There are a few weird edge cases to consider:

  • If you run sudo pip install --user <some package>: sudo means "run the following command as root". pip install --user means "install to the current user's home directory. But the current user is root. So this will install the package to root's home directory, and it will only be available if you run as root. Which is probably not useful, unless you really know what you are doing.
  • If you run sudo -H pip install --user <some package>: This is the same as above, except, you're telling pip that root's home directory is your current directory. That's actually bad: It means that pip will install the package to your home directory, but your user's package repository will be corrupted / updated to be owned by root. By default, this means that you can run packages, but the next time you try to install using pip without sudo, you won't be allowed to do so. You can fix this by running sudo chown -R $USER ~/.local.
  • What happens if you install via both apt-get and pip? Some packages will conflict. In this case, apt-get, which is a general-purpose package manager and has only a minimal understanding of Python in particular, will simply error out and say (I'm paraphrasing here) "go fix your package!" pip is a little more clever; it will try to resolve the dependency in favor of whatever version it is installing. However, most packages won't conflict. This is because Python has a "search path": When you go to import a package in a Python script, first, Python checks for packages installed to your user account's home directory (where pip install --user puts them): $HOME/.local/lib/python2.7. If it doesn't find a package there, next it looks in /usr/local/lib/python2.7 (or similar for Python 3), which is where sudo pip install puts them. If it still doesn't find the package, then it looks in /usr/lib/python2.7, which is where apt-get installs its packages. If it still doesn't find the package, only then does it error out. So if you install a package multiple times using different tools or commands, Python will pick whichever it sees first. This can cause a lot of confusion -- for example, if you install using pip, then you decide you want the official Ubuntu version so you install using apt-get, you'll keep getting the pip version because it's first in the search path. Also, if you have a broken version of a package early in the search path that won't uninstall for whatever reason, installing a correct package may not fix it if the correct one is installed later in the search path.

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 root access to install Python packages systemwide.

Contributor

aseering commented Dec 13, 2016

Hi @arthurhjorth -- what arguments are you running pip with?

sudo -H will not, by itself, cause things to be installed to your home directory. sudo (by default) runs commands as the root user rather than as your normal user account; root has elevated privileges to install things systemwide. sudo -H says, even though you're running as the root user, set the $HOME environment variable to point at your regular user's home directory. This affects programs that try to write to "the current user's home directory".

apt-get always installs software systemwide. (It's the Ubuntu package manager; it installs packages for your Ubuntu system.) Therefore, by default it must be run as root, and the value of the $HOME environment variable (and therefore the -H flag to sudo) doesn't affect it.

pip (and pip3) can install either systemwide or just for your current user account. By default, it decides where to install based on whether you run pip with the --user flag: With that flag, it will install to your home directory; without that flag, it will install systemwide. If you install systemwide, by default it will need to run as root. If you install to your home directory, you should not need to install as root -- this is very useful for users on shared machines who don't have sudo access.

There are a few weird edge cases to consider:

  • If you run sudo pip install --user <some package>: sudo means "run the following command as root". pip install --user means "install to the current user's home directory. But the current user is root. So this will install the package to root's home directory, and it will only be available if you run as root. Which is probably not useful, unless you really know what you are doing.
  • If you run sudo -H pip install --user <some package>: This is the same as above, except, you're telling pip that root's home directory is your current directory. That's actually bad: It means that pip will install the package to your home directory, but your user's package repository will be corrupted / updated to be owned by root. By default, this means that you can run packages, but the next time you try to install using pip without sudo, you won't be allowed to do so. You can fix this by running sudo chown -R $USER ~/.local.
  • What happens if you install via both apt-get and pip? Some packages will conflict. In this case, apt-get, which is a general-purpose package manager and has only a minimal understanding of Python in particular, will simply error out and say (I'm paraphrasing here) "go fix your package!" pip is a little more clever; it will try to resolve the dependency in favor of whatever version it is installing. However, most packages won't conflict. This is because Python has a "search path": When you go to import a package in a Python script, first, Python checks for packages installed to your user account's home directory (where pip install --user puts them): $HOME/.local/lib/python2.7. If it doesn't find a package there, next it looks in /usr/local/lib/python2.7 (or similar for Python 3), which is where sudo pip install puts them. If it still doesn't find the package, then it looks in /usr/lib/python2.7, which is where apt-get installs its packages. If it still doesn't find the package, only then does it error out. So if you install a package multiple times using different tools or commands, Python will pick whichever it sees first. This can cause a lot of confusion -- for example, if you install using pip, then you decide you want the official Ubuntu version so you install using apt-get, you'll keep getting the pip version because it's first in the search path. Also, if you have a broken version of a package early in the search path that won't uninstall for whatever reason, installing a correct package may not fix it if the correct one is installed later in the search path.

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 root access to install Python packages systemwide.

@gencee

This comment has been minimized.

Show comment
Hide comment
@gencee

gencee Dec 21, 2016

@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!

gencee commented Dec 21, 2016

@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!

@spoonsso

This comment has been minimized.

Show comment
Hide comment
@spoonsso

spoonsso Dec 21, 2016

Sorry, found some issues with the above. Try:
conda install -c jzuhone zeromq=4.1.dev0
instead

Aye, also just saved by @jzuhone. For anyone working from an anaconda install, his package totally works. Thanks!

spoonsso commented Dec 21, 2016

Sorry, found some issues with the above. Try:
conda install -c jzuhone zeromq=4.1.dev0
instead

Aye, also just saved by @jzuhone. For anyone working from an anaconda install, his package totally works. Thanks!

@jzuhone

This comment has been minimized.

Show comment
Hide comment
@jzuhone

jzuhone Dec 21, 2016

Hi @gencee and @spoonsso,

Thanks for the appreciation--but my package should be totally unnecessary now if you update to the latest Windows 10 Fast Ring update, as Microsoft has fixed the underlying issue.

jzuhone commented Dec 21, 2016

Hi @gencee and @spoonsso,

Thanks for the appreciation--but my package should be totally unnecessary now if you update to the latest Windows 10 Fast Ring update, as Microsoft has fixed the underlying issue.

@fedorzh

This comment has been minimized.

Show comment
Hide comment
@fedorzh

fedorzh Jan 18, 2017

Hey, @aseering I'm getting
E: Unable to locate package libzmq3
for some reason. Is it because I use Ubuntu 16.04?
W: The repository 'http://ppa.launchpad.net/aseering/wsl/ubuntu xenial Release' does not have a Release file.
Any ideas?

fedorzh commented Jan 18, 2017

Hey, @aseering I'm getting
E: Unable to locate package libzmq3
for some reason. Is it because I use Ubuntu 16.04?
W: The repository 'http://ppa.launchpad.net/aseering/wsl/ubuntu xenial Release' does not have a Release file.
Any ideas?

@fedorzh

This comment has been minimized.

Show comment
Hide comment
@fedorzh

fedorzh Jan 18, 2017

I reinstalled 14.04 from scratch, but still getting
Invalid argument (bundled/zeromq/src/tcp_address.cpp:199)
after using fix from @aseering

fedorzh commented Jan 18, 2017

I reinstalled 14.04 from scratch, but still getting
Invalid argument (bundled/zeromq/src/tcp_address.cpp:199)
after using fix from @aseering

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Jan 18, 2017

Contributor

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 sudo apt-get install ipython-notebook. If you have ever installed it any other way, you must fully uninstall it (which can sometimes be tricky), then add my repository, then reinstall it via apt-get.

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.

Contributor

aseering commented Jan 18, 2017

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 sudo apt-get install ipython-notebook. If you have ever installed it any other way, you must fully uninstall it (which can sometimes be tricky), then add my repository, then reinstall it via apt-get.

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.

@fedorzh

This comment has been minimized.

Show comment
Hide comment
@fedorzh

fedorzh Jan 18, 2017

@aseering
Yes, I tried to upgrade to 16.04 to see if it helps with other issues, but it only becomes more unstable, so decided to go back to 14.04. I can't move to Insider builds unfortunately due to company policy

I install jupyter with
sudo pip3 install jupyter.
Would it work if you provide host to get, compile your fix manually, and install the compiled version (in this case could you please provide some direction)?

fedorzh commented Jan 18, 2017

@aseering
Yes, I tried to upgrade to 16.04 to see if it helps with other issues, but it only becomes more unstable, so decided to go back to 14.04. I can't move to Insider builds unfortunately due to company policy

I install jupyter with
sudo pip3 install jupyter.
Would it work if you provide host to get, compile your fix manually, and install the compiled version (in this case could you please provide some direction)?

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Jan 18, 2017

Contributor

@fedorzh -- hm... You could try installing the libzmq-dev package through apt-get; then uninstalling jupyter through pip and reinstalling it as sudo pip3 install --no-binary :all: jupyter. I may have the syntax wrong -- basically, you want to force pip to compile jupyter notebook from source, rather than using pip's precompiled binary. I believe its build scripts will notice that your system already has libzmq, and will use the (fixed) system version rather than the (broken) version bundled in pip's upstream repository.

Contributor

aseering commented Jan 18, 2017

@fedorzh -- hm... You could try installing the libzmq-dev package through apt-get; then uninstalling jupyter through pip and reinstalling it as sudo pip3 install --no-binary :all: jupyter. I may have the syntax wrong -- basically, you want to force pip to compile jupyter notebook from source, rather than using pip's precompiled binary. I believe its build scripts will notice that your system already has libzmq, and will use the (fixed) system version rather than the (broken) version bundled in pip's upstream repository.

@aseering

This comment has been minimized.

Show comment
Hide comment
@aseering

aseering Jan 18, 2017

Contributor

Also -- if you're installing anything from source on Ubuntu (including the command that I recommended above), first you want to run sudo apt-get install build-essential. It installs a compiler and a bunch of standard build tools that are usually needed to build things from source.

Contributor

aseering commented Jan 18, 2017

Also -- if you're installing anything from source on Ubuntu (including the command that I recommended above), first you want to run sudo apt-get install build-essential. It installs a compiler and a bunch of standard build tools that are usually needed to build things from source.

@nimasasa

This comment has been minimized.

Show comment
Hide comment
@nimasasa

nimasasa Jan 23, 2017

Hi,
Does anybody know how we can use matplotlib (inline) on Jupyter? My kernel dies when I am using this package. I have also tried Xming and it didn't work.

Nima

Hi,
Does anybody know how we can use matplotlib (inline) on Jupyter? My kernel dies when I am using this package. I have also tried Xming and it didn't work.

Nima

@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Jan 23, 2017

Member

@nimasasa - Thanks for your post.

My kernel dies...

Which kernel are you referring to? Is your setup on native Linux or WSL/bash?

Member

sunilmut commented Jan 23, 2017

@nimasasa - Thanks for your post.

My kernel dies...

Which kernel are you referring to? Is your setup on native Linux or WSL/bash?

@nimasasa

This comment has been minimized.

Show comment
Hide comment
@nimasasa

nimasasa Jan 23, 2017

@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.

@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.

@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Jan 23, 2017

Member

@nimasasa - Thanks for confirming. I was worried that you might be referring to Windows kernel dying :). I would recommend starting a new issue/post for this, using the template. A strace would be useful too.

Member

sunilmut commented Jan 23, 2017

@nimasasa - Thanks for confirming. I was worried that you might be referring to Windows kernel dying :). I would recommend starting a new issue/post for this, using the template. A strace would be useful too.

@ggada

This comment has been minimized.

Show comment
Hide comment
@ggada

ggada Apr 17, 2017

Thanks @jzuhone!

conda install -c jzuhone zeromq=dev fixed this for me. The apt-get one didn't work probably because I am using conda environment.

Not going for the fast ring because I've faced BSOD's before.. ;)

ggada commented Apr 17, 2017

Thanks @jzuhone!

conda install -c jzuhone zeromq=dev fixed this for me. The apt-get one didn't work probably because I am using conda environment.

Not going for the fast ring because I've faced BSOD's before.. ;)

@ericweijieli

This comment has been minimized.

Show comment
Hide comment
@ericweijieli

ericweijieli Jun 29, 2017

Thanks @jzuhone!
→ conda install -c jzuhone zeromq=4.1.dev0 works for me!

Thanks @jzuhone!
→ conda install -c jzuhone zeromq=4.1.dev0 works for me!

@ahsteven

This comment has been minimized.

Show comment
Hide comment
@ahsteven

ahsteven Dec 20, 2017

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.

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.

@Yangff

This comment has been minimized.

Show comment
Hide comment
@Yangff

Yangff Dec 20, 2017

@ahsteven it's impossible to run tensorflow with gpu on WSL.

Yangff commented Dec 20, 2017

@ahsteven it's impossible to run tensorflow with gpu on WSL.

@DarthSpock

This comment has been minimized.

Show comment
Hide comment
@DarthSpock

DarthSpock Dec 20, 2017

@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.

DarthSpock commented Dec 20, 2017

@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.

@ahsteven

This comment has been minimized.

Show comment
Hide comment
@ahsteven

ahsteven Dec 20, 2017

@phobson

This comment has been minimized.

Show comment
Hide comment
@phobson

phobson Jan 10, 2018

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 commented Jan 10, 2018

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
@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Jan 11, 2018

Member

@phobson - Can you clarify what you mean by Kilss the kernel.? Are you getting a blue (or green) screen of death? i.e. Is your Windows crashing? If so, can you please follow the instructions for BSOD here?

Also, which version of Windows are you running. From your WSL bash prompt, output of cmd.exe /c ver

Member

sunilmut commented Jan 11, 2018

@phobson - Can you clarify what you mean by Kilss the kernel.? Are you getting a blue (or green) screen of death? i.e. Is your Windows crashing? If so, can you please follow the instructions for BSOD here?

Also, which version of Windows are you running. From your WSL bash prompt, output of cmd.exe /c ver

@phobson

This comment has been minimized.

Show comment
Hide comment
@phobson

phobson Jan 12, 2018

@sunilmut

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 lxrun and and it worked!

🤷‍♂️

phobson commented Jan 12, 2018

@sunilmut

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 lxrun and and it worked!

🤷‍♂️

@sunilmut

This comment has been minimized.

Show comment
Hide comment
@sunilmut

sunilmut Jan 12, 2018

Member

@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.

Member

sunilmut commented Jan 12, 2018

@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.

@therealkenc

This comment has been minimized.

Show comment
Hide comment
@therealkenc

therealkenc Mar 24, 2018

Collaborator

The OP here was:

Invalid argument (bundled/zeromq/src/tcp_address.cpp:171)

Which was:

    //  Get the addresses.
    ifaddrs *ifa = NULL;
    const int rc = getifaddrs (&ifa);
    errno_assert (rc == 0);
    zmq_assert (ifa != NULL);

Which is #308 addressed in 15007 and Creators Update 15063.

Collaborator

therealkenc commented Mar 24, 2018

The OP here was:

Invalid argument (bundled/zeromq/src/tcp_address.cpp:171)

Which was:

    //  Get the addresses.
    ifaddrs *ifa = NULL;
    const int rc = getifaddrs (&ifa);
    errno_assert (rc == 0);
    zmq_assert (ifa != NULL);

Which is #308 addressed in 15007 and Creators Update 15063.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment