Ipython笔记本无法在命令行启动

Han*_*y90 6 ipython-notebook jupyter-notebook

我试图在终端打开ipython ipython notebook,它不会打开ipython笔记本.它给出以下错误:

| ~/documents/ud120-projects/datasets_questions @ HJ (JiaHui)
| => ipython notebook
[TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is deprecated and 
will be removed in future versions.
[TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook` in 
the future
[I 14:46:50.516 NotebookApp] Serving notebooks from local directory: 
/Users/JiaHui/Documents/ud120-projects/datasets_questions
[I 14:46:50.517 NotebookApp] 0 active kernels 
[I 14:46:50.517 NotebookApp] The Jupyter Notebook is running at: 
http://localhost:8888/?token=ef13f681f4d61223064e41a5a9e369813c155d27b0103471
[I 14:46:50.517 NotebookApp] Use Control-C to stop this server and shut down 
all kernels (twice to skip confirmation).
[C 14:46:51.567 NotebookApp] 

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
    http://localhost:8888/?
token=ef13f681f4d61223064e41a5a9e369813c155d27b0103471
0:97: execution error: "http://localhost:8888/tree?
token=145eccd35722c35c6525d8a4d376f27aa60358dc7d00de4c" doesn’t understand the 
“open location” message. (-1708)
Run Code Online (Sandbox Code Playgroud)

我已经升级了conda jupyter,但它仍然无法正常工作.我怎样才能解决这个问题?

Kie*_*yen 22

此问题归功于最新的Mac OSX 10.12.5升级.请按照以下步骤进行修复:

  1. 如果你没有它,则生成jupyter配置:
    jupyter notebook --generate-config
  2. 使用vim打开该配置文件并添加Google Chrome值:
    c .NotebookApp.browser = u'chrome'(确保取出#comment标志)

  • 或者使用Safari的"c.NotebookApp.browser = u'Safari"(并删除主题标签). (2认同)

Han*_*y90 1

编辑 mynano .bash_profile file以包含以下行:

BROWSER=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
export BROWSER
Run Code Online (Sandbox Code Playgroud)