Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
1answer
709 views

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:...
1
vote
1answer
370 views

import error - matplotlib

I'm kind of new to RPi. I need to plot a data stream received on some of GPIO pins. I've decided to use matplotlib for the project. however I'm stuck at stage 1: install and import matplotlib! I've ...
0
votes
1answer
110 views

IR sensor program will not run

When I run it nothing happens either in command prompt or the shell. I think I am missing some code line but I got it from a online project and cant ferret out the problem This code is supposed to ...
0
votes
0answers
314 views

Raspberry Pi + Mcp2515

I used Raspberry Pi + Mcp2515 with CAN bus. In my code, When I lost request it will locked,then GUI will not working. msg = can.Message(arbitration_id=0x000601, data=point, extended_id=false) bus....
0
votes
0answers
1k views

Raspberry Pi zero Bluetooth Programming with Python

I have connected my galaxy on7 with Raspberry pi zero's bluetooth onboard.i could connected pi with my phone. In my phone i installed blue term(terminal).The problem is not my code(python) running on ...
0
votes
1answer
211 views

Segmentation fault error while installing opencv on raspberry pi 3. Any reason for that?

Hi everyone I hope someone could help solve this issue,I'm trying to install openCV 3.3.0 with python 3.5 on the raspberry pi 3 for the second time ( first time I got no module named cv2 ) but this ...
1
vote
2answers
4k views

Pip3 install throwing error on raspberry pi 3 Raspbian-Jessie

I am trying to install a python 3 library on a raspberry pi 3 running Raspbian-Jessie. sudo pip3 install LIBRARY However, regardless of what library I try to install, I am getting this error: ...
1
vote
5answers
5k views

How do I connect GSM SIM 900A to a Raspberry Pi 3?

I want to connect the GSM SIM 900A to a Raspberry Pi 3 but I don't where the problem is. I used this configuration: https://qph.fs.quoracdn.net/main-qimg-c124f9e741afd438969e869e52d0df6b Then I ...
1
vote
1answer
2k views

Scan and Retrieve List of Bluetooth Devices Using Python 3

When using the terminal inside the Raspberry pi, i have to use only 3 commands to retrieve a list of Bluetooth capable devices in the area. These are the commands that are executed in order: "sudo ...
0
votes
2answers
65 views

How can I add a delay before raspberry pi cam starts recording?

I am using the following command to take video: os.popen('raspivid -1 640 -h480 -fps 25 -o motionCapture/' + timeStamp + '_motion,h264 -t ' + str(timeInSeconds * 1000)) The problem is when I try to ...
0
votes
1answer
420 views

Controlling Linear Actuator

I am hoping to control a WINDYNATION 4" Stroke Length Linear Actuator with a Raspberry Pi for a senior design group project. Ideally, the program will make the actuator fully extend, and then retract ...
1
vote
0answers
84 views

Python 3 Debugging Symbols for Raspbian Stretch

I am trying to track down a segfault when using Pip on my Raspberry Pi Model 3B running Raspbian Stretch. I've configured the pi to do a core dump, and I've gotten gdb to load the core. The ...
0
votes
0answers
213 views

Switching between two cameras fails after resolution change from 640x480 to 1024x768

I have 2 cameras (1 - Kayeton KYT-U200-R01 and 2 - similar one but for IR) running on my Raspberry Pi 3. Everything worked fine but suddenly after resolution has been changed from 640x480 to 1024x768 ...
0
votes
0answers
60 views

How to Start program when Pi boots up

I am making a system, in which I need to be able to make the pi autologin and run a python3 script without a monitor or password. The script requires human input from a keyboard, but it doesn't work ...
0
votes
0answers
55 views

Raspberry Pi 3 with Microstack GPS (latest GPS data)

I implemented the following code: gps = microstacknode.hardware.gps.l80gps.L80GPS() while True: data = gps.get_gprmc() print(data.keys(), data.values()) time.sleep(1) After some time it ...
0
votes
2answers
115 views

Raspberry Pi surveillance camera

I am working with a surveillance camera project with a motion sensor and a buzzer on Raspberry Pi, but when I run the code below: from gpiozero import MotionSensor from gpiozero import Buzzer from ...
0
votes
1answer
226 views

How to reinstall python3 from binaries?

One of my RPis has a problem with python3: root@sent121:~# python3 Segmentation fault When debugging a print('hello') script I get root@sent121:~# dbg python3 -bash: dbg: command not found root@...
0
votes
0answers
442 views

''Unable to connect to X server" error, using xinput

I have a python3 script, intended to run at boot using rc.local. The script is for multimedia purposes, uses omxplayer and GPIO pins. Im using WaveShare 7In HDMI LCD as the display, with the ...
1
vote
0answers
30 views

Raspbian Python Package installtion errors, Parselmouth

I am trying to install this package, praat-parselmouth, however the installation does not move forward after getting stuck at either "Running setup.py bdist_wheel for praat-parselmouth" or if ...
1
vote
0answers
109 views

Time.sleep() zeroes photo resistor readings on Raspberry Pi [closed]

I have a Raspberry Pi 3 and a photoresistor, LEDs, resistors, breadboard etc. Now, I have observed a strange occurrence. When I run the following code all of the readings from the light sensor are ...
0
votes
1answer
46 views

Help combining two scripts [closed]

I know this is very blatant but I really need help with my python scripts right now. I have following two scripts or one script and a class if you will so. import sys import time import pigpio ...
0
votes
1answer
678 views

Hardware PWM for Python 3.5 or higher?

I am developing a camera tracker to follow objects identified via OpenCV in a dedicated environment on mt Pi3. Currently the two SG90 servos are controlled by software PWM using RPi.GPIO - but the ...
1
vote
1answer
136 views

Problem with packages [closed]

I'm trying to compile my code import sys,os sys.path.insert(0, '/usr/include') sys.path.append('/usr/include') import plivo, plivoxml auth_id = "Your AUTH_ID" auth_token = "Your ...
0
votes
1answer
515 views

How to I run OMXPlayer in windowed mode from Python?

When I run this program in Python 3 it is working but the video is in full-screen. from subprocess import run videoPath = "/home/pi/video_3.h264" omx = run(["omxplayer",videoPath]) As soon as I add ...
3
votes
3answers
1k views

Is it ok to remove all Python?

I have a Raspberry Pi 3 Model B and I installed Raspbian on it using NOOBS. I want to use Python 3.6 only. Is it ok if I uninstall both Python 3.5 and 2.7? Will there be no system problems? If I yes, ...
1
vote
0answers
426 views

How can i emulate a ps/2 keyboard with raspberry pi3

So I am working on an medical machine which runs on microcontroller(So,No OS).It gets the input from ps/2 keyboard. I would like to automate it. I would like some basic idea and some help on how to do ...
1
vote
2answers
846 views

WiFi Interfacing using Python

I am building a Smart Mirror for a school project and I need a way to give the user an interface where they can search and connect to a network. Unfortunately, my Raspberry Pi stopped working (doesn’...
1
vote
0answers
249 views

Block Raspberry Pi from quitting fbi fullscreen (HDMI) to command line

I'm developing a parking control system in Python 3 which runs in headless mode at the Raspberry Pi startup and uses one RFID reader, one Barcode reader and many other devices but they really don't ...
2
votes
2answers
9k views

How to connect MySQLdb in Python 3?

I want to connect MySQLdb with Raspberry Pi. But when running my program, I get this error: $ sudo python3 readMQ2sql.py Traceback (most recent call last): File "readMQ2sql.py", line 17, in <...
1
vote
3answers
805 views

UART problem: Sending more than 8 bits

How can I send something more than 8 bits over UART? Any python libraries?
1
vote
2answers
1k views

Recording time series data from Bluetooth by Pybluez

I am currently work in a project that I am using Raspberry-pi to record data from Bluetooth signal. I chosen the PyBluez to program bluetooth. My object is to write the data into csv file, each data ...
3
votes
1answer
4k views

Python script fails with 'ImportError' when run from rc.local

So I've tested that my script does attempt to run and I'm recording the error message of Traceback (most recent call last): File "/home/pi/steamFriendStatus_v0.3.py", line 6, in <module> ...
0
votes
1answer
62 views

Python urllib won't work from ~/.bashrc

I have the following code in a file called ~/foo.py: import urllib.request url = "https://raspberrypi.stackexchange.com" req = urllib.request.Request(url) resp = urllib.request.urlopen(req) It runs ...
1
vote
1answer
141 views

How to open .bat file in VSCode using raspbian

From the website ( https://channel9.msdn.com/Blogs/jsturtevant/Setting-up-Project-Oxford-for-Python-on-Windows ) at about 4:27, the author opens the activate.bat file by using code .env\Scripts\...
1
vote
1answer
544 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
999 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
242 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
2answers
903 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
254 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
220 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....
1
vote
1answer
871 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
122 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
508 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
237 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
142 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
317 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
50 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
2k 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 ...
5
votes
2answers
4k 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 ...