Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Downgrade Python 3.7 to 3.5 on Raspbian Buster

So it seems like Buster comes default with 2.7 on load and an alternate 3.7 version of Python. However, I am using this Raspberry Pi 3 B+ just for an application that is only compatible with Python 3.5. How do run Python 3.5 as default version or remove 3.7 entirely from Buster?

like image 275
Stigma Avatar asked Dec 09 '25 16:12

Stigma


1 Answers

I truly believe that you can just install python3.5 from the source repos.

If you want to install python 3.5.4 :

sudo apt-get install python3.5

If you want to install python 3.5.3 (Debian Stretch) :

Edit as root /etc/apt/source.list and add the following repos,

deb http://mirrordirector.raspbian.org/raspbian/ stretch main contrib non-free

rpi firmware deb http://archive.raspberrypi.org/debian/ stretch main ui

Then install the specific package version from the target repo using the following command :

sudo apt-get install python3.5 -t stretch

If want to install pip3.5 (which i guess you would need) :

wget https://bootstrap.pypa.io/get-pip.py

python3.5 ./get-pip.py

like image 74
Sourindu Chatterjee Avatar answered Dec 12 '25 04:12

Sourindu Chatterjee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!