Runtime error: cannot open jupyter notebook in command line (macOS)

I am a beginner starting to learn Python and other languages. I installed Jupiter notebook on my Mac as well as anaconda, and just ran into a problem when I tried to open jupyter notebook on my command.

The message appeared as:

execution error: "~~~(I just abbreviated the location)" doesn’t understand the "open location" message. (-1708)

      

I have no sense whats going on here.

How can I solve this?

+3


source to share


4 answers


This issue was resolved in the jupyter notebook github repo .

One solution would be to install a browser, for example:



c.NotebookApp.browser = u'Safari'

in the config file: ~/.jupyter/jupyter_notebook_config.py

+1


source


There is a similar question on SO that addresses this. There are several workarounds that are suggested there to avoid this problem:

Ipython laptop won't start at command line



Also, this is a known issue that could be related to a recent Mac OSX update. You can follow the discussion here , here, and here .

0


source


My workaround was to use the Mac automator tool app to open both Chrome and jupyter at the same time. Here's the applescript:

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

      

Hope this helps! Here's a good URL on how to use Automator if you haven't used it in the past: http://radarearth.com/content/automate-terminal-automator

0


source


export BROWSER = / Applications / Google \ Chrome.app/Contents/MacOS/Google \ Chrome

0


source







All Articles