Skip to content

Instantly share code, notes, and snippets.

@ianpreston
Created September 19, 2015 21:39
Show Gist options
  • Save ianpreston/01aad6ed453c75666eda to your computer and use it in GitHub Desktop.
Save ianpreston/01aad6ed453c75666eda to your computer and use it in GitHub Desktop.
Jupyter configuration for gevent
{
"display_name": "IPython 2 w/gevent",
"language": "python",
"argv": [
"python",
"-c", "from gevent.monkey import patch_all; patch_all(thread=False); from IPython.kernel.zmq.kernelapp import main; main()",
"-f",
"{connection_file}"
]
}
@fjania
Copy link

fjania commented Feb 4, 2016

Thanks! I implemented this in Jupyter, and got a deprecation warning:

...lib/python2.7/site-packages/IPython/kernel/__init__.py:13: ShimWarning: The `IPython.kernel` package has been deprecated. You should import from ipykernel or jupyter_client instead.
  "You should import from ipykernel or jupyter_client instead.", ShimWarning)

I used this updated version for my installation:

{
 "display_name": "IPython 2 w/gevent",
 "language": "python",
 "argv": [
  "python",
  "-c", "from gevent.monkey import patch_all; patch_all(thread=False); from ipykernel.kernelapp import main; main()",
  "-f",
  "{connection_file}"
 ]
}

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