-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No org-babel-execute function for jupyter-python #306
Comments
Have you defined a |
Could you point me to the part in the readme where it states that? Applying the following yields the same error
Gives |
The section I think the problem then lies somewhere with the config - |
Hmm it is strange. The value is set correctly but I don't see the listing in the source-code. However the source code section doesn't list org-babel-load-languages
edit: for clarity, removing |
I believe that's the problem - that's clearly not the list you defined up top. |
I have looked at this and #251 but both suggestions don't do anything for me. My
I am presuming now Installing jupyter on my system python seems a bit odd. |
If it helps any
|
About About you seeing REPLs and servers running with |
I don't have a function/variable
|
OK, last thing to try before I'm at a loss: (use-package jupyter
:demand t
:after (:all org python)) Can you, in the scratch buffer, manually do |
Ah now we are getting somewhere. If I run The wombo-combo that seem to produce at least some output now looks like
Now syntax highlighting is also recognized (!) |
Interesting. Why do you manually require |
Few hours later and a reboot of emacs I can't seem to replicate the results I was having.
|
:/ sorry, I'm out of my depth now. It is possible it's an issue with I would wager the actual problem lies with the order in which packages are installed and then loaded. There may be some problems in there with deferred package loading (where you have it installed but another package, ie. jupyter, relies on org-babel to be loaded) as well. |
I got it to work! This link helped me. The thought that doom was just a 'light' layer on top of emacs but the comments above here show that it may actually modify it a bit more than I thought it did. adding Thanks everyone for the help! |
I stumbled on this issue when I was trying to solve this problem as well. I'm using Doom Emacs, but I wanted to use the standard emacs-jupyter package rather than the customized config provided by the fix above. Here's the problem, which took me days to find. Doom adds an advice on top of So I fixed it by removing the advice:
I'm sure there's supposed to be a better doom-y way of doing this involving autoloading something, but that's beyond my capabilities right now. Regardless, this seems to work great, and I'll wager this is exactly the problem @cvanelteren was having. |
@dmusican ;;; Inside (use-package! org ...) clause.
(after! (:and ob-async org-src)
(dolist (lang '(rust C typescript julia)) ;; FIXME: Replace your prefer language for jupyter.
(cl-pushnew (cons (format "jupyter-%s" lang) lang)
org-src-lang-modes :key #'car)))
;; Set some default header arguments for example.
(setq org-babel-default-header-args:sh '((:results . "output replace"))
org-babel-default-header-args:bash '((:results . "output replace"))
org-babel-default-header-args:shell '((:results . "output replace"))
org-babel-default-header-args:markdown '((:results . "output replace"))
org-babel-default-header-args:jupyter-rust '((:results . "output replace")
(:kernel . "rust")) IMPORTANT! You need to check Jupyter and Jupyter kernel first. If you don't have jupyter python module or any jupyter kernel matched, pip install jupyter # or jupyterlab
jupyter kernelspec list |
I get this error (
What other libraries should I load? |
I solved my issue by doing all of these: (require 'org-src)
(require 'ob-async)
(require 'ob-jupyter)
(require 'jupyter)
(require 'jupyter-org-client)
(after! (ob-jupyter)
(org-babel-jupyter-aliases-from-kernelspecs)) |
I am running vanilla Emacs and ran into the same problem. Running |
I am trying to get
ob-jupyter
working under org-mode. Source code blocks keep returningNo org-babel-execute function for jupyter-python
after evaluatingC-c C-c
.My config contains
example source block (from readme):
jupyter-server-list-kernels
shows multiple active kernels @localhost:8888I can connect to a
repl
but I would love to be able to run code directly from org, how do I achieve that?The text was updated successfully, but these errors were encountered: