RuntimeError("tk.h version (%s) doesn't match libtk.a version (%s)"

Dear Experts,
I have installed the latest Flair and FLUKA version on a Centos7 cluster.
I managed to install all the Python packages requested (tkinter, pillow, scipy, dicom, …)
but still, I get this runtime error:

<<raise RuntimeError(“tk.h version (%s) doesn’t match libtk.a version (%s)”
RuntimeError: tk.h version (8.4) doesn’t match libtk.a version (8.5)?>>

I tried to install different versions of tkinter (8.5.13 and 8.5.19) as well as to use two different versions of Python3 (3.6 and 3.8.). I am using gcc.7.4.0.
Any help is highly appreciated.
Thanks in advance!

Dear Beatrice,

after some googling, it seems this is an issue with pyenv. Did you use it to install Python?

Cheers,
David

Dear David,
thank you for the quick reply!
No, I did not use pyenv.
The latest and default version of Python3 in my cluster is 3.6. With that version, after successfully running the installation command:

python3 -m pip install tk==0.1.0 --user --upgrade

I tried importing tkinter in a Python demo, and it couldn’t find the pkg.

Thus, I guessed it was a Python-version problem and installed Python3.8 (not centrally since I do not have root privileges) without pyenv: I configured the installation folder using: ./configure --prefix=… . The installation of Python3.8 went fine as well as the installation of all the libraries required for FLUKA/Flair.

With this Python version (3.8) I can import tkinter, but I get the error in the object.

Thanks again in advance,

Beatrice

Dear Beatrice,

unfortunately, it is almost impossible to solve your issue remotely since it relates to your Python installation. I suggest you contact the administrator of your cluster for help.

By the way, the command: python3 -m pip install tk==0.1.0 --user --upgrade is not for installing tkinter but some package related to TensorKit.

Cheers,
David