在python2.7環(huán)境下,使用anacoda安裝jupyter notebook后僧叉,輸入
jupyter notebook
無法打開jupyter柱彻,錯誤log如下:
The Jupyter HTML Notebook.
這將啟動一個基于tornado的HTML筆記本服務(wù)器,它提供一個html5/
javascript筆記本客戶端伸辟。
Traceback (most recent call last):
File "/anaconda2/envs/python3/bin/jupyter-notebook", line 11, in <module>
sys.exit(main())
File "/anaconda2/envs/python3/lib/python2.7/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/anaconda2/envs/python3/lib/python2.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "/anaconda2/envs/python3/lib/python2.7/site-packages/traitlets/config/application.py", line 89, in catch_config_error
app.print_help()
File "/anaconda2/envs/python3/lib/python2.7/site-packages/traitlets/config/application.py", line 385, in print_help
self.print_subcommands()
File "/anaconda2/envs/python3/lib/python2.7/site-packages/traitlets/config/application.py", line 377, in print_subcommands
print(os.linesep.join(lines))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 4: ordinal not in range(128)
Google后參考github上的一個issue,https://github.com/jupyterlab/jupyterlab/issues/5345梅惯,看到有人切換語言解決問題的:
于是嘗試使用如下命令打開jupyter:
LANG=zn jupyter notebook
問題解決?