what is the ipython notebook “Terminals” menu option

后端 未结 4 1803
日久生厌
日久生厌 2020-12-29 04:40

I am running ipython notebook on my OSX machine and/or my ubuntu 14.04 machine. I am using ipython 3.0.0, and ipython (jupyter) notebooks.

When I start an ipython n

相关标签:
4条回答
  • 2020-12-29 05:22

    Here's the code in Lib/site-packages/IPython/html/notebookapp.py responsible for this item (located the file by searching the source for "Terminals" case-sensitively):

    def init_terminals(self):
        try:
            from .terminal import initialize
            initialize(self.web_app)
            self.web_app.settings['terminals_available'] = True
        except ImportError as e:
            log = self.log.debug if sys.platform == 'win32' else self.log.warn
            log("Terminals not available (error was %s)", e)
    

    As you can see, there should be a message in the console log specifying what went wrong (you may need to increase log verbosity with ipython notebook --log-level=<level> to see it). In my case, it said:

    Terminals not available (error was No module named fcntl)

    The html.terminal module that is being imported appears to provide a web-based IPython interactive console.

    0 讨论(0)
  • 2020-12-29 05:24

    Actually it's jupyter notebook 5.3.0, not jupyter. the two versions is not the same thing. - jupyter --version - jupyter notebook --version

    I ever suffered from this.

    0 讨论(0)
  • 2020-12-29 05:34

    Support for Windows terminals with terminado dependency was added in Jupyter 5.3.0:

    https://github.com/jupyter/notebook/pull/3087

    0 讨论(0)
  • 2020-12-29 05:40

    IPython/Jupyter appears to support browser-based interactive terminal sessions. This is enabled on my machine by installing the terminado package with pip or conda. This fixes the "Terminals Unavailable" message on the drop-down, and lets me start up a (bash) terminal session in a new tab.

    See this commit: IPython on GitHub

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