There are some problems with the code in your link:
a) There is a confusion on python packages - in Emacs there are several: The built-in one,
python, authored by F.Gallina and python-mode authored by A.Rohler. So you need
to remove the python-mode package - AFAIK there are not any info this is supported by lsp.
b)The initialization must be in this mode:
It works for me just by commenting out variable ac-source-pycomplete in auto-complete-setting.el while leaving everything intact. Then, Jedi mode takes care of AC in
; hack to fix ac-sources after pycomplete.el breaks it
(setq ac-sources '(;; ac-source-pycomplete
I have no knowledge about elpy and the like. However, some observations:
py.test is not found because its location is not mentioned in the remote $PATH
The call of py.test comes with a remote file name /ssh\:remote\:/home/.... This looks wrong.
I recommend to contact the author(s) of elpy whether it is prepared for remote activation.
I'm not sure I have an answer, but I may have a clue.
There are actually two emacs packages that provide python support. One is provided by GNU, and lives in a file called python.el; one is not part of GNU (copyright issues, apparently) and lives in a file called python-mode.el.
Aquamacs provides both:[*]
The non-gnu one: /Applications/Aquamacs.app/Contents/...
I'm a little late but I just figured out a pretty neat way to do this using :file and without using :var.
As the other anwser already pointed out plt.show() doesn't produce output.
However you can use :results output file instead of :results file (which is the same as :results value file). This means that the data to create the image is taken from stdout ...
The python implementation in Org babel has a couple of long-standing problems:
If you specify :results value, then the body is implicitly wrapped in a function and you have to add a return statement to indicate the value of the block - but only if you are not using a session.
If you specify :`:results value but you use a session, you have to wrap the body ...