Apr-29-2020, 02:09 PM
Hello, I'm sorry this is a basic question, I've combed the internet following multiple tutorial/forum posts regarding this issue and I'm no further forward.
I wish to import a jpg into a Tkinter gui using the PIL as many tutorials have pointed out.
I have a clean install of Raspbian, I couldn't find Python on it so I followed a tutorial to install Python 3.8.2. When trying to execute a script with " from PIL import Image, ImageTk " in it, I get the python IDLE message:
![[Image: TkbLY7T]](https://ibb.co/TkbLY7T)
It has references to python 2.7? Disregarding that, I use the python code "import image" and the error (in the picture) shows in the python idle. So it seems image has been saved to python 2.7??
Please help me to rectify this issue! thank you in advance!
I wish to import a jpg into a Tkinter gui using the PIL as many tutorials have pointed out.
I have a clean install of Raspbian, I couldn't find Python on it so I followed a tutorial to install Python 3.8.2. When trying to execute a script with " from PIL import Image, ImageTk " in it, I get the python IDLE message:
Error:Traceback (most recent call last):
File "/home/pi/Desktop/gui_test.py", line 10, in <module>
from PIL import Image, ImageTk
ModuleNotFoundError: No module named 'PIL'
So PIL is not installed.... Using the Pi Terminal and the command "sudo pip install pil" I get the message:Error:sudo pip install pil
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pil
Could not find a version that satisfies the requirement pil (from versions: )
No matching distribution found for pil
So then I read that PIL is no longer supported and I should use Image? When trying to install this:It has references to python 2.7? Disregarding that, I use the python code "import image" and the error (in the picture) shows in the python idle. So it seems image has been saved to python 2.7??
Please help me to rectify this issue! thank you in advance!