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.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

PySide2 not seen by pip

I'm trying to install PySide2 on my RPi 4, and, although the installation was successful, pip3 doesn't recognise it. This then causes issues when installing other packages relying on PySide2. I ...
1
vote
1answer
25 views

Raspberry pi interfacing with AD8232 using python

I have already seen the other post but I want a python code through with I can connect my raspberry pi and ECG sensor ad8232 I am totally new to raspberry pi interfacing so I don't completely ...
0
votes
1answer
22 views

RPi.GPIO: multiple buttons one callback function, ignore buttons while callback is executing

I have 4 buttons connected to my Raspberry Pi that call the same function when pressed. I'm using GPIO.add_event_detect to connect the buttons to the callback function. When one button press executes ...
0
votes
0answers
17 views

Trying to Run Python Scripts on the Pi remotely using bluetooth

I am trying to get a script that is currently on my Raspberry pi 3B+ to start using the Bluetooth on the Pi itself from my laptop. I have tried a few things, including pybluez (wouldn't run on my ...
0
votes
1answer
17 views

Raspberry pi cannot run an executable file created in Python

I' m new to Raspberry Pi and I created a file with the code: from tkinter import * from PIL import Image, ImageTk import board import busio from adafruit_as726x import AS726x_I2C import time import ...
0
votes
0answers
24 views

How can I make the Raspberry Pico not automount as USB storage while using Circuit Python

I am using Circuit Python on a Raspberry Pi Pico to give me hardware buttons for keyboard shortcuts. I am using Circuit Python as opposed to MicroPython because it has the USB_HID library. I don't ...
2
votes
2answers
38 views

How do I get Python 3 to work again on my Raspberry Pi?

I am running Raspbian on a Pi 3 that has one job: it runs a clock on a Sense Hat, from Python 3 source code. Recently I found I was unable to run my clock program, which generated an error stack that ...
1
vote
2answers
31 views

Problem running a Python3 script at startup with lxsessions

I have Raspbian Buster on a RPi4 and I was launching a Python3 based Kivy 2.0 app at startup. Since it is a GUI app that needs networking and bluetooth. The only way to make it work was an executable ...
0
votes
1answer
26 views

gpiozero button to raise SystemExit / gpiozero clash with GPIO.cleanup()

TL;DR: Since this is a long question I have the following problems: I'm looking for a good way to use gpiozero Button to raise SystemExit upon button press I have an imported module to drive an E-Ink ...
0
votes
0answers
32 views

cant install pyqt5 on thonny python!

i already got pyqt5-sip installed! but when i try to install pyqt5 i get this error! Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting PyQt5==5.15.2 Downloading ...
0
votes
1answer
22 views

Can turicreate python library be installed on raspberry pi?

Hello all, Recently I am trying to install turicreate library on my raspberry pi 3 model B+ by following all the required steps to be done for installation for operating systems like Ubuntu which is ...
0
votes
1answer
50 views

ModuleNotFoundError: No module named 'PIL'

I am having issues trying to run a python file that works with an rfid headder i have on my pi 0. Im brand new to the pi so it might be that ive not done something simple but im still stuck. I have ...
0
votes
0answers
8 views

ORB object tracking on Raspberry pi

I am new to Rasberry Pi and OpenCV but I got a project to make a target detection tool using ORB from openCV with raspberry pi I'm using the Raspberry Pi 3 Model B and the Raspberry Pi Camera V2 8MP ...
0
votes
0answers
13 views

How to full screen the app window in Rpi 7in TFT

I'm currently working on an app for rpi using kivy that will be displayed in a 7in TFT. I used the 7in TFT resolution as window size (800,480) I am developing the code in windows pc since coding it in ...
0
votes
1answer
34 views

Sonic Pi won't play sound from remote python script

I am using Sonic Pi 3.3.1 on my Windows PC and a Python script(Python3.7.2) on my raspberry pi(Raspbian Buster) that detects distance from an HC-SR04-Ultrasonic Sensor .The program then creates a tune ...
0
votes
2answers
85 views

Update system python 3.7.3 to python 3.7.9

Right now the python3 version is 3.7.3 on my Raspberry Pi 4. Generally, it is a bad idea to mess with the system Python (I've understood), but since I use 3.7.9 normally, I would like to have that ...
0
votes
0answers
23 views

Is there a way to get PiCamera's actual framerate?

I would like to know the camera's actual frame rate. This might seem trivial, but I could not find an obvious solution. I'm using PiCamera 1.13 with Python 3.7.3. My current approach is with ...
0
votes
0answers
46 views

usb mic works in python speech_recognition test but not in practice

System and Devices Raspberry Pi Zero W running on Raspbian GNU/Linux 10 (buster) usb microphone (this one) Python 3.7.3 What's working: I can run python3 -m speech_recognition on the raspberry pi, ...
-2
votes
1answer
18 views

flask_ask won't import after proper installation

I'm trying to use the flask_ask library however I for some reason can't get it to work. Whenever I try to reinstall flask-ask by doing pip install flask-ask I am given the same thing below so I think ...
0
votes
1answer
21 views

Using Mu editor on RPi for Python version 3.7. Copying script written (and worked) on 2.7 and getting syntax error on script

Getting syntax error and "cannot understand this line, check for missing characters" statement for this line: GPIO.setup(LED1, GPIO.OUT) plus a continuation line under-indented for visual ...
0
votes
1answer
65 views

Running python 3.7 on miniconda on raspberry pi

I want to use python 3.7 in raspberry pi through miniconda but surfing, I got to know that miniconda provides python version upto 3.4. Some sources said to use berryconda, which I installed but still ...
0
votes
0answers
22 views

I'm on a windows computer but I'm coding with mcpi and I was wondering how I'd put custom commands

I'm on a windows computer but I'm coding with mcpi and I was wondering how I'd put custom commands. I cannot find any tutorials and no forums are talking about it. Can someone please point me in the ...
0
votes
1answer
31 views

Python Sockets ErrorConnectionRefused: Errno111 (only on Pi)

So I made a simple client / server script using python sockets, and it's been working great on my PC. I decided I'd try to move the server over to a raspberry pi so it would be dedicated, and it's not ...
0
votes
1answer
20 views

import Spacy on RPI in Pycharm and other IDE gives error

I successfully installed Spacy using pip install spacy and alternatively through Pycharms virtual env, but when I import spacy in my program it's giving me the following error; home/pi/....
0
votes
1answer
22 views

Python tkinder reset button code fails on third attempt

I am trying to trigger a timer when there is audio and stop the timer when the audio is lower than a set value. There is a reset button that will reset the timer back to zero. The reset button works ...
0
votes
1answer
49 views

gpiozero's LED.toggle() switches LED again after some seconds

I am using the gpiozero library to controll a LED strip and a relay connected to my raspberry pi 4. This is the way I connected the LED strip to the pins. I use a type SMD5050 LED strip similar to the ...
1
vote
0answers
27 views

Tkinter Script Autostart

I have a problem with loading the Tkinter script at every reboot of the Raspberry. The script is executable and starts from a .desktop file. No problem with it when the Raspbian OS is booted (I guess ...
0
votes
1answer
54 views

Changing install directory of python after installation

I have a fresh installation of Raspbian Lite. This one comes with Python 2.7 and 3.7 and no pip installed. I wanted to install Python 3.9.1 and followed the instructions from here. To briefly state ...
0
votes
0answers
34 views

undefined symbol: libusb_free_config_descriptor

I try to use a Chafon UHF RFID reader via USB with Pi Zero. The manufacturer asked me for installing this: sudo apt-get install libusb-1.0-0-dev and use this Python code: UsbDemo.py #!/usr/bin/python ...
1
vote
0answers
41 views

Can keyes Sound sensor be used as a Microphone in Raspberry pi?

I am trying to make a speech recognition system on a Raspberry Pi 3 model B+ using Python. It needs a microphone. I have the keyes Sound sensor which looks like this(https://cutt.ly/Jjp9jWP). Can this ...
0
votes
2answers
28 views

Openssl error while installing paho-mqtt python package

I am trying to install paho-mqtt python library using below command: sudo pip3 install paho-mqtt But I am getting below openssl error: Looking in indexes: https://pypi.org/simple, https://www.piwheels....
1
vote
0answers
109 views

Problem with USB RFID Reader and Raspberry pi 4

Firstly I'm just a beginner trying to get into pi world so my knowledge is minimal at this point. I'm trying to make USB RFID card reader work on raspberry like it works on my Windows pc, imitate ...
0
votes
1answer
271 views

Ubuntu 20.10 and GPIO

I have trouble installing RPi.GPIO library on Ubuntu 20.10. I run apt-get update and apt-get upgrade then apt-get install python python3 python3-pip python3-dev everything went ok. Then I run pip ...
0
votes
0answers
31 views

Send logger to I2C interface

How can I pass a Python logger to the i2c interface? I bought a small 0.96" oled display and would like to use it on a headless raspi. Is there some way to just display everything thats raised by ...
0
votes
4answers
60 views

This channel is already in use, again: X-mas tree lights

Sorry, but I've looked at several threads and no one talks about my idea. I'm currently working with a switch, that will manage the Christmas-tree lights, to turn it on at 18:00 and off at 01:00 (e.g.)...
0
votes
0answers
65 views

Connect multiple bluetooth barcode scanners to Raspberry Pi 3

I am working on a project for my university. I want to connect several Bluetooth barcode scanners (OPN2006) to a Raspberry Pi 3+ by using the Bluetooth SPP. I managed to make the connection to one ...
0
votes
2answers
58 views

Execute A Jupyter notebook file using runipy -o myfile.ipynb command upon Raspberry PI 4(Raspbian OS) boot-up

My research regarding this issue: All methods available on the internet are about running .py files on Raspberry Pi boot. NO ACTUAL HELP ABOUT RUNNING JUPYTER NOTEBOOK FILES .ipynb ON RASPBERRY BOOT ...
0
votes
1answer
44 views

Interfacing R307 to RPI without USB Serial Converter

Good day I am trying to interface the r307 fingerprint module in raspberry pi 4 however as what I can see every example or tutorials require USB SERIAL CONVERTER is it possible to interface the module ...
1
vote
0answers
119 views

PyCharm 2020.2 can't open terminal [closed]

I am having a problem with PyCharm on my raspberry pi. Everything works just fine when using PyCharm 2020.2, except for its terminal. When I try to open the terminal tab it says the following: Cannot ...
0
votes
0answers
21 views

Adding chromium webbrowser with url and filter the data to 1 url

I'm using the QR-Code recognizer for the Raspberry Pi 3B+ from this guy: https://www.hackster.io/gatoninja236/scan-qr-codes-in-real-time-with-raspberry-pi-a5268b#comments I like to add 2 things to the ...
0
votes
1answer
44 views

Problem opening tkinter script via html page

I am working on this project where I have Raspberry Pi 3 with full Raspbian (with GUI) connected to a 7" screen. I created a Python 3 script: // gui.py import tkinter as tk root = tk.Tk() root....
1
vote
1answer
111 views

Install pypy3 on raspberry pi

I found this to try to help me install pypy3 https://stackoverflow.com/questions/55703832/install-pypy3-on-raspberry-pi However the download command no longer works. I tried: sudo apt-get install ...
0
votes
2answers
60 views

Unable to run bash after boot

I have a raspberry pi 4, EDIT: using python3.7, with raspbian OS Devian 10 Buster and I am trying to run a script afeterboot for people counting, it uses a virtual env, after reading various post this ...
0
votes
1answer
61 views

Rerun the code if error occurs

I am fairly new to coding so please bear with me. I am using random.choice for my code to run. So, sometimes it gives me an error 'Cannot choose from an empty sequence' and sometimes it does not. Now, ...
1
vote
1answer
146 views

Real time + High frequency ADC data reading with Raspberry Pi 4

I need to acquire a signal at a minimum sample rate of 10 kHz and processing it real-time using a Python code. Since Raspberry Pi only reads digital signals I get an ADC (High Precision AD/DA Board ...
1
vote
0answers
709 views

RTSP streaming works in VLC media player but not in Python OpenCV

I have Logitech C920 USB webcam connected to my rPi 4 4GB model. I want to stream the video feed through rtsp. The following command runs on the pi: cvlc -v v4l2:///dev/video0:chroma=mp2v --v4l2-width ...
0
votes
0answers
31 views

breaking out of while loop

Trying to stop a light blinking "while" loop by querying the position of a gamepad joystick. Can't seem to continuously query while in the loop and break out of the inner loop. Can you ...
1
vote
0answers
32 views

Connecting a phone to a Pi 3A+ using Bluetooth fails

I want to connect my phone using BLE to a Pi 3A+. For testing I have set up a Bluetooth server using this code. I have tried connecting with nRF Connect on both a Motorola Moto e5 (Android 8.0) and a ...
0
votes
1answer
19 views

Display monitor closes while running a python code on Rpi zero

I am writing a code using the Google AIY vision kit and its APIs. I have a loop which calls the face_detection model continuously every 30 secs. The loop works perfectly fine for the first 2 ...
1
vote
1answer
312 views

Can't install python packages & pip module not found

I've been trying to install packages on a raspberry pi 4b and I keep having issues. On the default, python ver. 3.7, I would get setup.py not found. Then I installed python ver. 3.9 and got the ...

1
2 3 4 5
10