Re: [Cantor] Python back-end interpreter path

Alexander Semke <[email protected]> Fri, 13 Aug 2021 20:20:32 +0200
Newsgroups gmane.comp.kde.devel.education
Message-ID <2336571.jE0xQCEvom__12279.2652504117$1628878857$gmane$org@linux-2rd5>
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 Canto=
r
for these languages and to talk to their "executables" like we do this alr=
eady
for Maxima, Octave, Scilab, etc. This is a somewhat bigger refactoring...

=2D-
Alexander