Mostly, yes. Sigil uses Python in two different ways. It uses Python embedded in C++. This will be what's in your system Python. Cmake finds this when configuring/compiling Sigil. The modules needed to successfully run Sigil are listed first in the documentation. If they are not installed in your system Python, Sigil will fail to launch:
lxml
six
css-parser
dulwich
Sigil then uses Python externally for plugins. We bundle Python with the Windows and macOS versions of Sigil with a set of Python modules that plugin developers can reliably count on to be present when creating plugins. Users of Sigil on Linux need to make sure the Python they use to run plugins has these modules if they want to successfully use existing 3rd-party plugins. In addition to the first set of Python modules required to run Sigil, the second group of modules listed in the documentation need to be available to the Python interpreter used to run plugins with Sigil:
tk
PySide6
html5lib
regex
pillow
cssselect
chardet
So if you don't wish to pollute your system Python with modules that cannot be installed from your distro's package repositories, then you need to make sure all of the above (both sets of) modules are installed in the virtual Python you set up to run Sigil plugins.
And yes... they will all need to be installed from pypi.org using pip install. You cannot install your distro's repo-packaged versions of the Python modules in virtual Pythons
I've never used Conda. I would just use Python's builtin venv to create a virtual Python in my home directory. Then I'd use pip in the virtual Python to install to the standardized set of modules that the testplugin is looking for.
Adherence to PEP 668 will undoubtedly create a lot of duplication and maintenance overhead. That's why I'd just use sudo pip install PySide6 (overriding any PEP668-related objections) on systems that don't package PySide6 in their repositories. But your mileage may vary.
Last edited by DiapDealer; 11-01-2024 at 10:25 PM.
|