我尝试使用ipython notebook
在终端中打开ipython,但它不会打开ipython notebook。它给出了以下错误:
| ~/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)
我已经升级了conda jupyter,但它仍然无效。我该如何解决这个问题?
答案 0 :(得分:22)
此问题归功于最新的Mac OSX 10.12.5升级。请按照以下步骤进行修复:
答案 1 :(得分:3)
我使用与上面的Kiem Nguyen相同的方法,但是'chrome'对我来说不起作用,即使在编辑我的.bash_profile后,就像Hanshenry90所说的那样。
要使用Safari查看笔记本,请打开终端并输入:
jupyter notebook --generate-config
cd ~.jupyter
nano jupyter_notebook_config.py
ctrl + w“NotebookApp.browser”+输入以跳至文件的该部分。然后删除#
并将行更改为:
c.NotebookApp.browser = u'Safari'
使用jupyter notebook
重新启动笔记本,它应该在Safari中打开。
如果有人对Chrome如何使这项工作有任何见解,那将非常感激。
答案 2 :(得分:2)
答案 3 :(得分:1)
编辑我的nano .bash_profile file
以包含以下行:
BROWSER=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
export BROWSER
答案 4 :(得分:0)
不是最好的解决方案,但潜在的解决方法......
转到浏览器并输入提供的登录令牌。 在您的情况下:http://localhost:8888/
启动新笔记本后,我发现我的内核会死,无法重启。更新我的ipykernel解决了这个问题:
pip install ipykernel --upgrade
答案 5 :(得分:0)