Mobileread
EPubtidyTool help
#1  Gandulf 12-02-2020, 07:16 AM
Installed the test plugin and managed to install the things that gave errors, but EPubtidyTool says cannot import PIL library.

Using Ubuntu 20.04.1 LTS. I have installed the pil library in terminal.

Can anyone help please.

1 irritating thing about the plugin is the windows it opens always open on my 2nd screen and that is a TV that is usally switched off.
Reply 

#2  KevinH 12-02-2020, 07:48 AM
Yes the PIL module is a requirement for Sigil. It is shipped with the Python3 version that is embedded in Sigil on Windows and Mac. Some Linux distributions for some strange reason decided that Plugin support was somehow "optional" and made those packages "optional" in the install. Not really sure why. Plugin support has been around for over 5 years and is not going away and there are many many very useful plugins.

As for the windows it opens, not sure about that. It really depends on how the tk gui or pyqt5 gui used by the plugin determeines which is the main display and which is not. It can also be related to your Desktop/WM thinking space is available on the second monitor and deciding to use it. I have found that is I have more than one monitor on almost any system connected on the boot of the machine, then it is a very good idea to have them turned on at all times for this very reason.
Reply 

#3  Doitsu 12-02-2020, 07:54 AM
Quote Gandulf
Installed the test plugin and managed to install the things that gave errors, but EPubtidyTool says cannot import PIL library.
I tested it on my Arch Linux machine and it works fine. AFAIK, PIL has some image library dependencies.

To find out what depencies are missing, open a terminal and enter the following:

Code
python3
from PIL import Image, ImageTk
You should get some kind of error message.

Most likely you'll have to install libjpeg.

Also note that you'll need to install Pillow not PIL
(Pillow is a fork of PIL that kept the PIL import name for backwards compatibility.)

On my machine the following packages are installed:
Pillow 7.2.0
libjpeg-turbo 2.0.5-3
Reply 

#4  Gandulf 12-02-2020, 01:43 PM
Seems one must uninstall pil and then install pillow, thanks.
Reply 

Today's Posts | Search this Thread | Login | Register