11-01-2024, 12:59 PM | #16 | |
Grand Sorcerer
Posts: 28,055
Karma: 199770456
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
But since Ubuntu/Mint doesn't provide their own PySide6 package in their repos, there's very little chance that anything will break. I'm not a big fan of PEP 668, or it's notion to try and prevent people from installing modules to the system python. I dislike any kind of organized Linux practice that exists to save users from themselves. I also find the idea of needing to keep track of scads of virtual python environments a bit preposterous. I've never broken my system python by installing modules with sudo pip in the 30+ years I've been doing it. But everyone is free to override (or abide by) PEP 668 as they see fit. |
|
11-01-2024, 10:09 PM | #17 |
Enthusiast
Posts: 36
Karma: 10
Join Date: Apr 2016
Device: none
|
I've made important progress. I figured out how to use Conda, and I also found my Python interpreter path in a new environment I created.
Did I install all of those Python packages (sudo apt-get install) for nothing? If I set Sigil's "Path to Interpreter Executable" to the Conda interpreter, it seems to me that all the packages listed under the "Getting Python 3.9+" section in the "Building Sigil on Linux with Qt6" guide won't be used. Am I right about this? My hunch says yes. Among the errors I see in the plugin with the Conda venv are these: Python Package: cssselect Missing Python Package: css-parser Missing Python Package: html5lib Missing Python Package: lxml Missing Python Package: regex Missing Python Package: chardet Missing Some of these packages have identical names to the packages the guide said to install with apt-get. They weren't previously missing when my Sigil interpreter was set to /usr/bin/python3. If I'm right, then I can take this a step further. Would I be exclusively running "pip install" inside the venv? I'm not sure the venv understands distro specific commands such as apt-get and pacman. Last edited by darkbreath; 11-01-2024 at 10:20 PM. |
Advert | |
|
11-01-2024, 11:10 PM | #18 |
Grand Sorcerer
Posts: 28,055
Karma: 199770456
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
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 11:25 PM. |
11-02-2024, 11:59 AM | #19 |
Grand Sorcerer
Posts: 28,055
Karma: 199770456
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I updated the Linux build documentation with info on creating a virtual Python environment for running plugins. The main build documentation stops you before installing all of the extra modules (not needed for running Sigil) and offers a link to setting up a virtual Python instead. https://github.com/Sigil-Ebook/Sigil...Environment.md
Last edited by DiapDealer; 11-02-2024 at 12:15 PM. |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
No errors found in calibre, but epub check found errors | LarkinJM | ePub | 3 | 03-03-2020 05:51 PM |
Errors Starting Calibre 3.0 in Linux Mint 18 | MontyJ | Calibre | 26 | 11-04-2017 07:43 PM |
Flightcrew says Errors, but Sigil says no Errors… | Barcelona | Sigil | 4 | 02-09-2012 08:13 AM |
How do I report minor errors or make corrections? | Wetdogeared | Upload Help | 7 | 05-06-2009 01:10 PM |
Make: HOW TO - Make PDFs for the Sony Reader (Ebook e-ink device) | kalivoodoo | Sony Reader | 6 | 02-01-2007 12:56 PM |