emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: marvin doyley <marvinpas@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Problems with ob-ipython
Date: Wed, 1 Mar 2017 20:30:51 -0500	[thread overview]
Message-ID: <1EC0DFBB-E88C-4B1B-934E-1D37AFAFCCE5@gmail.com> (raw)

Hi there,

I am trying to use ob-ipyton

but when I try to run any code block I get the following error "Evaluation of this python code block is disabled.”

Any suggestions on how to fix this ?
I am using emacs 26, python 5

cheers,
M

Here is an example code block that I try to run. Note that python code blocks run ok, its just the ppython ones that fail
#+BEGIN_SRC ipython :session :results output drawer

%matplotlib inline
x = np.linspace(0,np.pi,100)
y = np.cos(x)
plt.plot(x,y)
#+END_SRC


I have the following in my .emacs file

;; Org-babel
(org-babel-do-load-languages
 'org-babel-load-languages
'((emacs-lisp . t)
   (lisp . t)
   (fortran . t)
   (C . t)
   (latex . t)
   (ipython . t)
   (python . t)
   ))

(use-package ob-ipython
  :ensure t
 :config
  (setq org-confirm-babel-evaluate nil)  
  (add-hook 'org-babel-after-execute-hook 'org-display-inline-images 'append)
)

(use-package python-mode
  :ensure t
  :config
(setq python-shell-interpreter "/anaconda/bin/ipython"
      python-shell-interpreter-args  "--simple-prompt -i"
      python-indent-offset 4)
)

                 reply	other threads:[~2017-03-02  1:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1EC0DFBB-E88C-4B1B-934E-1D37AFAFCCE5@gmail.com \
    --to=marvinpas@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).