Ipython notebook will not start on command line

后端 未结 6 1647
伪装坚强ぢ
伪装坚强ぢ 2021-01-02 22:02

I tried to open ipython in terminal with ipython notebook and it will not open ipython notebook. It gives the following error:

| ~/documents/ud         


        
相关标签:
6条回答
  • 2021-01-02 22:17

    I liked most imarti's solution:

    export BROWSER=open
    

    It is low overhead and works with your default browser

    EDIT: macOS 10.12.6 has been released, so now the recommended solution is to just update your OS.

    0 讨论(0)
  • 2021-01-02 22:18

    This is an issue possibly due to the recent upgrade of Mac OSX. You can follow the discussion and possible solutions here, here and here.

    0 讨论(0)
  • 2021-01-02 22:22

    This issue due to the newest Mac OSX 10.12.5 upgrade. Please follow these steps to fix it:

    1. Generate jupyter config if you don't have it:
      jupyter notebook --generate-config
    2. Use vim to open that config file and add Google chrome value in:
      c.NotebookApp.browser = u'chrome' (Make sure to take out the # comment sign)
    0 讨论(0)
  • 2021-01-02 22:22

    editing my nano .bash_profile file to contain the lines:

    BROWSER=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
    export BROWSER
    
    0 讨论(0)
  • 2021-01-02 22:30

    I used the same approach as Kiem Nguyen above, but 'chrome' wouldn't work for me, even after editing my .bash_profile as Hanshenry90 suggested.

    To use Safari to view the notebook, open your terminal and enter:

    jupyter notebook --generate-config
    cd ~.jupyter
    nano jupyter_notebook_config.py
    

    ctrl + w "NotebookApp.browser" + enter to skip to that part of the file. Then delete # and change the line to:

    c.NotebookApp.browser = u'Safari'
    

    Restart your notebook, with jupyter notebook, and it should open in Safari.

    If anyone has any insight on how to make this work for Chrome, that would be much appreciated.

    0 讨论(0)
  • 2021-01-02 22:42

    Not the best fix, but a potential workaround...

    Go to your browser and enter the login token provided. In your case: http://localhost:8888/

    After starting a new notebook, I found that my kernel would die and be unable to restart. Updating my ipykernel fixed this:

    pip install ipykernel --upgrade

    0 讨论(0)
提交回复
热议问题