emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] Problems with ob-ipython


From: marvin doyley
Subject: [O] Problems with ob-ipython
Date: Wed, 1 Mar 2017 20:30:51 -0500

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 via email to

[Prev in Thread] Current Thread [Next in Thread]