我正在运行Python 2.7并使用pip install安装了Jupyter Notebook。
当我尝试通过输入
从命令行启动笔记本时jupyter notebook
我收到以下错误消息:
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Python27\scripts\jupyter-notebook.exe\__main__.py", line 9, in <modul
e>
File "C:\Python27\lib\site-packages\jupyter_core\application.py", line 267, in
launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "C:\Python27\lib\site-packages\traitlets\config\application.py", line 591
, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "C:\Python27\lib\site-packages\traitlets\config\application.py", line 75,
in catch_config_error
return method(app, *args, **kwargs)
File "C:\Python27\lib\site-packages\notebook\notebookapp.py", line 1017, in in
itialize
super(NotebookApp, self).initialize(argv)
File "<decorator-gen-6>", line 2, in initialize
File "C:\Python27\lib\site-packages\traitlets\config\application.py", line 75,
in catch_config_error
return method(app, *args, **kwargs)
File "C:\Python27\lib\site-packages\jupyter_core\application.py", line 243, in
initialize
self.migrate_config()
File "C:\Python27\lib\site-packages\jupyter_core\application.py", line 169, in
migrate_config
migrate()
File "C:\Python27\lib\site-packages\jupyter_core\migrate.py", line 227, in mig
rate
if migrate_config(name, env):
File "C:\Python27\lib\site-packages\jupyter_core\migrate.py", line 200, in mig
rate_config
cfg = loaders[ext](src).load_config()
File "C:\Python27\lib\site-packages\traitlets\config\loader.py", line 432, in
load_config
self._read_file_as_dict()
File "C:\Python27\lib\site-packages\traitlets\config\loader.py", line 464, in
_read_file_as_dict
py3compat.execfile(conf_filename, namespace)
File "C:\Python27\lib\site-packages\ipython_genutils\py3compat.py", line 278,
in execfile
exec(compiler(scripttext, filename, 'exec'), glob, loc)
File "C:\Users\Stuart\.ipython\profile_default\ipython_notebook_config.py", li
ne 102
c.NotebookApp.notebook_dir = u'C:\Users\Stuart\Documents\iPython'
^
IndentationError: unexpected indent
我可以跑
jupyter notebook --help
没有问题所以我不确定它是否安装不正确还是有其他原因导致它没有运行。
有人可以建议我为什么会收到此错误消息以及如何正确运行笔记本?