Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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
1
vote
1answer
951 views

Cannot import patterns; workaround doesnt work either

Aim: Build projectoxford into raspberrypi3 - https://channel9.msdn.com/Blogs/jsturtevant/Setting-up-Project-Oxford-for-Python-on-Windows I have reached the steps of: pi@raspberrypi:~/happy-image-...
3
votes
2answers
2k views

How to generate accurate PWM signals for many servos

I've ran into a bit of an issue with the Raspberry Pi's ability to generate accurate PWM signals for servos. My problem with this is that the servos jitter because of this lack of accuracy. Is there ...
1
vote
1answer
459 views

python.exe file not found; creating “virtual environment”

Aim: Build projectoxford into raspberrypi3 - https://channel9.msdn.com/Blogs/jsturtevant/Setting-up-Project-Oxford-for-Python-on-Windows At 2:11 of the video, for windows, the command used to create ...
1
vote
1answer
1k views

After installing python 3.6 most modules don't work

I'm new with RPi and also Linux, so my question might be stupid but I tried to get Python 3.6 running with different ways (compiling, pyenv, berryconda). In general I think python is running on all ...
2
votes
1answer
2k views

Found a PyPi Package for Opencv-contrib, but can't install using pip

I'm trying to install OpenCV for python with extra modules on my raspberry pi. The OpenCV website has a set of instructions that I have tried with different variations for the past several months. I ...
-1
votes
1answer
296 views

Sending data from html to python [closed]

I'm doing a project called IoT based announcement system where the user has to type the lcd number and the information to be announced in a webpage and that data should be printed and also converted ...
-2
votes
1answer
274 views

How to blink led on Raspberry Pi

I wrote python program that can be blink led on raspberry pi . import RPi.GPIO as GPIO ## Import GPIO library import time ## import Delay library GPIO.setmode(GPIO.BOARD) GPIO....
2
votes
2answers
1k views

GPIO event handler triggers off rising and falling edges

I'm trying to set up a tachometer. I used a comparator IC to get a real clean signal on pin 21 but I'm getting iterrupts on the rising AND falling edges. #!/usr/bin/python3 import time import ...
0
votes
2answers
287 views

Wireless data streaming with Rasbperry Pi 3

What is the simplest way to stream sensor data obtained by a Raspberry Pi 3 to my laptop? I have my Pi reading data from a gyroscope and I'm wanting to plot the data on my laptop as it is received (...
2
votes
0answers
713 views

Enabling I2C resulting in error Raspberry Pi

I am trying to use MPU 6050 on raspberry pi. For that I enabled i2c on raspi. But after that whenever I am trying to check the modules on my Python 3 or 2 shell for e.g. when I run help('modules'), I ...
0
votes
1answer
390 views

Ultrasonic sensor stops working after some time RaspberryPi

I have used the ultrasonic sensor with Arduino successfully without any problems in the past. However, with Raspberry pi, it is not very consistent. It stops working after some time. I have have read ...
0
votes
0answers
266 views

Not able to use GPS in Raspberry Pi3 [duplicate]

The image shows the error when running the following code. import serial #import serial pacakge from time import sleep import webbrowser import sys def GPS_Info(): ...
1
vote
0answers
402 views

I keep running into missing elements with GStreamer

I have tried uninstalling and reinstalling GStreamer on the Raspberry Pi 3 and I keep finding that I have missing elements. This is the Pi on Log Level 4 (GStreamer): This is my laptop, running ...
0
votes
1answer
73 views

Python 3.4.2 progressbar2 issue

The Pi was originally installed with Python 2.7 To install python 3.4.2, I did the following: sudo apt install python3; mkdir ~/bin; ln -s /usr/bin/python3 ~/bin/python which Python: /home/pi/bin/...
0
votes
2answers
3k views

How to start a python3 script on startup without login? (stretch image) [closed]

I am trying to start a python script called "irremote.py" on startup (currently in my home directory). I am running raspbian-stretch on a Pi Zero W, and I would like the script to start without a ...
4
votes
3answers
10k views

I can't download PyCharm for Raspberry Pi 3

I have had my raspberry Pi 3b for a few months so I'm just getting used to it. I would however want to install PyCharm because I want to use my Pi to program on rather than my PC. Any ideas would be ...
2
votes
0answers
2k views

Segmentation fault, running out of memory? PyQt5

I am programming code to display camera feed with my raspberry pi 3 and Raspbian. Strangely, sometimes the code shows the video and sometimes i get the Segmentation fault error. I used gdb to find ...
1
vote
2answers
5k views

Jessie: libEGL warning: DRI2: failed to authenticate

I'm developing an application using Python 3 / PyQt5. Everything seems ship-shape until I try to run the GUI (which is partially reliant on a live graph that is backed by pyqtgraph) on my Raspberry Pi ...
-2
votes
2answers
124 views

Syntax Error in python code for read sensor data through url and store into drive in .csv format

I was writing a python script to collect data remotely from plc through URL and store those data into my drive in CSV format. I have used the urllib3 module to collect data from the remote device. The ...
1
vote
1answer
824 views

PWM object's ChangeDutyCycle method is not working

I have a motor class but I dont' know why this motor cannot change speed class Motor: def __init__(self, pos, line_status=0): def set_motor_gpio(_a, _b, _pwm): self._A = _a ...
0
votes
1answer
1k views

RuntimeError: No access to /dev/mem

I'm using the PXfmini with the raspberrypi3 for a project and I need to use mavros and python code. My operative system is Frambuesa. I created the catkin workspace and I tested the c++ file ...
1
vote
1answer
3k views

Problem with matplotlib

I am attempting to run some matplotlib tutorials on my Pi3 running Raspbian Stretch. I have installed matplotlib & numpy using pip3 When trying to run any of the tutorials I get an error ...
0
votes
0answers
192 views

After python3 script run I can't run any program anymore

From time to time when breaking a python3 program I encounter a very strange problem. To illustrate it I have taken the screenshot: Started program works (like the htop in the another terminal window)...
2
votes
0answers
6k views

Want to Read COM Port Data and Write into TKinter Text Window

Using Python3, I want to read data on a serial port and display it into a tkinter GUI text window (not only the shell). Pretend I am trying to make the equivalent of a serial port character display. ...
0
votes
1answer
418 views

Custom menu GUI

I am trying to make a retro gaming console with the Pi Zero W. The first thing I want to happen is a custom menu screen show up. I know how to make a custom Tkinter GUI but I want it to show up when ...
1
vote
0answers
535 views

IR Tracking Sensor (TCRT 5000 ) always gives led off as output

I am using a Raspberry PI3 Model B and TCRT 5000 sensor to monitor movement. I am using a Python script(Python3) to read the data from the sensor. Script used - #!/usr/bin/env python import RPi.GPIO ...
2
votes
1answer
548 views

Capture image when camera is not covered

I am very new to R Pi, but I know my Python. I am working on a project where I have an always running camera, that is kept in dark. What I need to do is to capture an image when there is light. (lets ...
2
votes
1answer
4k views

Saving graphs using Matplotlib is very slow

I am trying to write a python Code snippet which creates 24 figures and 9 subplot and saves them in the directory. Its taking around 197 sec to create all the 24 figures and save them. This is ...
0
votes
1answer
249 views

Can't upload data from Raspbian to PHPMyAdmin server

I am trying to upload data from Raspbian to my web server which is PHPMyAdmin MySQL type. I am trying to do this using Python 3, as follows: import pymysql as ps con = ps.connect(host='ip address ...
2
votes
1answer
634 views

Best Python 3.5 library for playing mp3 file on Raspberry pi 0 W

I've already tried VLC library but the cpu reach 100% usage frequently during file playing, I've also the necessity to track the state of the playing so to know when the file is ended etc., Any ideas?
0
votes
3answers
319 views

Temperature logger

I have a resistance thermometer that outputs 4–20mA over 0–100°C. I can convert this to 1–5V with the use of a 250Ω resistor. My aim is to measure the voltage and scale it to the temperature and log ...
2
votes
2answers
516 views

How does Raspbian know it's been installed in a Pi or Compute Module?

I want to design a python script that would allow me to check whether it's currently in a standard Pi 3 or it's in a Compute Module 3. But I have no idea even on how Raspbian OS know itself is ...
0
votes
1answer
333 views

Dependencies fail to install, cannot install picamera on pi3

When I run apt-get install python3-picamera it fails with different dependency issues like: files list file for package 'libparams-util-perl' is missing final newline or files list file for package '...
0
votes
2answers
2k views

Six arduino-slaves (motor+sensor) on one raspi-master via USB

We are connecting six arduinos via an usb-hub to our raspi. Each of the arduinos will get analog data from one sensor and also control the movement of one motor. Thus we have an input and an output on ...
2
votes
1answer
986 views

Is there a problem with using deprecated os.popen?

I'm using os.popen() to run terminal commands in multiple projects. I keep reading that os.popen() is deprecated though and I should use Popen() instead, but I haven't been able to get Popen() to ...
5
votes
4answers
7k views

Do we need multiple versions of Python?

I am new to Linux and going through my installed folder I can see there are four different Python folders in the directory list. python python2.7 python3 python3.2 Do we need all the four versions ...