Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix No module named jupyter_client.kernelspecapp error #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gwtaylor
Copy link

When Python 2 conda environment is created, it pulls the most recent IPython (currently 4.0.0)
The project seems to be in flux right now between IPython/Jupyter and referring to the old way of registering the Python 2 kernel generates an error and prevents the build. Complete error message below.

The line that generates the error is this:
https://github.com/rothnic/anaconda-notebook/blob/c45256491fee3f0995e022b1dc96f4f467b14972/Dockerfile#L40-41

Explicitly installing IPython 3 at least makes the image able to build-- a quick fix.

A better solution is likely to upgrade the whole image to install jupyter and its related commands for registering the kernel instead of ipython.

Here's the complete error message:

Step 12 : RUN $PY2PATH/python $PY2PATH/ipython kernelspec install-self
 ---> Running in c4f7d80d376f
Traceback (most recent call last):
  File "/home/condauser/anaconda3/envs/python2/bin/ipython", line 6, in <module>
    sys.exit(start_ipython())
  File "/home/condauser/anaconda3/envs/python2/lib/python2.7/site-packages/IPython/__init__.py", line 118, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/home/condauser/anaconda3/envs/python2/lib/python2.7/site-packages/traitlets/config/application.py", line 591, in launch_instance
    app.initialize(argv)
  File "<string>", line 2, in initialize
  File "/home/condauser/anaconda3/envs/python2/lib/python2.7/site-packages/traitlets/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/condauser/anaconda3/envs/python2/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 305, in initialize
    super(TerminalIPythonApp, self).initialize(argv)
  File "<string>", line 2, in initialize
  File "/home/condauser/anaconda3/envs/python2/lib/python2.7/site-packages/traitlets/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/condauser/anaconda3/envs/python2/lib/python2.7/site-packages/IPython/core/application.py", line 386, in initialize
    self.parse_command_line(argv)
  File "/home/condauser/anaconda3/envs/python2/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 300, in parse_command_line
    return super(TerminalIPythonApp, self).parse_command_line(argv)
  File "<string>", line 2, in parse_command_line
  File "/home/condauser/anaconda3/envs/python2/lib/python2.7/site-packages/traitlets/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/condauser/anaconda3/envs/python2/lib/python2.7/site-packages/traitlets/config/application.py", line 487, in parse_command_line
    return self.initialize_subcommand(subc, subargv)
  File "<string>", line 2, in initialize_subcommand
  File "/home/condauser/anaconda3/envs/python2/lib/python2.7/site-packages/traitlets/config/application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/condauser/anaconda3/envs/python2/lib/python2.7/site-packages/traitlets/config/application.py", line 418, in initialize_subcommand
    subapp = import_item(subapp)
  File "/home/condauser/anaconda3/envs/python2/lib/python2.7/site-packages/ipython_genutils/importstring.py", line 31, in import_item
    module = __import__(package, fromlist=[obj])
ImportError: No module named jupyter_client.kernelspecapp
The command '/bin/sh -c $PY2PATH/python $PY2PATH/ipython kernelspec install-self' returned a non-zero code: 1

When Python 2 conda environment is created, it pulls the most recent IPython (currently 4.0.0)
The project seems to be in flux right now between IPython/Jupyter and referring to the old way of registering the Python 2 kernel generates an error and prevents the build.

Explicitly installing IPython 3 at least makes the image able to build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant