Running IPython Notebook within Sublime Text 2

Jim Raynor

I'm a ST2 user (mainly on Python) and I use IPython notebook as well. Before, it was all fine, I could run IPython notebook from ST2 command (ST2 then opened a new tab and there are interactive cells etc.)

Since yesterday I upgraded ipython to version 2.0 using pip. From then on I cannot have the notebook tab in ST2 anymore. Trying to input the command 'open ipython notebook' to ST commandline returns nothing:

>>> "open ipython notebook"
'open ipython notebook'

Is this the problem of compatibility? Maybe the plug in of ST2 does not work with version of ipython anymore? I notice that in version 2.0, the link to the home page of the ipython server changed a bit. Can you suggest how to manually edit the configuration of ST2 ipythonnotebook plugin to make it run again?

>>> open ipython notebook
  File "<string>", line 1
    open ipython notebook
               ^
SyntaxError: invalid syntax
MattDMo

There are a couple of issues. First, IPython 2.0 doesn't work with the IPython Notebook plugin. This was reported 3 months ago, and the developer hasn't done anything about it yet.

Second, even if you hadn't upgraded IPython, you're entering open ipython notebook in the wrong location. You should be typing that into the Command Palette (CtrlShiftP on Windows/Linux, P on OS X), not the Sublime console (Ctrl`).

So, there are two options. The first is to downgrade your version of IPython back to the one you were using before, and everything will work again. The downside of this is you won't have access to the latest features of IPython, which may or may not be an issue depending on your workflow.

The second option is to run IPython via the SublimeREPL plugin. One nice thing about this is the ability to see images as you generate them, as they pop up in new windows. Downsides include the current lack of ability to connect to running notebook servers, the fact that you can't save your work as an .ipynb file, and the different way of presenting data - it's more line-based, not cell-based, so for example if I define a loop:

In [1]: for i in range(10):
   ...:     print(i)

and want to modify and rerun it later, using the arrow keys to go back through the history only goes line-by-line, not cell-by-cell. That means you'd have to rewrite your loop each time you want to run it. I mainly use SublimeREPL/IPython to test snippets of code as I'm writing to make sure they do what I want them to.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Running IPython Notebook within Sublime Text 2

From Dev

Running an IPython notebook server on EC2 instance start

From Dev

Running the R console from Sublime Text 2

From Dev

Running python in Sublime Text 2 getting error

From Dev

C++ compiling and running in Sublime Text 2

From Dev

Match a running ipython notebook to a process

From Dev

Closed IPython Notebook that was running code

From Dev

Running ipython notebook in a Docker Container

From Dev

Ipython Notebook Running only as root

From Dev

Closed IPython Notebook that was running code

From Dev

Ipython notebook on 2 columns

From Dev

How to write text in ipython notebook?

From Dev

Sorting the values within a dropdown widget in ipython notebook

From Dev

Search all within opened tabs with Sublime Text 2

From Dev

Is it possible to run Minitest tests within Sublime Text 2?

From Dev

ipython notebook pylab fig size running twice?

From Dev

Running IPython Notebook on Google App Engine

From Dev

Exception raised when running ipython notebook

From Dev

Error running ipython notebook on 64 bit

From Dev

plotting in ipython notebook in 2 steps

From Dev

Running npm install from Sublime Text 2 doesn't work

From Dev

How to get the ipython notebook title associated with the currently running ipython kernel

From Dev

IPython Notebook keyboard shortcut search for text

From Dev

Running the selected code in Sublime Text

From Dev

Running Sublime Text Editor on Server

From Dev

Running a Tornado Server within a Jupyter Notebook

From Java

How to dynamically update a plot in a loop in Ipython notebook (within one cell)

From Dev

IPython notebook kernel dies within a zc.buildout setup

From Dev

Anaconda: Python 3 and 2 in IPython/Jupyter Notebook

Related Related

  1. 1

    Running IPython Notebook within Sublime Text 2

  2. 2

    Running an IPython notebook server on EC2 instance start

  3. 3

    Running the R console from Sublime Text 2

  4. 4

    Running python in Sublime Text 2 getting error

  5. 5

    C++ compiling and running in Sublime Text 2

  6. 6

    Match a running ipython notebook to a process

  7. 7

    Closed IPython Notebook that was running code

  8. 8

    Running ipython notebook in a Docker Container

  9. 9

    Ipython Notebook Running only as root

  10. 10

    Closed IPython Notebook that was running code

  11. 11

    Ipython notebook on 2 columns

  12. 12

    How to write text in ipython notebook?

  13. 13

    Sorting the values within a dropdown widget in ipython notebook

  14. 14

    Search all within opened tabs with Sublime Text 2

  15. 15

    Is it possible to run Minitest tests within Sublime Text 2?

  16. 16

    ipython notebook pylab fig size running twice?

  17. 17

    Running IPython Notebook on Google App Engine

  18. 18

    Exception raised when running ipython notebook

  19. 19

    Error running ipython notebook on 64 bit

  20. 20

    plotting in ipython notebook in 2 steps

  21. 21

    Running npm install from Sublime Text 2 doesn't work

  22. 22

    How to get the ipython notebook title associated with the currently running ipython kernel

  23. 23

    IPython Notebook keyboard shortcut search for text

  24. 24

    Running the selected code in Sublime Text

  25. 25

    Running Sublime Text Editor on Server

  26. 26

    Running a Tornado Server within a Jupyter Notebook

  27. 27

    How to dynamically update a plot in a loop in Ipython notebook (within one cell)

  28. 28

    IPython notebook kernel dies within a zc.buildout setup

  29. 29

    Anaconda: Python 3 and 2 in IPython/Jupyter Notebook

HotTag

Archive