ipython kernel does not respond

1,131 views
Skip to first unread message

didier voisin

unread,
Dec 29, 2015, 6:52:12 PM12/29/15
to Project Jupyter
Hi everybody,

I recently installed anaconda (2.4.1) on my macos (10.9) with the intention to work on the ipython (4.0.1) notebook (4.0.6).

alas, it keeps failing

when I launch it through "ipython notebook" or through "jupyter notebook" (jupyter package is 1.0.0), It correctly opens in the browser, but when I try to open a new notebook, I keep getting a "kernel died, automatically restarting" warning, it finally, the kernel just refuses to start.

checking in my terminal window, I can trace this:

[TerminalIPythonApp] CRITICAL | Bad config encountered during initialization:
[TerminalIPythonApp] CRITICAL | Unrecognized flag: '-f'

I get the very same behavior if I try launching "ipython qtconsole" or "ipython console" (qtconsole package is 4.1.1, if that's related)

yet, things work properly if I use ipython directly or through spyder (package 2.3.8).

I am quite new to this, but as the error seemed linked to kernel initiation, I went to look at what I think defines the kernel, i.e. the kernel.json file in ~/Library/Jupyter/kernels/python3/
which reads:

{
 "display_name": "Python 3",
 "language": "python",
 "argv": [
  "/Users/dvoisin/anaconda/bin/ipython3",
  "-m",
  "ipykernel",
  "-f",
  "{connection_file}"
 ]
}

if anyone can suggest me a way to get the notebook back, I would be really happy

thanks for your help

dda


MinRK

unread,
Dec 30, 2015, 5:21:08 AM12/30/15
to jup...@googlegroups.com

What do you see from conda list? My first guess is that the ‘unrecognized flag’ error is being caused by the connection_file being an empty string. I’m not sure how that would happen, though.

-MinRK


--
You received this message because you are subscribed to the Google Groups "Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+u...@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/56169c5c-71d6-4342-9fdf-5e88283d750e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

didier voisin

unread,
Dec 30, 2015, 7:19:29 AM12/30/15
to Project Jupyter
Hello MinRK,

here is what I get from conda list:

_license                  1.1                      py35_1    defaults
abstract-rendering        0.5.1               np110py35_0    defaults
alabaster                 0.7.6                    py35_0    defaults
anaconda                  2.4.1               np110py35_0    defaults
anaconda-client           1.2.1                    py35_0    defaults
appnope                   0.1.0                    py35_0    defaults
appscript                 1.0.1                    py35_0    defaults
argcomplete               1.0.0                    py35_1    defaults
astropy                   1.0.6               np110py35_0    defaults
babel                     2.1.1                    py35_0    defaults
beautifulsoup4            4.4.1                    py35_0    defaults
bitarray                  0.8.1                    py35_0    defaults
blaze                     0.8.3                     <pip>
blaze-core                0.8.3                    py35_0    defaults
bokeh                     0.10.0                   py35_0    defaults
boto                      2.38.0                   py35_0    defaults
bottleneck                1.0.0               np110py35_0    defaults
cffi                      1.2.1                    py35_0    defaults
clyent                    1.2.0                    py35_0    defaults
colorama                  0.3.3                    py35_0    defaults
conda                     3.18.8                   py35_0    defaults
conda-build               1.18.2                   py35_0    defaults
conda-env                 2.4.5                    py35_0    defaults
configobj                 5.0.6                    py35_0    defaults
cryptography              1.0.2                    py35_0    defaults
curl                      7.45.0                        0    defaults
cycler                    0.9.0                    py35_0    defaults
cython                    0.23.4                   py35_1    defaults
cytoolz                   0.7.4                    py35_0    defaults
datashape                 0.4.7               np110py35_1    defaults
decorator                 4.0.4                    py35_0    defaults
docutils                  0.12                     py35_0    defaults
dynd                      9b63882                   <pip>
dynd-python               0.7.0                    py35_0    defaults
fastcache                 1.0.2                    py35_0    defaults
flask                     0.10.1                   py35_1    defaults
freetype                  2.5.5                         0    defaults
greenlet                  0.4.9                    py35_0    defaults
h5py                      2.5.0               np110py35_4    defaults
hdf5                      1.8.15.1                      2    defaults
idna                      2.0                      py35_0    defaults
ipykernel                 4.1.1                    py35_0    defaults
ipython                   4.0.1                    py35_0    defaults
ipython-genutils          0.1.0                     <pip>
ipython-notebook          4.0.4                    py35_0    defaults
ipython-qtconsole         4.0.1                    py35_0    defaults
ipython_genutils          0.1.0                    py35_0    defaults
ipywidgets                4.1.0                    py35_0    defaults
itsdangerous              0.24                     py35_0    defaults
jbig                      2.1                           0    defaults
jdcal                     1.0                      py35_0    defaults
jedi                      0.9.0                    py35_0    defaults
jinja2                    2.8                      py35_0    defaults
jpeg                      8d                            1    defaults
jsonschema                2.4.0                    py35_0    defaults
jupyter                   1.0.0                    py35_1    defaults
jupyter-client            4.1.1                     <pip>
jupyter-console           4.0.3                     <pip>
jupyter-core              4.0.6                     <pip>
jupyter_client            4.1.1                    py35_0    defaults
jupyter_console           4.0.3                    py35_0    defaults
jupyter_core              4.0.6                    py35_0    defaults
launcher                  1.0.0                         3    defaults
libdynd                   0.7.0                         0    defaults
libpng                    1.6.17                        0    defaults
libtiff                   4.0.6                         1    defaults
libxml2                   2.9.2                         0    defaults
libxslt                   1.1.28                        2    defaults
llvmlite                  0.8.0                    py35_0    defaults
lxml                      3.4.4                    py35_0    defaults
markupsafe                0.23                     py35_0    defaults
matplotlib                1.5.0               np110py35_0    defaults
mistune                   0.7.1                    py35_0    defaults
multipledispatch          0.4.8                    py35_0    defaults
nbconvert                 4.0.0                    py35_0    defaults
nbformat                  4.0.1                    py35_0    defaults
networkx                  1.10                     py35_0    defaults
nltk                      3.1                      py35_0    defaults
node-webkit               0.10.1                        0    defaults
nose                      1.3.7                    py35_0    defaults
notebook                  4.0.6                    py35_0    defaults
numba                     0.22.1              np110py35_0    defaults
numexpr                   2.4.4               np110py35_0    defaults
numpy                     1.10.1                   py35_0    defaults
odo                       0.3.4                    py35_0    defaults
openpyxl                  2.2.6                    py35_0    defaults
openssl                   1.0.2d                        0    defaults
pandas                    0.17.1              np110py35_0    defaults
path.py                   8.1.2                    py35_1    defaults
patsy                     0.4.0               np110py35_0    defaults
pep8                      1.6.2                    py35_0    defaults
pexpect                   3.3                      py35_0    defaults
pickleshare               0.5                      py35_0    defaults
pillow                    3.0.0                    py35_1    defaults
pip                       7.1.2                    py35_0    defaults
ply                       3.8                      py35_0    defaults
psutil                    3.3.0                    py35_0    defaults
ptyprocess                0.5                      py35_0    defaults
py                        1.4.30                   py35_0    defaults
pyasn1                    0.1.9                    py35_0    defaults
pycosat                   0.6.1                    py35_0    defaults
pycparser                 2.14                     py35_0    defaults
pycrypto                  2.6.1                    py35_0    defaults
pycurl                    7.19.5.1                 py35_3    defaults
pyflakes                  1.0.0                    py35_0    defaults
pygments                  2.0.2                    py35_0    defaults
pyopenssl                 0.15.1                   py35_1    defaults
pyparsing                 2.0.3                    py35_0    defaults
pyqt                      4.11.4                   py35_1    defaults
pytables                  3.2.2               np110py35_0    defaults
pytest                    2.8.1                    py35_0    defaults
python                    3.5.1                         0    defaults
python-dateutil           2.4.2                    py35_0    defaults
python.app                1.2                      py35_4    defaults
pytz                      2015.7                   py35_0    defaults
pyyaml                    3.11                     py35_1    defaults
pyzmq                     14.7.0                   py35_1    defaults
qt                        4.8.7                         1    defaults
qtconsole                 4.1.1                    py35_0    defaults
readline                  6.2                           2    defaults
redis                     2.6.9                         0    defaults
redis-py                  2.10.3                   py35_0    defaults
requests                  2.8.1                    py35_0    defaults
rope                      0.9.4                    py35_1    defaults
rope-py3k-0.9.4           1                         <pip>
scikit-image              0.11.3              np110py35_0    defaults
scikit-learn              0.17                np110py35_1    defaults
scipy                     0.16.0              np110py35_1    defaults
setuptools                18.5                     py35_0    defaults
simplegeneric             0.8.1                    py35_0    defaults
sip                       4.16.9                   py35_0    defaults
six                       1.10.0                   py35_0    defaults
snowballstemmer           1.2.0                    py35_0    defaults
sockjs-tornado            1.0.1                    py35_0    defaults
sphinx                    1.3.1                    py35_0    defaults
sphinx-rtd-theme          0.1.7                     <pip>
sphinx_rtd_theme          0.1.7                    py35_0    defaults
spyder                    2.3.8                    py35_0    defaults
spyder-app                2.3.8                    py35_0    defaults
sqlalchemy                1.0.9                    py35_0    defaults
sqlite                    3.8.4.1                       1    defaults
statsmodels               0.6.1               np110py35_0    defaults
sympy                     0.7.6.1                  py35_0    defaults
tables                    3.2.2                     <pip>
terminado                 0.5                      py35_1    defaults
tk                        8.5.18                        0    defaults
toolz                     0.7.4                    py35_0    defaults
tornado                   4.3                      py35_0    defaults
traitlets                 4.0.0                    py35_0    defaults
ujson                     1.33                     py35_0    defaults
unicodecsv                0.14.1                   py35_0    defaults
werkzeug                  0.11.2                   py35_0    defaults
wheel                     0.26.0                   py35_1    defaults
xlrd                      0.9.4                    py35_0    defaults
xlsxwriter                0.7.7                    py35_0    defaults
xlwings                   0.5.0                    py35_0    defaults
xlwt                      1.0.0                    py35_0    defaults
xz                        5.0.5                         0    defaults
yaml                      0.1.6                         0    defaults
zeromq                    4.1.3                         0    defaults
zlib                      1.2.8                         0    defaults

basically the entire anaconda install

meanwhile, I installed R and Julia kernels, trying to see if the problem came from the kernel, jupyter, or the link in between.
both kernels work fine, and look pretty much like the faulty one to me (same {connection_file} looking empty):

{
  "display_name": "Julia 0.4.2",
  "argv": [
    "/Applications/Julia-0.4.2.app/Contents/Resources/julia/bin/julia",
    "-i",
    "-F",
    "/Users/dvoisin/.julia/v0.4/IJulia/src/kernel.jl",
    "{connection_file}"
  ],
  "language": "julia"
}

{
  "argv": ["/Library/Frameworks/R.framework/Resources/bin/R", "--slave", "-e", "IRkernel::main()", "--args", "{connection_file}"],
  "display_name": "R",
  "language": "R"
}

dda

didier voisin

unread,
Dec 30, 2015, 9:23:04 AM12/30/15
to Project Jupyter
Problem somewhat solved !!!

do not ask me why, but just deleting the python3 directory in ~/Library/Jupyter/kernels and recreating it through

ipython kernel install --user

did the trick

now my kernel defintion looks like :

{
 "display_name": "Python 3",
 "argv": [
  "/Users/dvoisin/anaconda/envs/safe/bin/python",

  "-m",
  "ipykernel",
  "-f",
  "{connection_file}"
 ],
 "language": "python"
}

admittedly, it is now a python3 kernel (and not an ipython3 kernel), but it will certainly do for some time

I guess I'll bump into some issues later on, but that should suffice for now

dda
Reply all
Reply to author
Forward
0 new messages