Hi Ben, I hope you can help. I am also having problems with PIL.
The first two lines of code are:
Code: Select all
import tkinter as tk
from PIL import ImageTk, Image
The error message is:
Traceback (most recent call last):
File "/home/pi/Camera/new_3.py", line 2, in <module>
from PIL import ImageTk, Image
ImportError: cannot import name 'ImageTk'
PIL does seem to be correctly installed:
Code: Select all
pi@raspberrypi:~ $ sudo apt-get install -y python3-picamera python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version.
python3-picamera is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 103 not upgraded.
pi@raspberrypi:~ $ sudo pip3 install guizero
Downloading/unpacking guizero
Downloading guizero-0.3.3-py3-none-any.whl
Installing collected packages: guizero
Successfully installed guizero
Cleaning up...
pi@raspberrypi:~ $ sudo pip3 install twython
Requirement already satisfied (use --upgrade to upgrade): twython in /usr/lib/python3/dist-packages
Cleaning up...
pi@raspberrypi:~ $ sudo apt-get install -y python3-PIL
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pil is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 103 not upgraded.