我有Mac OS X 10.11.5。我通过anaconda安装了jupyter笔记本。当我键入jupyter笔记本。它在Safari中打开“Home”选项卡,但在命令窗口中显示错误:
[W 20:48:53.368 NotebookApp] /Users/hoosier/cv.py doesn't exist
但是,我的计算机上有一个/Users/hoosier/cv.py文件。当我尝试启动python2时,它会尝试但最终内核会死掉。这是我在命令窗口中得到的内容:
[I 20:52:33.947 NotebookApp] Creating new notebook in
[I 20:52:34.331 NotebookApp] Kernel started: 7f5cc96e-8163-48f7-a59b-ce13a6839608
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Library/Python/2.7/site-packages/ipykernel/__main__.py", line 3, in <module>
app.launch_new_instance()
File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 591, in launch_instance
app.initialize(argv)
File "<decorator-gen-121>", line 2, in initialize
File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/ipykernel/kernelapp.py", line 390, in initialize
self.init_extensions()
File "/Library/Python/2.7/site-packages/ipykernel/kernelapp.py", line 362, in init_extensions
extension_man.load_extension('ipywidgets')
File "/Library/Python/2.7/site-packages/IPython/core/extensions.py", line 89, in load_extension
__import__(module_str)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/__init__.py", line 22, in <module>
from .widgets import *
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/__init__.py", line 1, in <module>
from .widget import Widget, CallbackDispatcher, register, widget_serialization, handle_version_comm_opened
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/widget.py", line 117, in <module>
class Widget(LoggingConfigurable):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/widget.py", line 154, in Widget
in which to find _model_name. If empty, look in the global registry.""").tag(sync=True)
AttributeError: 'Unicode' object has no attribute 'tag'
[I 20:52:37.333 NotebookApp] KernelRestarter: restarting kernel (1/5)
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Library/Python/2.7/site-packages/ipykernel/__main__.py", line 3, in <module>
app.launch_new_instance()
File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 591, in launch_instance
app.initialize(argv)
File "<decorator-gen-121>", line 2, in initialize
File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/ipykernel/kernelapp.py", line 390, in initialize
self.init_extensions()
File "/Library/Python/2.7/site-packages/ipykernel/kernelapp.py", line 362, in init_extensions
extension_man.load_extension('ipywidgets')
File "/Library/Python/2.7/site-packages/IPython/core/extensions.py", line 89, in load_extension
__import__(module_str)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/__init__.py", line 22, in <module>
from .widgets import *
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/__init__.py", line 1, in <module>
from .widget import Widget, CallbackDispatcher, register, widget_serialization, handle_version_comm_opened
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/widget.py", line 117, in <module>
class Widget(LoggingConfigurable):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/widget.py", line 154, in Widget
in which to find _model_name. If empty, look in the global registry.""").tag(sync=True)
AttributeError: 'Unicode' object has no attribute 'tag'
[I 20:52:40.339 NotebookApp] KernelRestarter: restarting kernel (2/5)
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Library/Python/2.7/site-packages/ipykernel/__main__.py", line 3, in <module>
app.launch_new_instance()
File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 591, in launch_instance
app.initialize(argv)
File "<decorator-gen-121>", line 2, in initialize
File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/ipykernel/kernelapp.py", line 390, in initialize
self.init_extensions()
File "/Library/Python/2.7/site-packages/ipykernel/kernelapp.py", line 362, in init_extensions
extension_man.load_extension('ipywidgets')
File "/Library/Python/2.7/site-packages/IPython/core/extensions.py", line 89, in load_extension
__import__(module_str)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/__init__.py", line 22, in <module>
from .widgets import *
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/__init__.py", line 1, in <module>
from .widget import Widget, CallbackDispatcher, register, widget_serialization, handle_version_comm_opened
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/widget.py", line 117, in <module>
class Widget(LoggingConfigurable):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/widget.py", line 154, in Widget
in which to find _model_name. If empty, look in the global registry.""").tag(sync=True)
AttributeError: 'Unicode' object has no attribute 'tag'
[I 20:52:43.344 NotebookApp] KernelRestarter: restarting kernel (3/5)
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Library/Python/2.7/site-packages/ipykernel/__main__.py", line 3, in <module>
app.launch_new_instance()
File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 591, in launch_instance
app.initialize(argv)
File "<decorator-gen-121>", line 2, in initialize
File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/ipykernel/kernelapp.py", line 390, in initialize
self.init_extensions()
File "/Library/Python/2.7/site-packages/ipykernel/kernelapp.py", line 362, in init_extensions
extension_man.load_extension('ipywidgets')
File "/Library/Python/2.7/site-packages/IPython/core/extensions.py", line 89, in load_extension
__import__(module_str)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/__init__.py", line 22, in <module>
from .widgets import *
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/__init__.py", line 1, in <module>
from .widget import Widget, CallbackDispatcher, register, widget_serialization, handle_version_comm_opened
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/widget.py", line 117, in <module>
class Widget(LoggingConfigurable):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/widget.py", line 154, in Widget
in which to find _model_name. If empty, look in the global registry.""").tag(sync=True)
AttributeError: 'Unicode' object has no attribute 'tag'
[W 20:52:44.352 NotebookApp] Timeout waiting for kernel_info reply from 7f5cc96e-8163-48f7-a59b-ce13a6839608
[I 20:52:46.351 NotebookApp] KernelRestarter: restarting kernel (4/5)
WARNING:root:kernel 7f5cc96e-8163-48f7-a59b-ce13a6839608 restarted
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/Library/Python/2.7/site-packages/ipykernel/__main__.py", line 3, in <module>
app.launch_new_instance()
File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 591, in launch_instance
app.initialize(argv)
File "<decorator-gen-121>", line 2, in initialize
File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 75, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/ipykernel/kernelapp.py", line 390, in initialize
self.init_extensions()
File "/Library/Python/2.7/site-packages/ipykernel/kernelapp.py", line 362, in init_extensions
extension_man.load_extension('ipywidgets')
File "/Library/Python/2.7/site-packages/IPython/core/extensions.py", line 89, in load_extension
__import__(module_str)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/__init__.py", line 22, in <module>
from .widgets import *
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/__init__.py", line 1, in <module>
from .widget import Widget, CallbackDispatcher, register, widget_serialization, handle_version_comm_opened
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/widget.py", line 117, in <module>
class Widget(LoggingConfigurable):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ipywidgets/widgets/widget.py", line 154, in Widget
in which to find _model_name. If empty, look in the global registry.""").tag(sync=True)
AttributeError: 'Unicode' object has no attribute 'tag'
[W 20:52:49.361 NotebookApp] KernelRestarter: restart failed
[W 20:52:49.361 NotebookApp] Kernel 7f5cc96e-8163-48f7-a59b-ce13a6839608 died, removing from map.
ERROR:root:kernel 7f5cc96e-8163-48f7-a59b-ce13a6839608 restarted failed!
[W 20:52:49.372 NotebookApp] Kernel deleted before session
[W 20:52:49.373 NotebookApp] 410 DELETE /api/sessions/cce1452d-221b-47b6-9bc6-52440b639281 (::1) 1.50ms referer=http://localhost:8888/notebooks/Untitled32.ipynb?kernel_name=python2
[W 20:53:32.867 NotebookApp] /Users/hoosier/cv.py doesn't exist
[I 20:54:35.237 NotebookApp] Saving file at /Untitled32.ipynb