1

I am not entirely sure where to post this question (here, stackoverflow....), but I am sure some emacs experts will be able to help me here. This question is also posted here https://github.com/tkf/emacs-ipython-notebook/issues/158 , so the reader can go there for some more details.

Recently I managed to set IPython in emacs and I have been so far happily coding using the "interplay" of the two.

I now need to share some code and the IPython Notebook seems like the best tool to do so. Therefore, I have been using IPython the "normal" way until I recently learned that IPython can also be set up on emacs https://github.com/tkf/emacs-ipython-notebook .

I decided to give it a go and install all the requirements: websocket, request etc.

However, now, every time I try to run Emacs IPython Notebook via M-x ein:notebooklist-open I find the following error messages:

Contacting host: 127.0.0.1:8961 ein: [error] QUERY-AJAX--PARSE-DATA: error from parser ein:json-read error in process filter: eq: JSON readtable error error in process filter: JSON readtable error ein: [error] QUERY-AJAX--PARSE-DATA: error from parser ein:json-read Error running timerein:query-ajax-timeout-callback': (json-readtable-error)

The relevant section of my .emacs file looks like this (I am sure that most of it is not needed, but I have gone through a lot of iterations):

;;Ipython Notebook (add-to-list 'load-path "/Users/javier/.emacs.d/elpa/request-0.2.0/") (require 'request) (add-to-list 'load-path "/Users/javier/.emacs.d/elpa/helm-1.6.7/") (require 'helm) (add-to-list 'load-path "/Users/javier/.emacs.d/elpa/company-0.8.9/") (autoload 'company-mode "company" nil t) (add-to-list 'load-path "/Users/javier/.emacs.d/elpa/popup-0.5.2/") (require 'popup) (add-to-list 'load-path "/Users/javier/.emacs.d/elpa/websocket-1.3/") (require 'websocket) (add-to-list 'load-path "/Users/javier/.emacs.d/elpa/ein-0.2.0/") (require 'ein) (require 'cc-mode) ;;(setq ein:use-auto-complete t) ;; Or, to enable "superpack" (a little bit hacky improvements): (setq ein:use-auto-complete-superpack t) (setq ein:use-smartrep t)

more details about my System Info can be found here https://github.com/tkf/emacs-ipython-notebook/issues/158

To my understanding the problem seems to be related to request and the fact that despite the (require 'request) the request.el seems to either not having been loaded or not being visible to ein.

At this stage I do not know what to edit/install to make it work so I can use the notebook in emacs like is shown here https://github.com/tkf/emacs-ipython-notebook/wiki/Screenshots .

I also found this Emacs EIN vs IPython shell but seems not to solve my problem.

5
  • How did you install EIN? I found the tkf version to not support IPython 2.0. Melpa install upgraded me to a different version which does support IP2.0.
    – mankoff
    Commented Feb 18, 2015 at 21:05
  • @mankoff: thanks for your comment. I used melpa, package-install and then ein. I do believe my problem is related to the register package, but I am not sure.
    – Javier
    Commented Feb 18, 2015 at 22:24
  • 2
    Possible duplicate of Emacs EIN vs IPython shell
    – serv-inc
    Commented May 28, 2017 at 16:15
  • 1
    Why do you do all those (add-to-list 'load-path ...)? You should instead call (package-initialize) which will do that (and the corresponding require when needed) for you.
    – Stefan
    Commented May 28, 2017 at 18:45
  • Hi there. Thanks for the answers! I asked this question 2 years ago and I actually moved to sublime since then :) Thanks anyway.
    – Javier
    Commented May 28, 2017 at 18:57

1 Answer 1

1

There is a current EIN that took over. On Emacs 25, it works out of the box.

Usage

  1. Install from MELPA. For manual install, put Emacs lisp ein*.el files and Python file ein.py in your load path. See online documentation for more information.

  2. Start the Jupyter notebook server.

  3. (Optional) Newer versions of Jupyter have token authentication_ enabled by default so you will need to call M-x ein:notebooklist-login and enter the token as the password.

  4. Execute M-x ein:notebooklist-open to open notebook list.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.