Jan-17-2023, 11:32 AM
(This post was last modified: Jan-17-2023, 10:26 PM by Larz60+.
Edit Reason: fixed bbcode tags
)
I am trying to run my program on a Linux unit, knowing that the code works on OSx and Windows.
I keep encountering the same issue, which relates to PIL and the ImageTk.py file - it doesn't exist.
I am getting the following error message:
I have gone to the location defined by the error message and there is certainly no
I have checked the comments online but all the fixes using
I'm struggling to know where to look now; or what to do.
This is a work computer and not a personal one. I have SUDO access and am running Fedora 5.17.12-100.fc34.x86_64. I am running pip 22.3.1 and Python 3.9.13. Matplot is 3.6.3.
Since it is Fedora I have replaced apt-get with dnf, to no avail.
Any ideas?
I keep encountering the same issue, which relates to PIL and the ImageTk.py file - it doesn't exist.
I am getting the following error message:
Error:Traceback (most recent call last):
File "/home/gn95/Documents/15.01.2023/main.py", line 4, in <module>
from GraphCreate import *
File "/home/gn95/Documents/15.01.2023/GraphCreate.py", line 7, in <module>
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
File "/home/gn95/.local/lib/python3.9/site-packages/matplotlib/backends/backend_tkagg.py", line 1, in <module>
from . import _backend_tk
File "/home/gn95/.local/lib/python3.9/site-packages/matplotlib/backends/_backend_tk.py", line 14, in <module>
from PIL import Image, ImageTk
ImportError: cannot import name 'ImageTk' from 'PIL' (/usr/lib64/python3.9/site-packages/PIL/__init__.py)
I have tried sudo apt-get install python3-pil python3-pil.imagetk
and got...Output:Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package python3-pil
E: Unable to locate package python3-pil.imagetk
E: Couldn't find any package by glob 'python3-pil.imagetk'
E: Couldn't find any package by regex 'python3-pil.imagetk'
I have upgraded matplotlib
, python
, pip
, tkinter
and customtkinter
(all the tools I am using).I have gone to the location defined by the error message and there is certainly no
ImageTk.py
(or similar).I have checked the comments online but all the fixes using
apt-get
result in no package found, whilst PIP
only is happy with the installs I know already work.I'm struggling to know where to look now; or what to do.
This is a work computer and not a personal one. I have SUDO access and am running Fedora 5.17.12-100.fc34.x86_64. I am running pip 22.3.1 and Python 3.9.13. Matplot is 3.6.3.
Since it is Fedora I have replaced apt-get with dnf, to no avail.
Any ideas?