python2 no more supported

Skip to first unread message

Rachade Issaka

Jan 23, 2022, 10:06:35 AM1/23/22
to PrivateEyePi
I m using Raspberry 4 with bullseye as image. Since python3 is the standart installed version there and python2 is no more supported, I couldnt install nether numpy or pyserial. have u already updated your code for using with python3 or do u have a solution ?

Glenn Seaton

Feb 23, 2022, 12:53:03 PM2/23/22
to PrivateEyePi
The PEP applications  have been upgraded to support python 3 and are available for download on at
The rf_tools have been upgraded to work with python 3 and are still backward compatible with python 2.  They are the default download at

The application numpy has a python 3 version, to install use  the command: pip3 install numpy

Mar 29, 2022, 4:33:55 PM3/29/22
to PrivateEyePi
Can someone post a working example for Python3?
My old setup stopped working so I upgrade to Jessie with Python 3, but when I run "Sudo python" i get the following errors:

An exception of type TypeError occurred. Arguments:
("argument should be integer or bytes-like object, not 'str'",)
argument should be integer or bytes-like object, not 'str'

Any help would be appreciated!


Glenn Seaton

Mar 29, 2022, 5:13:29 PM3/29/22
to PrivateEyePi
Did you download the python3 version of the apps?
The was upgraded to work under python3.
The links to python 2 and python 3 of the apps are on the Install Upgrade page
Jessie still has Python 2.7 which should still be on your system as the default when you enter python.
If you did not get the python3 version, version 2 should still work with the "python" command like you had been doing.

If you did upgrade the apps to python3, an that failed, there should have been a failed at line xxx as part of the message.  I would need that to help find a problem.


Glenn Seaton

Apr 2, 2022, 12:24:43 AM4/2/22
to PrivateEyePi

There was an issue with the python 3 upgrade that caused the error.

The problem was the string split function under Python 2 did not care if the string to split was empty.  It returned a blank result.
The same String Split function under Python 3, if the string is empty, processes it as a bad format and fails.
I have added checks in the code, to test for empty and continue working.
The current for Python 3 is now Version 15.00.
I tested the application. It reads my hardwired sensor under python 3 and sends reading to the server.
The updated is online and can be downloaded.

On Tuesday, March 29, 2022 at 3:33:55 PM UTC-5 wrote:
Reply all
Reply to author
0 new messages