我正在尝试在RedHat 6.7系统上运行jupyterhub。我可以启动jupyterhub,使用我的浏览器进行身份验证。我也可以选择启动一个新的Python 3笔记本,但我不能在其中执行命令,因为服务器端存在错误。请参阅下面的jupyterhub日志。
我的设置:
任何帮助非常感谢! 迈克M
sudo env "PATH=$PATH" jupyterhub
[I 2015-08-25 17:27:02.796 JupyterHub app:518] Loading cookie_secret from /usr/src/jupyterhub_cookie_secret
[W 2015-08-25 17:27:02.867 JupyterHub app:257]
Generating CONFIGPROXY_AUTH_TOKEN. Restarting the Hub will require restarting the proxy.
Set CONFIGPROXY_AUTH_TOKEN env or JupyterHub.proxy_auth_token config to avoid this message.
[I 2015-08-25 17:27:02.878 JupyterHub app:654] Not using whitelist. Any authenticated user will be allowed.
[I 2015-08-25 17:27:02.900 JupyterHub app:1032] Hub API listening on ...
[I 2015-08-25 17:27:02.916 JupyterHub app:789] Starting proxy @ http://*:8000/
17:27:03.195 - info: [ConfigProxy] Proxying http://*:8000 to ...
17:27:03.201 - info: [ConfigProxy] Proxy API at ...
[I 2015-08-25 17:27:03.254 JupyterHub app:1055] JupyterHub is now running at ...
[I 2015-08-25 17:27:07.775 JupyterHub log:100] 302 GET / (@10.128.0.253) 4.31ms
[I 2015-08-25 17:27:07.781 JupyterHub log:100] 302 GET /hub (@10.128.0.253) 0.56ms
[I 2015-08-25 17:27:07.798 JupyterHub log:100] 302 GET /hub/ (mikem@10.128.0.253) 5.76ms
[I 2015-08-25 17:27:07.856 JupyterHub log:100] 200 GET /hub/home (mikem@10.128.0.253) 48.21ms
[I 2015-08-25 17:27:13.412 JupyterHub login:17] User logged out: mikem
[I 2015-08-25 17:27:13.421 JupyterHub log:100] 302 GET /hub/logout (mikem@10.128.0.253) 8.17ms
[I 2015-08-25 17:27:13.436 JupyterHub log:100] 200 GET /hub/ (@10.128.0.253) 11.13ms
[I 2015-08-25 17:27:21.463 JupyterHub spawner:365] Spawning jupyterhub-singleuser --user=mikem --port=44634 --cookie-name=jupyter-hub-token-mikem --base-url=/user/mikem --hub-prefix=/hub/ --hub-api-url=... --ip=localhost
/usr/local/lib/python3.4/site-packages/IPython/utils/traitlets.py:5: UserWarning: IPython.utils.traitlets has moved to a top-level traitlets package.
warn("IPython.utils.traitlets has moved to a top-level traitlets package.")
/usr/local/lib/python3.4/site-packages/IPython/html.py:14: ShimWarning: The `IPython.html` package has been deprecated. You should import from `notebook` instead. `IPython.html.widgets` has moved to `ipywidgets`.
"`IPython.html.widgets` has moved to `ipywidgets`.", ShimWarning)
[W 2015-08-25 17:27:22.712 mikem notebookapp:252] ipywidgets package not installed. Widgets are unavailable.
[I 2015-08-25 17:27:22.745 mikem notebookapp:1061] Serving notebooks from local directory: /nfshome/mikem
[I 2015-08-25 17:27:22.746 mikem notebookapp:1061] 0 active kernels
[I 2015-08-25 17:27:22.746 mikem notebookapp:1061] The IPython Notebook is running at: ...
[I 2015-08-25 17:27:22.746 mikem notebookapp:1062] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 2015-08-25 17:27:22.871 JupyterHub base:277] User mikem server took 1.523 seconds to start
[I 2015-08-25 17:27:22.872 JupyterHub orm:170] Adding user mikem to proxy /user/mikem => ...
[I 2015-08-25 17:27:22.876 mikem log:47] 302 GET /user/mikem (127.0.0.1) 7.75ms
[I 2015-08-25 17:27:22.896 JupyterHub log:100] 302 POST /hub/login?next= (@10.128.0.253) 3388.59ms
[I 2015-08-25 17:27:22.896 JupyterHub login:76] User logged in: mikem
[I 2015-08-25 17:27:22.913 JupyterHub log:100] 302 GET /hub/ (mikem@10.128.0.253) 6.54ms
[I 2015-08-25 17:27:22.924 mikem log:47] 302 GET /user/mikem (10.128.0.253) 1.56ms
[I 2015-08-25 17:27:22.982 JupyterHub log:100] 200 GET /hub/api/authorizations/cookie/jupyter-hub-token-mikem/[secret] (mikem@127.0.0.1) 15.09ms
[I 2015-08-25 17:27:38.124 mikem handlers:175] Creating new notebook in
[W 2015-08-25 17:27:38.767 mikem log:47] 404 GET /user/mikem/nbextensions/widgets/notebook/js/extension.js?v=20150825172722 (10.128.0.253) 15.28ms referer=...
Untitled2.ipynb?kernel_name=python3
[I 2015-08-25 17:27:39.014 mikem kernelmanager:85] Kernel started: 2ca52dbf-ae67-4f40-b800-fe7f5b73da56
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/usr/local/lib/python3.4/runpy.py in _run_module_as_main(mod_name='ipykernel.__main__', alter_argv=1)
168 sys.argv[0] = mod_spec.origin
169 return _run_code(code, main_globals, None,
--> 170 "__main__", mod_spec)
mod_spec = ModuleSpec(name='ipykernel.__main__', loader=<_frozen_importlib.SourceFileLoader object at 0x7fa8917636a0>, origin='/usr/local/lib/python3.4/site-packages/ipykernel/__main__.py')
171
172 def run_module(mod_name, init_globals=None,
/usr/local/lib/python3.4/runpy.py in _run_code(code=<code object <module> at 0x7fa8917ece40, file "/...3.4/site-packages/ipykernel/__main__.py", line 1>, run_globals={'__builtins__': <module 'builtins' (built-in)>, '__cached__': '/usr/local/lib/python3.4/site-packages/ipykernel/__pycache__/__main__.cpython-34.pyc', '__doc__': None, '__file__': '/usr/local/lib/python3.4/site-packages/ipykernel/__main__.py', '__loader__': <_frozen_importlib.SourceFileLoader object>, '__name__': '__main__', '__package__': 'ipykernel', '__spec__': ModuleSpec(name='ipykernel.__main__', loader=<_f...b/python3.4/site-packages/ipykernel/__main__.py'), 'app': <module 'ipykernel.kernelapp' from '/usr/local/lib/python3.4/site-packages/ipykernel/kernelapp.py'>}, init_globals=None, mod_name='__main__', mod_spec=ModuleSpec(name='ipykernel.__main__', loader=<_f...b/python3.4/site-packages/ipykernel/__main__.py'), pkg_name='ipykernel', script_name=None)
83 __package__ = pkg_name,
84 __spec__ = mod_spec)
---> 85 exec(code, run_globals)
global exec = undefined
code = <code object <module> at 0x7fa8917ece40, file "/usr/local/lib/python3.4/site-packages/ipykernel/__main__.py", line 1>
run_globals = {'__name__': '__main__', '__file__': '/usr/local/lib/python3.4/site-packages/ipykernel/__main__.py', '__cached__': '/usr/local/lib/python3.4/site-packages/ipykernel/__pycache__/__main__.cpython-34.pyc', 'app': <module 'ipykernel.kernelapp' from '/usr/local/lib/python3.4/site-packages/ipykernel/kernelapp.py'>, '__builtins__': <module 'builtins' (built-in)>, '__doc__': None, '__package__': 'ipykernel', '__loader__': <_frozen_importlib.SourceFileLoader object at 0x7fa8917636a0>, '__spec__': ModuleSpec(name='ipykernel.__main__', loader=<_frozen_importlib.SourceFileLoader object at 0x7fa8917636a0>, origin='/usr/local/lib/python3.4/site-packages/ipykernel/__main__.py')}
86 return run_globals
87
/usr/local/lib/python3.4/site-packages/ipykernel/__main__.py in <module>()
1 if __name__ == '__main__':
2 from ipykernel import kernelapp as app
----> 3 app.launch_new_instance()
global app.launch_new_instance = <bound method MetaHasTraits.launch_instance of <class 'ipykernel.kernelapp.IPKernelApp'>>
/usr/local/lib/python3.4/site-packages/traitlets/config/application.py in launch_instance(cls=<class 'ipykernel.kernelapp.IPKernelApp'>, argv=None, **kwargs={})
589 """
590 app = cls.instance(**kwargs)
--> 591 app.initialize(argv)
app.initialize = <bound method IPKernelApp.initialize of <ipykernel.kernelapp.IPKernelApp object at 0x7fa8917635c0>>
argv = None
592 app.start()
593
/usr/local/lib/python3.4/site-packages/ipykernel/kernelapp.py in initialize(self=<ipykernel.kernelapp.IPKernelApp object>, argv=None)
/usr/local/lib/python3.4/site-packages/traitlets/config/application.py in catch_config_error(method=<function IPKernelApp.initialize>, app=<ipykernel.kernelapp.IPKernelApp object>, *args=(None,), **kwargs={})
73 """
74 try:
---> 75 return method(app, *args, **kwargs)
method = <function IPKernelApp.initialize at 0x7fa88b21db70>
app = <ipykernel.kernelapp.IPKernelApp object at 0x7fa8917635c0>
args = (None,)
kwargs = {}
76 except (TraitError, ArgumentError) as e:
77 app.print_help()
/usr/local/lib/python3.4/site-packages/ipykernel/kernelapp.py in initialize(self=<ipykernel.kernelapp.IPKernelApp object>, argv=None)
369 self.init_io()
370 self.init_signal()
--> 371 self.init_kernel()
self.init_kernel = <bound method IPKernelApp.init_kernel of <ipykernel.kernelapp.IPKernelApp object at 0x7fa8917635c0>>
372 # shell init steps
373 self.init_path()
/usr/local/lib/python3.4/site-packages/ipykernel/kernelapp.py in init_kernel(self=<ipykernel.kernelapp.IPKernelApp object>)
312 log=self.log,
313 profile_dir=self.profile_dir,
--> 314 user_ns=self.user_ns,
global user_ns = undefined
self.user_ns = None
315 )
316 kernel.record_ports(self.ports)
/usr/local/lib/python3.4/site-packages/traitlets/config/configurable.py in instance(cls=<class 'ipykernel.ipkernel.IPythonKernel'>, *args=(), **kwargs={'iopub_socket': <zmq.sugar.socket.Socket object>, 'log': <logging.Logger object>, 'parent': <ipykernel.kernelapp.IPKernelApp object>, 'profile_dir': <IPython.core.profiledir.ProfileDir object>, 'session': <jupyter_client.session.Session object>, 'shell_streams': [<zmq.eventloop.zmqstream.ZMQStream object>, <zmq.eventloop.zmqstream.ZMQStream object>], 'stdin_socket': <zmq.sugar.socket.Socket object>, 'user_ns': None})
378 # Create and save the instance
379 if cls._instance is None:
--> 380 inst = cls(*args, **kwargs)
inst = undefined
cls = <class 'ipykernel.ipkernel.IPythonKernel'>
args = ()
kwargs = {'log': <logging.Logger object at 0x7fa891763588>, 'user_ns': None, 'parent': <ipykernel.kernelapp.IPKernelApp object at 0x7fa8917635c0>, 'iopub_socket': <zmq.sugar.socket.Socket object at 0x7fa88b2156a8>, 'stdin_socket': <zmq.sugar.socket.Socket object at 0x7fa88b215708>, 'session': <jupyter_client.session.Session object at 0x7fa88b22d828>, 'profile_dir': <IPython.core.profiledir.ProfileDir object at 0x7fa88b22d470>, 'shell_streams': [<zmq.eventloop.zmqstream.ZMQStream object at 0x7fa88b22da58>, <zmq.eventloop.zmqstream.ZMQStream object at 0x7fa88b22d9e8>]}
381 # Now make sure that the instance will also be returned by
382 # parent classes' _instance attribute.
/usr/local/lib/python3.4/site-packages/ipykernel/ipkernel.py in __init__(self=<ipykernel.ipkernel.IPythonKernel object>, **kwargs={'iopub_socket': <zmq.sugar.socket.Socket object>, 'log': <logging.Logger object>, 'parent': <ipykernel.kernelapp.IPKernelApp object>, 'profile_dir': <IPython.core.profiledir.ProfileDir object>, 'session': <jupyter_client.session.Session object>, 'shell_streams': [<zmq.eventloop.zmqstream.ZMQStream object>, <zmq.eventloop.zmqstream.ZMQStream object>], 'stdin_socket': <zmq.sugar.socket.Socket object>, 'user_ns': None})
45 user_module = self.user_module,
46 user_ns = self.user_ns,
---> 47 kernel = self,
global kernel = undefined
self = <ipykernel.ipkernel.IPythonKernel object at 0x7fa88b22dda0>
48 )
49 self.shell.displayhook.session = self.session
/usr/local/lib/python3.4/site-packages/traitlets/config/configurable.py in instance(cls=<class 'ipykernel.zmqshell.ZMQInteractiveShell'>, *args=(), **kwargs={'kernel': <ipykernel.ipkernel.IPythonKernel object>, 'parent': <ipykernel.ipkernel.IPythonKernel object>, 'profile_dir': <IPython.core.profiledir.ProfileDir object>, 'user_module': None, 'user_ns': None})
378 # Create and save the instance
379 if cls._instance is None:
--> 380 inst = cls(*args, **kwargs)
inst = undefined
cls = <class 'ipykernel.zmqshell.ZMQInteractiveShell'>
args = ()
kwargs = {'user_module': None, 'kernel': <ipykernel.ipkernel.IPythonKernel object at 0x7fa88b22dda0>, 'profile_dir': <IPython.core.profiledir.ProfileDir object at 0x7fa88b22d470>, 'parent': <ipykernel.ipkernel.IPythonKernel object at 0x7fa88b22dda0>, 'user_ns': None}
381 # Now make sure that the instance will also be returned by
382 # parent classes' _instance attribute.
/usr/local/lib/python3.4/site-packages/IPython/core/interactiveshell.py in __init__(self=<ipykernel.zmqshell.ZMQInteractiveShell object>, ipython_dir=None, profile_dir=<IPython.core.profiledir.ProfileDir object>, user_module=None, user_ns=None, custom_exceptions=((), None), **kwargs={'kernel': <ipykernel.ipkernel.IPythonKernel object>, 'parent': <ipykernel.ipkernel.IPythonKernel object>})
552 self.init_data_pub()
553 self.init_displayhook()
--> 554 self.init_magics()
self.init_magics = <bound method ZMQInteractiveShell.init_magics of <ipykernel.zmqshell.ZMQInteractiveShell object at 0x7fa88b22de10>>
555 self.init_alias()
556 self.init_logstart()
/usr/local/lib/python3.4/site-packages/ipykernel/zmqshell.py in init_magics(self=<ipykernel.zmqshell.ZMQInteractiveShell object>)
477
478 def init_magics(self):
--> 479 super(ZMQInteractiveShell, self).init_magics()
global super = undefined
global ZMQInteractiveShell = <class 'ipykernel.zmqshell.ZMQInteractiveShell'>
self.init_magics = <bound method ZMQInteractiveShell.init_magics of <ipykernel.zmqshell.ZMQInteractiveShell object at 0x7fa88b22de10>>
480 self.register_magics(KernelMagics)
481 self.magics_manager.register_alias('ed', 'edit')
/usr/local/lib/python3.4/site-packages/IPython/core/interactiveshell.py in init_magics(self=<ipykernel.zmqshell.ZMQInteractiveShell object>)
2216 # should be split into a prompt manager and displayhook. We probably
2217 # even need a centralize colors management object.
-> 2218 self.magic('colors %s' % self.colors)
self.magic = <bound method ZMQInteractiveShell.magic of <ipykernel.zmqshell.ZMQInteractiveShell object at 0x7fa88b22de10>>
self.colors = 'Linux'
2219
2220 # Defined here so that it's included in the documentation
/usr/local/lib/python3.4/site-packages/IPython/core/interactiveshell.py in magic(self=<ipykernel.zmqshell.ZMQInteractiveShell object>, arg_s='colors Linux')
2334 magic_name, _, magic_arg_s = arg_s.partition(' ')
2335 magic_name = magic_name.lstrip(prefilter.ESC_MAGIC)
-> 2336 return self.run_line_magic(magic_name, magic_arg_s)
self.run_line_magic = <bound method ZMQInteractiveShell.run_line_magic of <ipykernel.zmqshell.ZMQInteractiveShell object at 0x7fa88b22de10>>
magic_name = 'colors'
magic_arg_s = 'Linux'
2337
2338 #-------------------------------------------------------------------------
/usr/local/lib/python3.4/site-packages/IPython/core/interactiveshell.py in run_line_magic(self=<ipykernel.zmqshell.ZMQInteractiveShell object>, magic_name='colors', line='Linux')
2255 kwargs['local_ns'] = sys._getframe(stack_depth).f_locals
2256 with self.builtin_trap:
-> 2257 result = fn(*args,**kwargs)
result = undefined
fn = <bound method BasicMagics.colors of <IPython.core.magics.basic.BasicMagics object at 0x7fa87b5cce80>>
args = ['Linux']
kwargs = {}
2258 return result
2259
/usr/local/lib/python3.4/site-packages/IPython/core/magics/basic.py in colors(self=<IPython.core.magics.basic.BasicMagics object>, parameter_s='Linux')
/usr/local/lib/python3.4/site-packages/IPython/core/magic.py in <lambda>(f=<function BasicMagics.colors>, *a=(<IPython.core.magics.basic.BasicMagics object>, 'Linux'), **k={})
191 # but it's overkill for just that one bit of state.
192 def magic_deco(arg):
--> 193 call = lambda f, *a, **k: f(*a, **k)
global call = undefined
f = <function BasicMagics.colors at 0x7fa88ec5cbf8>
a = (<IPython.core.magics.basic.BasicMagics object at 0x7fa87b5cce80>, 'Linux')
k = {}
194
195 if callable(arg):
/usr/local/lib/python3.4/site-packages/IPython/core/magics/basic.py in colors(self=<IPython.core.magics.basic.BasicMagics object>, parameter_s='Linux')
338 shell = self.shell
339
--> 340 import IPython.utils.rlineimpl as readline
global IPython.utils.rlineimpl = undefined
readline = undefined
341
342 if not shell.colors_force and \
/usr/local/lib/python3.4/site-packages/IPython/utils/rlineimpl.py in <module>()
19 try:
20 # import readline as _rl
---> 21 _rl = __import__(_rlmod_name)
global _rl = undefined
global __import__ = undefined
global _rlmod_name = 'readline'
22 # from readline import *
23 globals().update({k:v for k,v in _rl.__dict__.items() if not k.startswith('_')})
/usr/local/lib/python3.4/site-packages/readline.py in <module>()
4 #of a readline module
5 from __future__ import print_function, unicode_literals, absolute_import
----> 6 from pyreadline.rlmain import Readline
global pyreadline.rlmain = undefined
global Readline = undefined
7
8 __all__ = [ 'parse_and_bind',
/usr/local/lib/python3.4/site-packages/pyreadline/__init__.py in <module>()
9 from __future__ import print_function, unicode_literals, absolute_import
10
---> 11 from . import unicode_helper, logger, clipboard, lineeditor, modes, console
global unicode_helper = <module 'pyreadline.unicode_helper' from '/usr/local/lib/python3.4/site-packages/pyreadline/unicode_helper.py'>
global logger = <module 'pyreadline.logger' from '/usr/local/lib/python3.4/site-packages/pyreadline/logger.py'>
global clipboard = undefined
global lineeditor = undefined
global modes = undefined
global console = undefined
12 from .rlmain import *
13 from . import rlmain
/usr/local/lib/python3.4/site-packages/pyreadline/clipboard/__init__.py in <module>()
11 else:
12 try:
---> 13 from .win32_clipboard import GetClipboardText, SetClipboardText
global win32_clipboard = undefined
global GetClipboardText = undefined
global SetClipboardText = undefined
14 except ImportError:
15 from .no_clipboard import GetClipboardText, SetClipboardText
/usr/local/lib/python3.4/site-packages/pyreadline/clipboard/win32_clipboard.py in <module>()
35
36 from ctypes import *
---> 37 from pyreadline.keysyms.winconstants import CF_UNICODETEXT, GHND
global pyreadline.keysyms.winconstants = undefined
global CF_UNICODETEXT = undefined
global GHND = undefined
38 from pyreadline.unicode_helper import ensure_unicode,ensure_str
39
/usr/local/lib/python3.4/site-packages/pyreadline/keysyms/__init__.py in <module>()
21
22 if not success:
---> 23 raise ImportError("Could not import keysym for local pythonversion", x)
global ImportError = undefined
global x = undefined
NameError: name 'x' is not defined
^C
Interrupted
[I 2015-08-25 17:27:41.398 JupyterHub app:924] Cleaning up single-user servers...
[I 2015-08-25 17:27:41.403 JupyterHub app:935] Cleaning up proxy[31708]...
[I 2015-08-25 17:27:41.409 mikem notebookapp:1016] Shutting down kernels
[I 2015-08-25 17:27:41.411 mikem multikernelmanager:137] Kernel shutdown: 2ca52dbf-ae67-4f40-b800-fe7f5b73da56
[I 2015-08-25 17:27:41.716 JupyterHub app:961] ...done