I need some help to configure properly anaconda
to run python3
code inside org-mode files with babel.
Somehow when I try to run code from libraries in Anaconda, babel does not recognize it. Here is the results that I get from the code run in org-mode
#+BEGIN_SRC python :session :results value
import pandas as pd
my_df = pd.DataFrame({'Col1': [2, 7, 9], 'Col2': [1, 6, 12], 'Col3': [1, 6, 9]})
my_df
#+END_SRC
#+RESULTS:
: <_ast.Expr object at 0x7f20e28f5c50>
And the iPython terminal returns:
In [7]: 'org_babel_python_eoe'
In [7]: Out[7]: 'org_babel_python_eoe'
The corresponding details of my init file are here
;; ELPY
(package-initialize)
(elpy-enable)
;; Initialise anaconda
(setq python-shell-virtualenv-path "/home/teoten/anaconda3/bin/python3")
;; iphython
(setq python-shell-interpreter "/home/teoten/anaconda3/bin/ipython3"
python-shell-interpreter-args "-i --simple-prompt")
;; Set org-babel
(setq org-confirm-babel-evaluate nil)
(org-babel-do-load-languages
'org-babel-load-languages
'((R . t)
(python . t)
(lisp . t)
(latex . t)))
What am I doing wrong? Is it the virtualenv-path
? I already tried different options with no success