Skip to main content

Questions tagged [python-2.x]

To be used when a piece of code in a question is specifically related to any version of Python 2.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
336 views

I am running the new version (May'24) of Pi OS on my Pi Zero and Pi Nano. The programmes I wish to run were written for python2 and am led to believe that this can be incompatible with Python3, so ...
steve croft's user avatar
0 votes
2 answers
112 views

The following is the Python script that I want to execute every time Raspberry Pi reboots. When I run this Python script directly from the terminal it works. Not only does IP gets stored in the file ...
Osama Khalid's user avatar
0 votes
0 answers
157 views

I'm on an RPi4 running the 64-bit version of Raspbian and want to have 2.7 and 3.x coexisting with NO problems. 3.x is part of the 64-bit Raspbian when installed. I just installed 2.7 (i.e., sudo apt ...
jski's user avatar
  • 121
1 vote
2 answers
2k views

As I read from forums, Python2 is removal at bullseye. I install python2.7 manually but there is gpio problem with python2. sudo python2.7 -m pip install RPi.GPIO dont work. Raises collect2: error: ...
Hakan Ulusoy's user avatar
0 votes
2 answers
114 views

I would like to re-bind Apache fCGI to python3.7 instead of Python2.7. I saw the following error message while my script used type-hinting. AH00163: Apache/2.4.38 (Raspbian) mod_fcgid/2.3.9 mod_wsgi/4....
Bimal Poudel's user avatar
0 votes
0 answers
77 views

Currently, I have a python program where my pi will check if a certain email address has a certain email and then run another piece of code. When I run the script normally there is no issue with it, ...
CaptainObi's user avatar
2 votes
0 answers
4k views

currently, my raspberry pi runs python versions 2.7 and 3.6 [by default] and version 3.8.1 [I'm trying to update the current version] This causes a lot of trouble when I try to install a new package ...
Mat brightington's user avatar
1 vote
2 answers
337 views

Setup Kivy 1.11.1 Flask 1.1.1 Python 2.7.13 Issue I have an issue running together a Kivy app and Flask as thread on a RPi2 with a touchscreen. It is similar to the issue mentioned in this post ...
parovelb's user avatar
  • 157
1 vote
1 answer
1k views

I am trying to chart real time data from a Raspberry Pi to a web server. In this case I am using dash (https://dash.plot.ly/live-updates) to do this. I am currently testing my dash web browser on ...
Tuomas Talvitie's user avatar
-1 votes
1 answer
567 views

I currently have some code that I found that constantly outputs a value from a digital caliper. However, I want to modify this so that it is inside a function that can return that is returned from ...
danwillm's user avatar
  • 109
0 votes
0 answers
130 views

i'm trying to capture the video stream using piCam. but i get this warning and the execution stops this the code: this the code I used: import numpy as np import cv2 cap = cv2.VideoCapture(0) cap....
Ura's user avatar
  • 1
2 votes
3 answers
8k views

This Python code works in Windows but does not work in Raspbian. How do I print PDF files using the Raspberry Pi? import os fd = os.startfile("/home/pi/Desktop/a.pdf", "print")
پیمان نوروزی's user avatar
0 votes
1 answer
1k views

I'm using the Rpi 3B+ and understand the hardware uart is used by the bluetooth. I'm OK to use the other uart I've followed several threads and believed I've done all I can. Enabled the Uart in ...
Rob Field's user avatar
0 votes
0 answers
370 views

i am running into an error when i try to install tensor flow using pip on my raspberry pi 3b+. here is the error message: Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/...
ironmantis7x's user avatar
0 votes
2 answers
414 views

I have a long script that runs several GPIO devices using both SMBus and pigpio. It starts a thread to cycle through a series of screens on an OLED display, and then connects to Paho MQTT, and keeps ...
uhoh's user avatar
  • 562
3 votes
2 answers
35k views

I am new to the Raspberry Pi, I have a project. I would like to work on Python 2 not Python 3. By default Python 3 is installed on my Pi. I want to change or remove this version and I want to ...
Abdo Abdi's user avatar
-1 votes
1 answer
303 views

I'm stuck with this Adafruit module. I was able to install without errors on a Pi2, but when I tried to replicate on my Zero W the installation goes fine but then I cannot import the module ("...
Riccardo's user avatar
-1 votes
1 answer
162 views

Python3, pip3 and python was installed before on my Raspberry Pi. Today I've successfully installed pip using below command: sudo apt-get install python-pip After few hours later I'm not able to ...
Bangladesh 71's user avatar
-1 votes
1 answer
679 views

I've been writing a simple python script, and I import the GPIO library, and the time library. I have the following code. print()'Importing GPIO library' import RPi.GPIO as GPIO print()"Importing ...
Ubuntu User's user avatar
2 votes
1 answer
3k views

I'm new to this RPI world and also to python although I completed the basic courses I'm still getting used to this so I will appreciate your patience I'll try to express my self the best way. I ...
Carlos Echeverria St's user avatar
0 votes
0 answers
96 views

I'm using python 2.7.13 on a Raspberry Pi 3 The goal of my program is to send an email when an input is received (input goes low and I'm using software pull-ups) and then send out another email with ...
PiforBreakfast's user avatar
0 votes
1 answer
201 views

I have a RPi3 which can successfully trust, pair, connect and even list the service UUIDs of a BLE device both via bluetoothctl and via Bluepy python library. But when it tries to 'get' that service ...
marciokoko's user avatar
0 votes
0 answers
446 views

I really have tried searching through all the forums. confusing. The makers of Roboclaw wrote their test pythons scripts (and Roboclaw class) with Python 2.7. As of now, will NOT work with python v3. ...
ecorrales's user avatar
1 vote
1 answer
170 views

I have installed python-gpod on Raspbian lite Stretch, but can't get it to work. pi@raspberrypi:~$ uname -a Linux raspberrypi 4.14.30+ #1102 Mon Mar 26 16:20:05 BST 2018 armv6l GNU/Linux This ...
Mark Williams's user avatar
0 votes
2 answers
3k views

I'm trying to learn how to safely and reliably start and stop the pigipod DEOMON process from within a python script. If pigpiod happens to be running already, then this script is always successful. ...
uhoh's user avatar
  • 562