I found the answer I was looking for.
In short, it's:
sudo apt install libwebp6 libtiff5 libjbig0 liblcms2-2 libwebpmux3 libopenjp2-7 libzstd1 libwebpdemux2
I found the list at https://www.piwheels.org/project/Pillow/.
Once I have those installed, Pillow seems to work as expected in my virtual environment.
Did you install python3-pil? python-pil is for Python 2, which you aren't running.
It looks like the problem is more you're trying to open a JPEG-2000 image (… ImportError: libopenjp2.so.7: cannot open shared object file …). For reasons of mostly-obsolete dogma, JP2 support on Linux has been weak for many years. You may find that installing libopenjp2 fixes ...
If the GUI is already configured to run, you just need to set the DISPLAY environment variable in the script that launches your Python script.
If you're using /etc/rc.local just add export DISPLAY=:0. If you're using a .service file add Environment=DISPLAY=:0 to the [Service] section (see Raspberry Pi run commands on boot).
It might be helpful to make sure ...
python -m tkinter quite correctly reports No module named tkinter because the Python2 version is Tkinter
python -m Tkinter should work!
There is no need to install tkinter, because it should be included in python3.
Check to see if it is installed use the terminal as Dougie stated in the comments.
If it's not installed type in the terminal
sudo apt-get install python3-tk
Testing in python shell
gpzero has support for events, very much what you are looking for event-wise:
from gpiozero import Button
print("Don't push the button!")
b = Button(17)
b.when_pressed = pushed_17
From GPIO perspective the buttons don't really have properties other than the PIN they are assigned to: this way even if you had multiple buttons assigned ...
Removing the autostart file should let LXDE start normally again.
Searching the stack here with https://raspberrypi.stackexchange.com/search?q=lxde+autostart suggests that the autostart may need to contain all of the commands needed to start the LXDE window manager (openbox), taskbar (lxpanel), desktop (pcmanfm), etc.
Alternatively, it may work better for ...
gpiozero does not need RPi.GPIO. However there is little reason not to install RPi.GPIO, it doesn't take much space and there are a wealth of examples of its usage.
gpiozero can use any one of a number of GPIO library backends to carry out its tasks.
By default it uses RPi.GPIO.
If RPi.GPIO is not installed it defaults to RPIO.GPIO.
If RPIO.GPIO is not ...
Do I need to install Rpi.GIPIO for GPIO Zero?
Well, GPIO Zero builds on Rpi.GPIO and other libraries. So if your
raspbian does not have it preinstalled, you need to do so.
(1) Gpiozero 1.5.1 Documentation > Docs » gpiozero
GPIO Zero builds on a number of underlying pin libraries, including RPi.GPIO ...
Firstly I would check to see if the file it's trying to access is in the folder that it's suppose to be in. Next if that all checks out look at the version of Python you are using and the version it's suppose to work on.
If you are going for max speed, then Python is not your friend. What it gains in flexibility it pays for in reduced capability for the compiler to perform substantial optimizations. Certain optimizations are simply not available to Python.
Although I'm not a fan of Fortran specifically, you should also be aware that for matrix multiplication, you almost ...
Everything looks OK.
(1) Set lower speed - spi.max_speed_hz = 100000.
And if problem does not go away,
(2) Send/recv less bytes, 1, 2, or 3 bytes
(3) Setup more SPI channels to compare and contrast (See Appendix A below.)
The reason for setting SPI speed to as low as 100kHz is to reduce noise, ringing, spikes/glitches etc. ...