Registered Member
|
I saw a recent KDE blogpost, and decided to try Cantor as an interface for jupyter notebooks.
The main issue I noticed was that I couldn't import packages (numpy, matplotlib) that I know work when I invoke python from a shell. I had trouble with the snaps and flatpaks, and figured this had to do with sandboxing, as I still don't quite understand what these (snap/flatpak) actually do. So I've gone back to the binary packages on my distribution repos. On a computer with Kubuntu 22.04, I was able to install the cantor package and then the cantor-python package that installed the python backend. This seemed to work, and things were matching. The python executable and modules available were matching what I access in a terminal --- This is what my expected behavior is! On a computer with Rocky Linux 8 (a RHEL clone), it's quite a bit more confusing. From their repos, I've installed cantor (19.12.2) and the package "python3-cantor" that installs the python backend. On this system, I use anaconda as my python binary. There is a strange discrepancy though between the output from within cantor and the output from invoking python with a shell. Example python code:
Cantor output:
Shell output:
(The executables listed above are all symlinked to a python3.9 binary in the same directory) I'm confused as to why the executables are listed as the same, but the versions are entirely different. The `sys.path` list is also different, which I suspect is why I cannot import various modules from within cantor. Cantor seems to be running a python 3.6 executable and library/modules. I guess my question is how does cantor select its python executable? Is this an environment variable I can set, or a setting I can choose? I don't really see any options in the GUI settings of Cantor itself. I'm also curious if I can use the snap or flatpak version, but point the python binary and libraries to the system libraries I use. And with a bit more searching I do have a python3.6 file located at `/usr/bin/python3.6` which ultimately points to `/usr/libexec/platform-python3.6`. I'm guessing that somehow cantor ends up running this, but would like to be able to specify my preferred python. Thanks, any help is appreciated! I very well may just be confused about something or missing a step in the configuration, but I couldn't find much in the documentation. |
Registered users: Bing [Bot], Google [Bot], kesang, Yahoo [Bot]