millejoh / emacs-ipython-notebook

Jupyter notebook client in Emacs
http://millejoh.github.io/emacs-ipython-notebook/
GNU General Public License v3.0
1.47k stars 122 forks source link

Issues getting wolfram language working in ob-ein #613

Closed Rizzey closed 4 years ago

Rizzey commented 4 years ago

I have been able thus far to use the wolfram language 12 kernel in a notebook (as in #589) but I have been having trouble getting it to run from Org-mode. Trying to get this running in org, I fished around the docs and found the ein:register-lang-mode function, which is not in my version of EIN.

I tried these steps from #405, as my copy of EIN does not have the 'ein:register-lang-mode' function defined.

#+begin_src elisp 
(add-to-list 'org-src-lang-modes '("ein-wolframlanguage12" . wolfram))
(add-to-list 'ob-ein-languages '("ein-wolframlanguage12" . wolfram))

(defvar org-babel-default-header-args:wolframlanguage12 '())

(defalias 'org-babel-execute:ein-wolframlanguage12 'org-babel-execute:ein)
(defalias 'org-babel-ein-wolframlanguage12-initiate-session 'org-babel-ein-initiate-session)
(print org-src-lang-modes)
(print ob-ein-languages)
#+end_src

+RESULTS:

: ((ein-wolframlanguage12 . wolfram) (ein . python) (ein-python . python) (ein-R . R) (ein-r . R) (ein-julia . julia) (ein-hy . hy) (ein-Wolfram-Language . wolfram)) org-src-lang-modes returns `: ((ein-wolframlanguage12 . wolfram) (ein-Wolfram-Language . wolfram) (Wolfram-Language . wolfram) (jupyter-Wolfram-Language . wolfram language) (ein-hy . hy) (ein-julia . julia) (ein-r . R) (ein-R . R) (ein-python . python) (ein . python) (redis . redis) (php . php) (arduino . arduino) (mathematica . wolfram) (jupyter-wolfram . wolfram) (jupyter-python . python) (C . c) (C++ . c++) (asymptote . asy) (bash . sh) (beamer . latex) (calc . fundamental) (cpp . c++) (ditaa . artist) (dot . fundamental) (elisp . emacs-lisp) (ocaml . tuareg) (screen . shell-script) (shell . sh) (sqlite . sql))

`


#+NAME: 034801d1-fd29-4d2c-ad46-b7c1d7a06282
#+begin_src ein-wolframlanguage12 :session localhost :results output 
x + 2
#+end_src

#+RESULTS: 034801d1-fd29-4d2c-ad46-b7c1d7a06282
: [....]

This put this in the Messages buffer.

executing Ein-Wolframlanguage12 code block (034801d1-fd29-4d2c-ad46-b7c1d7a06282)...
Position saved to mark ring, go back with ‘C-c C-0’.
Code block evaluation complete.
ein: [info] ein:jupyter-server--run: /home/river/anaconda3/bin/jupyter notebook --notebook-dir=/home/river/werk/mathematica/ --no-browser
Code block evaluation complete.
ein: [info] Login to http://127.0.0.1:8888 complete.
ein: [info] Worksheet .ein-wolframlanguage12.ipynb is ready
Wrong type argument: ein:$kernelspec, nil: defaulting language to python [3 times]
ein: [info] Notebook .ein-wolframlanguage12.ipynb is ready

This is the same attempt at running the example from before, but with the debugger on.

ein: [info] ein:jupyter-server--run: /home/river/anaconda3/bin/jupyter notebook --notebook-dir=/home/river/werk/mathematica/ --debug --no-browser
Code block evaluation complete.
ein: [info] Login to http://127.0.0.1:8888 complete.
ein: [verbose] Opened notebooklist at http://127.0.0.1:8888
Notebook .ein-wolframlanguage12.ipynb pending open!  Retry? (y or n) n
executing Ein-Wolframlanguage12 code block (034801d1-fd29-4d2c-ad46-b7c1d7a06282)...
Position saved to mark ring, go back with ‘C-c C-0’.
Code block evaluation complete. [2 times]
ein: [info] Login to http://127.0.0.1:8888 complete.
ein: [verbose] Opened notebooklist at http://127.0.0.1:8888
Notebook .ein-wolframlanguage12.ipynb pending open!  Retry? (y or n) y
ein: [verbose] Opened notebook .ein-wolframlanguage12.ipynb
ein: [info] Worksheet .ein-wolframlanguage12.ipynb is ready
ein: [verbose] ein:kernel-retrieve-session--success: kernel-id=fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e session-id=8cd26538-f74c-4054-8d0e-8dfc253854f6
ein: [verbose] WS start: ws://127.0.0.1:8888/api/kernels/fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e/channels?session_id=8cd26538-f74c-4054-8d0e-8dfc253854f6
scroll-up-command: End of buffer

from the ein:jupyter-server buffer

[D 17:06:20.173 NotebookApp] Searching ['/home/river/werk/mathematica', '/home/river/.jupyter', '/home/river/anaconda3/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[D 17:06:20.173 NotebookApp] Looking for jupyter_config in /etc/jupyter
[D 17:06:20.173 NotebookApp] Looking for jupyter_config in /usr/local/etc/jupyter
[D 17:06:20.173 NotebookApp] Looking for jupyter_config in /home/river/anaconda3/etc/jupyter
[D 17:06:20.173 NotebookApp] Looking for jupyter_config in /home/river/.jupyter
[D 17:06:20.174 NotebookApp] Looking for jupyter_config in /home/river/werk/mathematica
[D 17:06:20.174 NotebookApp] Looking for jupyter_notebook_config in /etc/jupyter
[D 17:06:20.174 NotebookApp] Looking for jupyter_notebook_config in /usr/local/etc/jupyter
[D 17:06:20.174 NotebookApp] Looking for jupyter_notebook_config in /home/river/anaconda3/etc/jupyter
[D 17:06:20.175 NotebookApp] Loaded config file: /home/river/anaconda3/etc/jupyter/jupyter_notebook_config.json
[D 17:06:20.175 NotebookApp] Looking for jupyter_notebook_config in /home/river/.jupyter
[D 17:06:20.175 NotebookApp] Looking for jupyter_notebook_config in /home/river/werk/mathematica
[D 17:06:20.373 NotebookApp] Paths used for configuration of jupyter_notebook_config: 
        /etc/jupyter/jupyter_notebook_config.json
[D 17:06:20.373 NotebookApp] Paths used for configuration of jupyter_notebook_config: 
        /usr/local/etc/jupyter/jupyter_notebook_config.json
[D 17:06:20.374 NotebookApp] Paths used for configuration of jupyter_notebook_config: 
        /home/river/anaconda3/etc/jupyter/jupyter_notebook_config.d/jupyterlab.json
        /home/river/anaconda3/etc/jupyter/jupyter_notebook_config.json
[D 17:06:20.374 NotebookApp] Paths used for configuration of jupyter_notebook_config: 
        /home/river/.jupyter/jupyter_notebook_config.json
[I 17:06:20.401 NotebookApp] JupyterLab extension loaded from /home/river/anaconda3/lib/python3.7/site-packages/jupyterlab
[I 17:06:20.401 NotebookApp] JupyterLab application directory is /home/river/anaconda3/share/jupyter/lab
[I 17:06:20.402 NotebookApp] Serving notebooks from local directory: /home/river/werk/mathematica
[I 17:06:20.402 NotebookApp] The Jupyter Notebook is running at:
[I 17:06:20.402 NotebookApp] http://localhost:8888/?token=c77398021313d64d01f99b0d1cea4ecd5c88b4a62a8ff375
[I 17:06:20.403 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 17:06:20.406 NotebookApp] 

    To access the notebook, open this file in a browser:
        file:///home/river/.local/share/jupyter/runtime/nbserver-32238-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=c77398021313d64d01f99b0d1cea4ecd5c88b4a62a8ff375
[I 17:06:21.264 NotebookApp] 302 POST /login (127.0.0.1) 1.67ms
[I 17:06:21.265 NotebookApp] 302 GET / (127.0.0.1) 0.45ms
[D 17:06:21.266 NotebookApp] Using contents: services/contents
[D 17:06:21.320 NotebookApp] Path base/images/favicon.ico served from /home/river/anaconda3/lib/python3.7/site-packages/notebook/static/base/images/favicon.ico
[D 17:06:21.321 NotebookApp] Path components/jquery-ui/themes/smoothness/jquery-ui.min.css served from /home/river/anaconda3/lib/python3.7/site-packages/notebook/static/components/jquery-ui/themes/smoothness/jquery-ui.min.css
[D 17:06:21.321 NotebookApp] Path components/jquery-typeahead/dist/jquery.typeahead.min.css served from /home/river/anaconda3/lib/python3.7/site-packages/notebook/static/components/jquery-typeahead/dist/jquery.typeahead.min.css
[D 17:06:21.321 NotebookApp] Path style/style.min.css served from /home/river/anaconda3/lib/python3.7/site-packages/notebook/static/style/style.min.css
[D 17:06:21.322 NotebookApp] Path components/es6-promise/promise.min.js served from /home/river/anaconda3/lib/python3.7/site-packages/notebook/static/components/es6-promise/promise.min.js
[D 17:06:21.322 NotebookApp] Path components/preact/index.js served from /home/river/anaconda3/lib/python3.7/site-packages/notebook/static/components/preact/index.js
[D 17:06:21.322 NotebookApp] Path components/proptypes/index.js served from /home/river/anaconda3/lib/python3.7/site-packages/notebook/static/components/proptypes/index.js
[D 17:06:21.322 NotebookApp] Path components/preact-compat/index.js served from /home/river/anaconda3/lib/python3.7/site-packages/notebook/static/components/preact-compat/index.js
[D 17:06:21.323 NotebookApp] Path components/requirejs/require.js served from /home/river/anaconda3/lib/python3.7/site-packages/notebook/static/components/requirejs/require.js
[D 17:06:21.324 NotebookApp] Path base/images/logo.png served from /home/river/anaconda3/lib/python3.7/site-packages/notebook/static/base/images/logo.png
[D 17:06:21.324 NotebookApp] Path tree/js/main.min.js served from /home/river/anaconda3/lib/python3.7/site-packages/notebook/static/tree/js/main.min.js
[D 17:06:21.328 NotebookApp] 200 GET /tree (127.0.0.1) 62.22ms
[D 17:06:21.365 NotebookApp] 200 GET /api (127.0.0.1) 0.84ms
[D 17:06:21.402 NotebookApp] Found kernel envname in /home/river/.local/share/jupyter/kernels
[D 17:06:21.402 NotebookApp] Found kernel wolframlanguage12 in /home/river/.local/share/jupyter/kernels
[D 17:06:21.402 NotebookApp] Found kernel python3 in /home/river/anaconda3/share/jupyter/kernels
[D 17:06:21.405 NotebookApp] 200 GET /api/kernelspecs (127.0.0.1) 4.18ms
[D 17:06:21.443 NotebookApp] 200 GET /api/contents (127.0.0.1) 3.27ms
[D 17:06:21.461 NotebookApp] 200 GET /api/sessions (127.0.0.1) 1.44ms
[D 17:06:21.503 NotebookApp] 200 GET /api/contents (127.0.0.1) 3.52ms
[D 17:06:21.507 NotebookApp] 200 GET /api/sessions (127.0.0.1) 1.98ms
[I 17:06:35.730 NotebookApp] 302 POST /login (127.0.0.1) 1.35ms
[I 17:06:35.731 NotebookApp] 302 GET / (127.0.0.1) 0.59ms
[D 17:06:35.733 NotebookApp] Using contents: services/contents
[D 17:06:35.734 NotebookApp] 200 GET /tree (127.0.0.1) 2.16ms
[D 17:06:35.777 NotebookApp] 200 GET /api/contents (127.0.0.1) 3.18ms
[D 17:06:35.817 NotebookApp] 200 GET /api/sessions (127.0.0.1) 0.87ms
[D 17:06:36.898 NotebookApp] 200 GET /api/contents/.ein-wolframlanguage12.ipynb (127.0.0.1) 18.43ms
[D 17:06:36.974 NotebookApp] Starting kernel: ['/usr/local/Wolfram/WolframEngine/12.0/Executables/WolframKernel', '-script', '/home/river/Downloads/WolframLanguageForJupyter-0.9.1/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl', '/home/river/.local/share/jupyter/runtime/kernel-fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e.json', 'ScriptInstall']
[D 17:06:36.979 NotebookApp] Connecting to: tcp://127.0.0.1:59849
[D 17:06:36.980 NotebookApp] Connecting to: tcp://127.0.0.1:37705
[I 17:06:36.982 NotebookApp] Kernel started: fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e
[D 17:06:36.983 NotebookApp] Kernel args: {'kernel_name': 'wolframlanguage12', 'cwd': '/home/river/werk/mathematica'}
[D 17:06:36.984 NotebookApp] 201 POST /api/sessions (127.0.0.1) 34.45ms
[D 17:06:37.044 NotebookApp] Initializing websocket connection /api/kernels/fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e/channels
[D 17:06:37.046 NotebookApp] Requesting kernel info from fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e
[D 17:06:37.047 NotebookApp] Connecting to: tcp://127.0.0.1:50625
No valid password found.
[I 17:06:39.983 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
[D 17:06:39.986 NotebookApp] Starting kernel: ['/usr/local/Wolfram/WolframEngine/12.0/Executables/WolframKernel', '-script', '/home/river/Downloads/WolframLanguageForJupyter-0.9.1/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl', '/home/river/.local/share/jupyter/runtime/kernel-fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e.json', 'ScriptInstall']
[D 17:06:39.994 NotebookApp] Connecting to: tcp://127.0.0.1:35715
No valid password found.
[I 17:06:42.995 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
[D 17:06:42.999 NotebookApp] Starting kernel: ['/usr/local/Wolfram/WolframEngine/12.0/Executables/WolframKernel', '-script', '/home/river/Downloads/WolframLanguageForJupyter-0.9.1/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl', '/home/river/.local/share/jupyter/runtime/kernel-fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e.json', 'ScriptInstall']
[D 17:06:43.006 NotebookApp] Connecting to: tcp://127.0.0.1:48699
No valid password found.
[I 17:06:46.007 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
[D 17:06:46.010 NotebookApp] Starting kernel: ['/usr/local/Wolfram/WolframEngine/12.0/Executables/WolframKernel', '-script', '/home/river/Downloads/WolframLanguageForJupyter-0.9.1/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl', '/home/river/.local/share/jupyter/runtime/kernel-fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e.json', 'ScriptInstall']
[D 17:06:46.016 NotebookApp] Connecting to: tcp://127.0.0.1:60523
No valid password found.
[I 17:06:49.019 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
[D 17:06:49.022 NotebookApp] Starting kernel: ['/usr/local/Wolfram/WolframEngine/12.0/Executables/WolframKernel', '-script', '/home/river/Downloads/WolframLanguageForJupyter-0.9.1/WolframLanguageForJupyter/Resources/KernelForWolframLanguageForJupyter.wl', '/home/river/.local/share/jupyter/runtime/kernel-fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e.json', 'ScriptInstall']
[D 17:06:49.030 NotebookApp] Connecting to: tcp://127.0.0.1:54187
No valid password found.
[W 17:06:52.031 NotebookApp] KernelRestarter: restart failed
[W 17:06:52.031 NotebookApp] Kernel fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e died, removing from map.
[W 17:07:37.091 NotebookApp] Timeout waiting for kernel_info reply from fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e
[D 17:07:37.093 NotebookApp] 101 GET /api/kernels/fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e/channels?session_id=8cd26538-f74c-4054-8d0e-8dfc253854f6 (127.0.0.1) 60049.94ms
[D 17:07:37.094 NotebookApp] Opening websocket /api/kernels/fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e/channels
[D 17:07:37.095 NotebookApp] Getting buffer for fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e
[E 17:07:37.095 NotebookApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e)
[D 17:07:37.117 NotebookApp] Received message on closed websocket '{"header":{"msg_id":"45d72680-a357-4864-a5e2-8494fa57b104","username":"username","session":"8cd26538-f74c-4054-8d0e-8dfc253854f6","version":"5.0","date":"2019-11-07T17:07:37","msg_type":"execute_request"},"metadata":{},"content":{"code":"__import__(\'sys\').stdout.write(__import__(\'os\').getcwd())","silent":true,"store_history":true,"user_expressions":{},"allow_stdin":true,"stop_on_error":false},"parent_header":{},"channel":"shell"}'
[D 17:07:37.119 NotebookApp] Received message on closed websocket '{"header":{"msg_id":"eecb967d-cb5e-495a-9c28-5e7e7cf01004","username":"username","session":"8cd26538-f74c-4054-8d0e-8dfc253854f6","version":"5.0","date":"2019-11-07T17:07:37","msg_type":"execute_request"},"metadata":{},"content":{"code":"__import__(\'sys\').stdout.write(__import__(\'socket\').gethostname())","silent":true,"store_history":true,"user_expressions":{},"allow_stdin":true,"stop_on_error":false},"parent_header":{},"channel":"shell"}'
[D 17:07:37.123 NotebookApp] Received message on closed websocket '{"header":{"msg_id":"2d24c91e-2e6a-40e1-bbab-94cc2a6fa34f","username":"username","session":"8cd26538-f74c-4054-8d0e-8dfc253854f6","version":"5.0","date":"2019-11-07T17:07:37","msg_type":"execute_request"},"metadata":{},"content":{"code":"\\"\\"\\"\\nPython utilities to use it from ein.el\\n\\nCopyright (C) 2012- Takafumi Arakaki\\n\\nAuthor: Takafumi Arakaki <aka.tkf at gmail.com>\\n\\nein.py is free software: you can redistribute it and/or modify\\nit under the terms of the GNU General Public License as published by\\nthe Free Software Foundation, either version 3 of the License, or\\n(at your option) any later version.\\n\\nein.py is distributed in the hope that it will be useful,\\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\\nGNU General Public License for more details.\\n\\nYou should have received a copy of the GNU General Public License\\nalong with ein.py.  If not, see <http://www.gnu.org/licenses/>.\\n\\n\\"\\"\\"\\n\\n\\ndef __ein_export_nb(nb_json, format):\\n    import IPython.nbconvert as nbconvert\\n    import IPython.nbformat as nbformat\\n    nb = nbformat.reads(nb_json, nbformat.NO_CONVERT)\\n    output = nbconvert.export_by_name(format, nb)\\n    print(output[0])\\n\\n\\ndef __ein_find_edit_target_012(*args, **kwds):\\n    from IPython.core.interactiveshell import InteractiveShell\\n    inst = InteractiveShell.instance()\\n    return inst._find_edit_target(*args, **kwds)\\n\\n\\ndef __ein_find_edit_target_013(*args, **kwds):\\n    from IPython.core.interactiveshell import InteractiveShell\\n    inst = InteractiveShell.instance()\\n    return CodeMagics._find_edit_target(inst, *args, **kwds)\\n\\n\\ndef __ein_find_edit_target_python(name):\\n    from inspect import getsourcefile, getsourcelines\\n    try:\\n        obj = eval(name)\\n    except NameError:\\n        return False\\n    else:\\n        sfile = getsourcefile(obj)\\n        sline = getsourcelines(obj)[-1]\\n        if sfile and sline:\\n            return(sfile, sline, False)\\n        else:\\n            return False\\n\\ntry:\\n    from IPython.core.magics import CodeMagics\\n    __ein_find_edit_target = __ein_find_edit_target_013\\nexcept ImportError:\\n    __ein_find_edit_target = __ein_find_edit_target_012\\n\\ndef __ein_set_figure_size(*dim):\\n    try:\\n        from matplotlib.pyplot import rcParams\\n        rcParams[\'figure.figsize\'] = dim\\n    except:\\n        raise RuntimeError(\\"Matplotlib not installed in this instance of python!\\")\\n\\ndef __ein_find_source(name):\\n    \\"\\"\\"Given an object as string, `name`, print its place in source code.\\"\\"\\"\\n    # FIXME: use JSON display object instead of stdout\\n    ret =  __ein_find_edit_target_python(name) or __ein_find_edit_target(name, {}, [])\\n    if ret:\\n        (filename, lineno, use_temp) = ret\\n        if not use_temp:\\n            print(filename)\\n            print(lineno)\\n            return\\n    raise RuntimeError(\\"Source code for {0} cannot be found\\".format(name))\\n\\n\\ndef __ein_run_docstring_examples(obj, verbose=True):\\n    from IPython.core.interactiveshell import InteractiveShell\\n    import doctest\\n    inst = InteractiveShell.instance()\\n    globs = inst.user_ns\\n    return doctest.run_docstring_examples(obj, globs, verbose=verbose)\\n\\n\\ndef __ein_maybe_undefined_object(obj, locals=None):\\n    try:\\n        return eval(obj, None, locals)\\n    except Exception:\\n        return None\\n    except SyntaxError:\\n        return None\\n\\ndef __ein_print_object_info_for(obj):\\n    import IPython.core.oinspect\\n    import json\\n\\n    inspector = IPython.core.oinspect.Inspector()\\n\\n    try:\\n        print(json.dumps(inspector.info(obj)))\\n    except Exception:\\n        print(json.dumps(inspector.info(None)))\\n\\ndef __ein_eval_hy_string(obj):\\n    try:\\n        import hy\\n    except ImportError:\\n        print(\\"Hy not supported in this kernel. Execute `pip install hy` if you want this support.\\")\\n\\n    expr = hy.read_str(obj)\\n    ret = hy.eval(expr)\\n\\n    return ret\\n","silent":true,"store_history":true,"user_expressions":{},"allow_stdin":true,"stop_on_error":false},"parent_header":{},"channel":"shell"}'
[D 17:07:37.125 NotebookApp] Websocket closed fe1fa17d-20f7-46d3-a9f4-3bcf3c998d5e:8cd26538-f74c-4054-8d0e-8dfc253854f6

And here is the output from the ein:dev-bug-report-template function

("EIN system info"
 :emacs-version
 "GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.8)
 of 2019-09-16"
 :emacs-bzr-version nil
 :window-system x
 :emacs-variant nil
 :os
 (:uname
  "Linux altar-of-confusion 5.0.0-32-generic #34-Ubuntu SMP Wed Oct 2 02:06:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
"
  :lsb-release
  "No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:    19.04
Codename:   disco
")
 :notebook
 "Name: notebook
Version: 5.7.8
Summary: A web-based notebook environment for interactive computing
Home-page: http://jupyter.org
Author: Jupyter Development Team
Author-email: jupyter@googlegroups.com
License: BSD
Location: /home/river/anaconda3/lib/python3.7/site-packages
Requires: ipython-genutils, traitlets, nbconvert, jupyter-client, prometheus-client, Send2Trash, jupyter-core, nbformat, tornado, pyzmq, jinja2, terminado, ipykernel
Required-by: widgetsnbextension, jupyterlab, jupyterlab-server, jupyter
"
 :ipython "7.8.0
"
 :image-types
 (svg imagemagick png gif tiff jpeg xpm xbm pbm postscript)
 :image-types-available
 (svg imagemagick png gif tiff jpeg xpm xbm pbm postscript)
 :request
 (:backend curl)
 :ein
 (:version "20191029.228"
       :source-dir "/home/river/.emacs.d/elpa/ein-20191029.228/")
 :lib
 ((:name "websocket"
     :path "~/.emacs.d/elpa/websocket-20191017.30/websocket.elc"
     :featurep t
     :version-var websocket-version
     :version "1.11.1")
  (:name "auto-complete"
     :path "~/.emacs.d/elpa/auto-complete-20170125.245/auto-complete.elc"
     :featurep t
     :version-var nil
     :version nil)
  (:name "request"
     :path "~/.emacs.d/elpa/request-20191022.615/request.elc"
     :featurep t
     :version-var request-version
     :version "0.3.0")
  (:name "deferred"
     :path "~/.emacs.d/elpa/deferred-20170901.1330/deferred.elc"
     :featurep t
     :version-var deferred:version
     :version "0.5.0")
  (:name "polymode"
     :path "~/.emacs.d/elpa/polymode-20190714.2017/polymode.elc"
     :featurep t
     :version-var nil
     :version nil)
  (:name "markdown-mode"
     :path "~/.emacs.d/elpa/markdown-mode-20190802.2215/markdown-mode.elc"
     :featurep nil
     :version-var nil
     :version nil)
  (:name "dash"
     :path "~/.emacs.d/elpa/dash-20191102.2142/dash.elc"
     :featurep t
     :version-var nil
     :version nil)
  (:name "s"
     :path "~/.emacs.d/elpa/s-20180406.808/s.elc"
     :featurep t
     :version-var nil
     :version nil)
  (:name "skewer-mode"
     :path "~/.emacs.d/elpa/skewer-mode-20180706.1807/skewer-mode.elc"
     :featurep t
     :version-var nil
     :version nil)))

I'm not a wizard with emacs by any stretch and I feel like I'm missing some obvious variable that needs setting right - I've followed what I could from other issues but I've found myself in deeper waters I can't make sense of. Can anyone set me right here?

dickmao commented 4 years ago

I would not follow #405 as that information predates many code changes.

I would reinstall EIN with the latest code and M-x customize-group RET ein and modify "Ob Ein Languages" to add ("ein-wolframlanguage12" . wolfram) or add this to your .emacs or init.el.

(custom-set-variables
 '(ob-ein-languages
   (quote
    (("ein" . python)
     ("ein-python" . python)
     ("ein-R" . R)
     ("ein-r" . R)
     ("ein-julia" . julia)
     ("ein-wolframlanguage12" . wolfram)))))