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.

78 questions
6
votes
4 answers

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 or should I remove the others and keep only the…
SteveIrwin
  • 1,710
  • 2
  • 18
  • 31
4
votes
3 answers

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, how do I uninstall them?
kaito1412
  • 51
  • 1
  • 6
3
votes
2 answers

Installing Python 2.7

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 install Python version 2. the exact version does not…
Abdo Abdi
  • 31
  • 1
  • 1
  • 3
3
votes
1 answer

Recommended way for a python script to check NTP update status, and initiate an update if necessary?

I am writing a data logging python script and I would like it to find out if the system clock has been synchronized via NTP recently, and if not, to attempt to cause it to happen before proceeding. Starting from this answer, I've found that for the…
uhoh
  • 562
  • 6
  • 21
2
votes
3 answers

Print PDF files using Python code

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")
2
votes
2 answers

This module can only be run on a Raspberry Pi!

I'm running daemon python file in virtualenv and has a Error: File "rpi_daemon.py", line 5, in import RPIO File "/home/pi/python_virtualenv/local/lib/python2.7/site-packages/RPIO/__init__.py", line 115, in import…
2
votes
1 answer

Python 3 interpreter not recognizing a new installed package(python 3.5.3)

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 downloaded a few packages to work with a 16x02 LCD…
2
votes
2 answers

Slow Video Processing

I installed OpenCV libraries in raspberry pi for my project "Air Hockey Robot" and I'm using python for video processing. I am using PS3 eye camera for video capture at 60 fps. But it seems that video processing is too much slow. Should I use…
rizistt
  • 21
  • 2
2
votes
1 answer

Using the UART GPIO pins on a pi 3 to output characters to a TI MSP430

I'm currently building a remote controlled motor driven robot that is taking USB remote input, and output said input through the UART TX pin to a Texas Instruments MSP430 launchpad, that is connected through its UART RX pin. I've already programmed…
2
votes
3 answers

Convert .xlsx to .pdf

I'm looking for a python module to convert a .xlsx excel file to .pdf. My excel file will have formatted cells and embedded images. Does any one have any recommendations?
2
votes
0 answers

How to detect an empty stdout pipe in Python with subprocess

I'm experimenting with, or better trying to learn and understand, the subprocess modules using Python on a Raspberry Pi running Raspbain Jessie. In the code below I'm piping the Internet traffic for an Internet appliance to stdout. The records in…
RDK
  • 203
  • 3
  • 10
2
votes
1 answer

How to have Python use more of my CPU?

I have a code written in Python that takes about 9% of the CPU when ran. I want it to use more so it can run faster. To solve this problem, I tried multiprocessing, however, before writing a code for it, I ran the same program in two different…
2
votes
1 answer

Send data from Python to Arduino through serial port

Should I keep Arduino IDE and Serial 9600 open to be able to recieve data sent from python code , Arduino is connected with pi 3 with serial communication ? tried to send data while the arduino IDE and serial opened and it's going perfectly ,but…
Seif Mostafa
  • 35
  • 1
  • 1
  • 6
2
votes
2 answers

IDLE2 and Python2.7 in BUSTER

I use a "old" program, running in python2.7 Unfortunately i am not able to convert it to python3! Now I shold run this programm in BUSTER on a rasperry 4. As there is no more IDLE2 for Python2, I installed sudo apt-get install idle But…
Hermann
  • 21
  • 2
2
votes
0 answers

Updating python version3.6 to python 3.8.1

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 via pip. For example, I tried to download flask…
1
2 3 4 5 6