From mboxrd@z Thu Jan 1 00:00:00 1970 From: Uwe Brauer Subject: ob-ipyton ImportError: No module named 'jupyter_client' Date: Tue, 03 Jul 2018 08:54:58 +0200 Message-ID: <87y3eszu4d.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1faFFr-00064L-4W for emacs-orgmode@gnu.org; Tue, 03 Jul 2018 02:57:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1faFFo-0002Ci-26 for emacs-orgmode@gnu.org; Tue, 03 Jul 2018 02:57:39 -0400 Received: from [195.159.176.226] (port=36879 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1faFFn-0002BQ-RO for emacs-orgmode@gnu.org; Tue, 03 Jul 2018 02:57:36 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1faFDd-0000cg-Ji for emacs-orgmode@gnu.org; Tue, 03 Jul 2018 08:55:21 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org Hi I opened an issue on https://github.com/gregsexton/ob-ipython/issues/186 about the following problem I am facing, but maybe somebody on the list, in a similar environment has solved it already and that is why I post it here. I am running Ubuntu 16.04, upgraded to pip 9.03 (because pip 10 has a bug), running emacs git master from June. I installed your package via melpa, then I installed, via pip, the matlab kernel and the jupyter client. Both are in /usr/local/lib/python2.7/dist-packages drwxrwsr-x 40 root staff 4.0K Jul 2 11:26 . drwxr-sr-x 2 root staff 4.0K Jul 2 11:26 matlab_kernel drwxr-sr-x 2 root staff 4.0K Jul 2 11:26 matlab_kernel-0.15.1.dist-info drwxr-sr-x 6 root staff 4.0K Jul 2 11:26 metakernel drwxr-sr-x 2 root staff 4.0K Jul 2 11:26 metakernel-0.20.14.dist-info drwxr-sr-x 2 root staff 4.0K Jul 2 11:26 ipykernel-4.8.2.dist-info drwxr-sr-x 8 root staff 4.0K Jul 2 11:26 ipykernel -rw-r--r-- 1 root staff 552 Jul 2 11:26 ipykernel_launcher.pyc drwxr-sr-x 2 root staff 4.0K Jul 2 11:26 ipython-5.7.0.dist-info drwxr-sr-x 11 root staff 4.0K Jul 2 11:26 IPython drwxr-sr-x 5 root staff 4.0K Jul 2 11:26 jupyter_client drwxr-sr-x 2 root staff 4.0K Jul 2 11:26 jupyter_client-5.2.3.dist-info Now following the advice of John Kitchin, I try to execute the following code #+BEGIN_SRC emacs-lisp (add-to-list 'org-src-lang-modes '("matlab" . matlab)) ;; set default headers for convenience (setq org-babel-default-header-args:matlab '((:results . "output replace") (:session . "matlab") (:kernel . "matlab") (:exports . "code") (:cache . "no") (:noweb . "no") (:hlines . "no") (:tangle . "no"))) (defalias 'org-babel-execute:matlab 'org-babel-execute:ipython) (defalias 'org-babel-prep-session:matlab 'org-babel-prep-session:ipython) (defalias 'org-babel-matlab-initiate-session 'org-babel-ipython-initiate-session) #+END_SRC #+RESULTS: : org-babel-matlab-initiate-session #+BEGIN_SRC matlab :results output org drawer x = [1, 2, 3, 4, 5]; fprintf('|%d', x) #+END_SRC But I obtain the following error in the debug buffer Traceback (most recent call last): File "/home/oub/.emacs.d/elpa/ob-ipython-20180224.153/client.py", line 1, in import jupyter_client as client ImportError: No module named 'jupyter_client' I also tried the example provided in https://github.com/gregsexton/ob-ipython but the result was the same. So how shall I modify that line in the client.py? Thanks and regards Uwe Brauer