Python-imaging-tk no longer available for CentOS 8

Hallo
I did fresh installation of Flair/Fluka “check_fluka.sh” checking python imaging (please scroll down for the error)
I am finding I need “python-imaging-tk”. But unfortunately this pkg is no longer available for Redhat 8.
It was last given in Redhat 6. Latest Python Imaging Library (PIL) is supported through “Pillow”

So how could I go by eliminating the error or perhaps make use of the “pillow” …

============================== ERROR ==============================

Python imaging library is missing

Install the latest ‘python imaging’ and its tk interface compatible with your python

Possible commands (as superuser):

Fedora, RedHast, Scientific Linux, CentOS, Suse:

dnf -y install python-imaging-tk

Ubuntu, Debian:

apt install python-imaging-tk

MacOS (Macport recommended):

port install py37-Pillow

======================================================================

Thanks

Arthur

Dear Arthur,

you are correct, the Python Imaging Library is now only supported by it’s fork Pillow on modern Linux distribution. (The error message should be updated in the script)

For RHEL 8, the names of the relevant packages are:

  • python3-pillow
  • python3-pillow-tk

After installing these, there shouldn’t be any issue.

Cheers,
David

Thanks David,

Then I assume your validation script ought to be modified, i.e. “check_fluka.sh”.
I have installed on CentOS 8.3 the following RPMs:

rpm -qa | grep flair

flair-3.1-8.noarch
flair-geoviewer-3.1-8.x86_64
fluka-4-1.1.x86_64 (using the source => fluka-4-1.1.Linux-gfor9.x86_64.rpm

Also, I have the following critical dependencies for PIL:

rpm -qa | grep python3-pillow

python3-pillow-7.0.0-5.fc32.x86_64
python3-pillow-tk-7.0.0-5.fc32.x86_64

But my Flair spits out the following msg:

Started 2021.02.23 07:06:20

w> Warning: Geometry Viewer not found
e> ERROR: /lib64/libm.so.6: version `GLIBC_2.29’ not found (required by /usr/local/flair/geoviewer.so)
w> Warning: PIL.Image and PIL.ImageTk not found

Appreciate your feedback.
Cheers
Arthur

Hello David,
Should these errors in the Flair console are benign messages so should we disregard?
w> Warning: Geometry Viewer not found
e> ERROR: /lib64/libm.so.6: version `GLIBC_2.29’ not found (required by /usr/local/flair/geoviewer.so)
w> Warning: PIL.Image and PIL.ImageTk not found

Thanks
Arthur

Dear Arthur,

No, these are relevant messages.

It looks like, the precompiled package of Flair-Geoviewer is not compatible with Centos 8 since it only has glibc version 2.28.

However, you should be able to compile it from the .tgz package. To do so you will need some extra packages, like:

  • python36-devel
  • tk-devel
  • libX11-devel

This should fix the first warning and error message.

About the second warning message. Do you still get an error message with the check_fluka.sh script after installing pillow?

If yes, it could mean, there there are multiple python3 installed. Can you check the output of these commands:

python3 --version
which python3

Cheers,
David

Thanks David.
I have the following dependencies installed:

# cat /etc/redhat-release 
CentOS Linux release 8.3.2011

# python3
Python 3.6.8 (default, Aug 24 2020, 17:57:11)     <<<<< python3
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.

# python3 --version
Python 3.6.8

# rpm -qa | grep python3 | grep devel
python36-devel-3.6.8-2.module_el8.3.0+562+e162826a.x86_64

# rpm -qa | grep tk-devel
tk-devel-8.6.8-1.el8.x86_64

# rpm -qa | grep libX11-devel
libX11-devel-1.6.8-3.el8.x86_64

# rpm -qa | grep glibc-devel
glibc-devel-2.28-127.el8.x86_64

I will do the compilation … in a little while and update you the status.

Thanks & Stay tuned.
-Arthur

Hi David,
I haven’t got back to building the binary yet. I noticed when I cut and paste the RPMs they appear on the forum page with a special emphasis … I have no control over that … and it wasn’t intentional.

Thanks
Arthur

Hello David,

I have build Flair and flair-overview from 3.1.8.tgz files.
I have the PIL installed from RPMs …
$ rpm -qa | grep pillow
python3-pillow-7.0.0-5.fc32.x86_64
python3-pillow-tk-7.0.0-5.fc32.x86_64

I think the “check_fluka.py” generates errors … I think you mentioned that the script was written to check “python-imaging-tk” …
By building from flai/geoviewer-3.1.8.tgz I used glibc2.28 …
So I don’t see glibc errors …anymore.

Here is the “check_fluka.py” output:

check_fluka.py

Checking python
Version: 3.6-8 ok

Checking python tkinter module
tkinter found

Checking tk library
Tk Version= 8.6 ok

Checking python imaging
============================== ERROR ==============================
Python imaging library is missing

Install the latest ‘python imaging’ and its tk interface compatible with your python
Possible commands (as superuser):
Fedora, RedHast, Scientific Linux, CentOS, Suse:
dnf -y install python-imaging-tk <<< replaced by “python3-pillow-tk” pkg
Ubuntu, Debian:
apt install python-imaging-tk
MacOS (Macport recommended):
port install py37-Pillow

======================================================================

Thanks
Arthur

Dear Arthur,

I think I saw the problem.

you have the following packages installed:

python3-pillow-7.0.0-5.fc32.x86_64
python3-pillow-tk-7.0.0-5.fc32.x86_64

but those are for Fedora 32, quite likely they are incompatible with CentOS 8.

I found the necessary packages for RHEL 8 but not for Centos 8, and I don’t know if they are compatible or even publicly available.

However there is an easy solution. You can install Pillow from pypi with the command:

pip3 install -U Pillow

This should solve the issue.

Cheers,
David

A post was split to a new topic: Missing gfortran - CentOS 8