Python 2.7 执行错误:Can';t在命令行上打开jupyter笔记本(MacOS)
我是一个刚刚开始学习Python和其他计算机语言的新手。我在Mac和anaconda上安装了Jupiter笔记本,当我试图用命令打开jupyter笔记本时遇到了一个问题 这条消息突然冒出来如下:Python 2.7 执行错误:Can';t在命令行上打开jupyter笔记本(MacOS),python-2.7,anaconda,jupyter-notebook,Python 2.7,Anaconda,Jupyter Notebook,我是一个刚刚开始学习Python和其他计算机语言的新手。我在Mac和anaconda上安装了Jupiter笔记本,当我试图用命令打开jupyter笔记本时遇到了一个问题 这条消息突然冒出来如下: execution error: "~~~(I just abbreviated the location)" doesn’t understand the “open location” message. (-1708) 我不知道这里发生了什么事 如何解决这个问题?上有一个类似的问题,可以解决这个问
execution error: "~~~(I just abbreviated the location)" doesn’t understand the “open location” message. (-1708)
我不知道这里发生了什么事
如何解决这个问题?上有一个类似的问题,可以解决这个问题。为避免此问题,建议采用以下几种解决方法:
此外,这是一个已知的问题,可能是由于最近升级了Mac OSX。您可以按照讨论进行操作。此问题已在中解决 一种解决方案是设置浏览器,例如:
c.NotebookApp.browser=u'Safari'
在配置文件中:
~/.jupyter/jupyter\u notebook\u config.py
我的解决方法是使用Mac的automator工具应用程序同时打开Chrome和jupyter笔记本。以下是应用脚本:
on run {input, parameters}
tell application "Terminal"
activate
do script with command "jupyter notebook"
end tell
tell application "Google Chrome"
activate
open location "http://localhost:8888/"
end tell
end run
希望这有帮助!
这里有一个关于如何使用Automator的好URL,如果您过去没有使用过它:导出浏览器=/Applications/Google\Chrome.app/Contents/MacOS/Google\Chrome如果文件不存在,您可以通过执行以下操作生成它:
jupyter notebook--generate config