[Cantor] Python back-end interpreter path

Alexander Semke alexander.semke at web.de
Fri Aug 13 19:20:32 BST 2021

On Freitag, 13. August 2021 16:33:11 CEST Marcello Massaro wrote:
> If I open a clean Cantor worksheet, with "Python" set as default
> backend, the output of sys.version is 3.8.10. I assume Cantor simply
> resolves/uses /usr/bin/python3 then.
Cantor loads python's version specific shared library, for example
libpython3.6m.so.1.0, embedds with this the interpreter directly and doesn't
talk to the executable 'python' which is also kind of a frontend for this
shared library. So, Cantor is using the version it was linked against. If you
installed Cantor from the repository of your distribution, it's using the
"system" version of python that was used during the compile and link steps.
The same situation we also have for R and for Julia.

Right now, the only option to make Cantor using a different version of R/
python/julia is to re-compile it using that version. If we want to be able to
specify the interpreter at runtime we'll need to change the logic in Cantor
for these languages and to talk to their "executables" like we do this already
for Maxima, Octave, Scilab, etc. This is a somewhat bigger refactoring...


More information about the kde-edu mailing list