Org-Babel

Doom Emacs config'd for Python

Alter your doom block in init.el:

(doom! 
    ...
    :lang 
    (python +lsp +pyright +conda)
    ...)

I recommend pyright, is snappier than pyls..

you’ll also need lsp enabled in your tools, I also have +peek

(doom! 
    ...
    :tools
    (lsp +peek)
    ...)

for more info, hit <space> h d m lsp<CR>

Alter your config.el (I use miniforge to get mamba and conda):

                                        ; Conda
(use-package! conda
  :config
  (setq conda-anaconda-home (expand-file-name  "~/mambaforge"))
  (conda-env-initialize-interactive-shells)
  (conda-env-initialize-eshell)
  (conda-env-autoactivate-mode t)
  (add-hook 'find-file-hook (lambda () (when (bound-and-true-p conda-project-env-path)
                                    (conda-env-activate-for-buffer)))))

Once that’s done, hit <space> h r r and your ready to go.