Questions tagged [python-3]
Use this tag when referring to the Python 3 language. This can include discussions about specific features unique to the language or perhaps when referring to software that requires Python 3 in order to function. Note that general programming questions are often better suited to Stack Overflow; use this tag only where directly relevant to the Pi.
598 questions
0
votes
0
answers
48
views
opencv won't reliably display jpeg on second monitor
I’m trying to display jpegs full screen on a second monitor on a Raspberry Pi 5 using opencv in Python.
import cv2
from pathlib import Path
from screeninfo import get_monitors, Monitor
def ...
0
votes
0
answers
108
views
How can multiple Python programs simultaneously access GPIO on Pi 5
I'm quite new to Pi programming. I know this question has been asked before but things do seem to have changed with Pi 5 and the latest Python libraries.
What is a way for 2 Python programs to access ...
0
votes
2
answers
627
views
I can't get my ReSpeaker 2-Mics Pi HAT V2.0 to work with my Raspberry Pi Zero 2W
I followed the Seeed wiki for set up and everything seems to be in working order but when I go and test if the ReSpeaker is getting any audio input with
python3 recording_examples/record_one_channel....
1
vote
1
answer
261
views
Read MIFARE Ultralight with MFRC522 reader
I want to read the complete 512-bit EEPROM memory of a MIFARE Ultralight card (MF0ICU1), i.e., the
56-bit (= 7 byte) serial number (= ID = UID)
32-bit one-time programmable area
384-bit user read/...
-1
votes
1
answer
305
views
develop and debug Python code for Raspberry Pi in Windows
I'm new to the world of Raspberry Pi's, I have programming experience but am new to Python.
I just want to be able to develop and debug python code for a Raspberry Pi in a windows 7 or 11 environment ...
-1
votes
1
answer
91
views
python imports are different on pi zero and pi twozero?
Having tested my python programs using SSH on two Pis from a PC, I wanted to autostart them (they will be a pump manager in the cellar and an upstairs monitor with a call to my mobile if something ...
0
votes
0
answers
816
views
Could not load the Qt platform plugin
I'm using a Raspberry pi 5, I'm having issues running ultralytics and PyQt5 at the same time. The way I installed ultralytics and PyQt5 are different. First I used
sudo apt install python3-pyqt5
, ...
0
votes
1
answer
858
views
paho mqtt in python3: no module named typing_extensions
Pi Zero W Rev 1.1, running raspian buster.
I can't seem to import the paho MQTT client in python 3, with the error shown below.
Here are my installation steps:
sudo apt-get update
sudo apt-get upgrade
...
1
vote
2
answers
330
views
How to deal with multiple events from IR remote control?
I am trying to capture events from an IR remote control in a python loop. I am using the evdev lib
Here is my code :
import evdev
def get_ir_device():
devices = [evdev.InputDevice(path) for path ...
0
votes
1
answer
287
views
Sysfs integration with python code - permissions issue
I’ve had a lot of issues regarding the sysfs interface recently, and unfortunately, I’ve got another unrelated one. I’m trying to integrate the sysfs gpio interface into my python3 code. This is ...
0
votes
1
answer
132
views
Installing a package with pip instead of apt
Python 3.9.2
pip 20.3.4 from /usr/lib/python3/dist-packages/pip (python 3.9)
I installed a package (pycomm3) with pip because it isn't available with apt.
If I start the python program from the ...
0
votes
3
answers
265
views
Why is python 3.9 being used by my rpi bullseye OS for this envirophat pimoroni project?
i installed bullseye 32 bit on my rpi2 and installed the envirphat board on the pin header. I used to have the same envirphat board on a rpi0 that unfortunately got wet.
I installed the library as ...
0
votes
1
answer
122
views
Can't use tkinter, and may have multiple versions of python at once?
Unfortunately, I wasn't able to make this post with all the information I wanted to give. I was originally going to post it from the RPi 400 that I was having all these problems on, but apparently ...
0
votes
1
answer
3k
views
How am I supposed to install Pillow (not PIL) on Raspberry Pi OS?
This is a new Pi 5 running Raspberry Pi OS and Python 3.11.
I have a dependency on Pillow. Definitely not PIL because PIL lacks certain features - specifically ImageTk: ImportError: cannot import ...
0
votes
1
answer
745
views
Can I control IR filter of night vision camera
I'm using night vision camera (PIS-1138) with Raspberry Pi 4 and Picamera2 Python3 library successfully.
However, the camera seems to switch some sort of IR filter automatically on/off based on the ...