Gentoo Linux relies heavily on Python. So, for projects which necessitate adding additional python libraries via pip, the recommended procedure is to create a custom virtualized python environment outside of root where you can do as you please and not alter the system’s python. See Python/Virtual environment (ArchWiki article) - Isolated Python’s environment, enabling sandboxed installation of packages.
I created such a virtual environment named “map”. Also, I installed various Gentoo packages for jupyter and then entered my customized python environment with:
source map/bin/activate
and then I launched:
jupyter lab
which starts up and presents me a tab in my browser with Jupyter. I then tried to install an extension, jupyterlab-sql-explorer “A JupyterLab extension for Database” and it appears the installer attempted to install the extension into Gentoo’s base python and the installation was duly rejected by whatever Gentoo scripts act as sentries to the core Python instance.
So I tried installing the extension using pip in my virtual environment and successfully did so. I had hoped that by installing it via pip in my customized python environment, the jupyter instance would see that and then utilize it, but that did not happen. I’m here in this discourse forum because I do not know where the issue ought to be logged.
What I think should happen is that the python instance used to launch the jupyter instance should be used for installation of extensions, not just what it finds as the system’s python. This will allow jupyter and its extensions to play nicely in environments where the main operating system’s Python is being isolated. Under what project should I file this issue and fully document it?
This could be a Gentoo issue since I used Gentoo packages for jupyter. . It may be that I should not use Gentoo’s jupyter packages, but instead install jupyter via pip in the virtual environment. If this is the case, then I’d like to document it on the Gentoo forum.