Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 11-01-2024, 12:59 PM   #16
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,055
Karma: 199770456
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by darkbreath View Post
Ah I see it. I didn't fully understand that part of the instructions at first, but I did some reading about pip afterward, and I see what it meant now.

When I tried to install the package, I ran into that PEP 668 error and realized that I could potentially break os Python packages if I proceeded. Is there another option such as maybe installing a version of Python in Conda or some other virtual environment, then pointing Sigil there?
Yes. If you have a virtual environment with all the necessary modules installed to it, you can point Sigil to the python binary in the virtual one in Sigil's preferences.

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.
DiapDealer is offline   Reply With Quote
Old 11-01-2024, 10:09 PM   #17
darkbreath
Enthusiast
darkbreath began at the beginning.
 
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.
darkbreath is offline   Reply With Quote
Advert
Old 11-01-2024, 11:10 PM   #18
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
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.
DiapDealer is offline   Reply With Quote
Old 11-02-2024, 11:59 AM   #19
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
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.
DiapDealer is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 07:33 PM.


MobileRead.com is a privately owned, operated and funded community.