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.
Questions tagged [python-3]
606 questions
4
votes
1 answer
Turn Up or Down Volume for OMXPlayer 3.5mm Audio Jack
on my raspberry pi i have a speaker wired connected via aux cable to the 3.5mm audio jack. My first question ishow can i get rid of the noise coming out of my 3.5mm audio jack when keys are pressed or processes are running. And more importantly if i…
Reese Houseknecht
- 105
- 1
- 1
- 10
1
vote
0 answers
Making Python3 default on command line
I have been trying to run the Jupyter notebook on my Pi but the Kernels will not install into Jupiter even though I downloaded them through the Pi's Software download window. A little bit stumped and the only thing I feel it could be is that its not…
Dan Hopkins
- 11
- 1
1
vote
2 answers
Shuffling Music with OMXplayer on Raspberry Pi
So here I have created a loop that lists off each file in a folder and plays it using this python code:
global shuffleVar
listOfFiles = os.listdir('/home/pi/mysounds/')
pattern = "*.mp3"
for entry in listOfFiles: …
Reese Houseknecht
- 105
- 1
- 1
- 10
1
vote
1 answer
ADC PCF8591 reading integrated sensors values
I have this ADC board:
https://www.amazon.com/ACROBOTIC-Digital-Converter-Breakout-Raspberry/dp/B06XY7572V
That has integrated thermistor and photoresistor
Board connected to l2c:
Pi SDA -> Module SDA
Pi SCL -> Module SCL
Pi 3V3 -> Module VCC
Pi GND…
Woof
- 113
- 4
1
vote
2 answers
Failed building wheel for cffi on Model 3B+
The OS running on the Pi is Raspbian 9.8, I'm trying to do the
sudo pip install --pre azure
So I can send images from my Pi to my blob storage on azure but when I run the above command it begins to install fine until it gets to the ffi.h part and…
J.Doherty
- 11
- 1
- 1
- 3
1
vote
2 answers
Autostarting a python script at boot not working in /etc/rc.local and systemd
I am working on a data acquisition project where I am sending a bunch of sensor data to the cloud. Here is a small snippet from my code:
#!/usr/bin/python3
# coding: utf-8
import ctypes
from systemd import journal
.
.
.#Rest of the…
Sohil Mehta
- 11
- 4
1
vote
1 answer
No module named PiCamera
Trying to run a python program in a vm (virtual environment) with the picamera module, i'm running it in the vm because i have other modules there like OpenCV.
When running the program i get the error:
" ImportError: No module named 'picamera'…
1
vote
1 answer
Why can't Pycharm find remote python3.9?
I am using pycharm for remote development with rpi3, when I try to run my code I get the error from pycharm that it can't find a file: (IGNORE the X)
Error running 'test': Cannot run program "sftp:\\pi@192.168.XXX.XX:22\usr\bin\python3.9" (in…
aWiseMan
- 15
- 3
1
vote
4 answers
Crontab won't run python script
I'm trying to run two simple python scripts from crontab:
crontab file:
@reboot /usr/bin/python3 /home/pi/init_server.py
@reboot /usr/bin/python3 /home/pi/scheduler.py
crontab log:
Aug 12 10:07:11 raspberrypi CRON[423]: (root) CMD (/usr/bin/python3…
Øystein Seel
- 111
- 1
- 1
- 8
1
vote
2 answers
How to update Python to 3.5 or later
This Rpi2 has Python 3.4 working - the DAQC2 piplate software install requires 3.5. I can't identify the latest version applicable or find it at Python.org with wget. Alternately, Is there a pre-compiled version available? The Rpi documentation is…
Joe Wharton
- 13
- 1
- 5
1
vote
0 answers
Raspberry pi: How to toggle a thermal heater
I am trying to build a thermal heater and controller. I have a thermal blanket (https://www.adafruit.com/product/3670) and I would like to be able to control the current to the blanket by control it turning on and off using a raspberry pi, connected…
Perry Godse
- 11
- 1
0
votes
0 answers
NEO-6M GPS module
I am using NEO-6m GPS module with raspberry Pi 3B+. My GPS module is working perfectly. IT is giving me my GPGGA strings. But for now, I am using different python scripts but i am getting the error that pynmea library not installed. I have installed…
0
votes
0 answers
interfacing sen0189 turbidity sensor with raspberry pi 3 via mcp3008?
I am working withe the turbidity sensor SEN0189 and I am using mcp3008 A to D converter but I am not able to get the values for it, as I am not able to download the adafruit mcp3008 libraries in my pi. As I'm not getting any output I have tried…
Habeeba
- 1
- 2
0
votes
1 answer
How can hide ffmpeg output?
os.system('ffmpeg -ss 00:08:00 -i '+dAdi+' -frames:v 1 /home/pi/Desktop/filmekrangoruntuleri/'+egAdi+'2.jpg')
When I run my python(3) script through the terminal, I see the following outputs produced by ffmpeg, but how do I do this without…
Harun Reşit Ç
- 31
- 7
0
votes
1 answer
Run python function once usb is mounted
I'm currently having a problem on how can I run a python function once the user mounts a flash drive. I have a GUI that's in idle mode and the user can start using when he/she plugs a flash drive. Your help will be very much appreciated :)
seluj rufo
- 3
- 2