installing older version of python3

Programming languages, Coding, executables, and scripting.
Post Reply
Message
Author
morgon
Posts: 189
Joined: 2010-08-28 03:04

installing older version of python3

#1 Post by morgon »

Hi,

I am running Debian testing and have installed python 3.8.2.

For a particular software I now need python 3.7.

Is there any sensible way that I could install such an older version via aptitude so that both versions can coexist?

Many thanks!

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 3684
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 3 times
Been thanked: 6 times

Re: installing older version of python3

#2 Post by sunrat »

Your mysterious undisclosed "particular software" will probably work with python3.8 so just symlink it:

Code: Select all

ln -s /usr/bin/python3.8 python3.7
or maybe better:

Code: Select all

ln -s /usr/bin/python3 python3.7
This actually and surprisingly worked for me for one application which was looking for python2 after I had removed python2 in sid, just symlinked python2 to python3. Not guaranteed that would work for all python2 applications but much more likely it would work for python3.7 to 3.8.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

morgon
Posts: 189
Joined: 2010-08-28 03:04

Re: installing older version of python3

#3 Post by morgon »

Actually (and not so surprisingly as it is the topic of several issues) the GUI-framework kivy does not work (yet) with python 3.8.

Unfortunately I want to run katrain which does depend on it, so your hack does not work for me.

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 3684
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 3 times
Been thanked: 6 times

Re: installing older version of python3

#4 Post by sunrat »

Looks like you can install kivy on python3.8 with pip - https://github.com/kivy/kivy/issues/656 ... -560039155
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

morgon
Posts: 189
Joined: 2010-08-28 03:04

Re: installing older version of python3

#5 Post by morgon »

It's not working with pip on my system.

Please do not "help" me anymore.

User avatar
sunrat
Global Moderator
Global Moderator
Posts: 3684
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 3 times
Been thanked: 6 times

Re: installing older version of python3

#6 Post by sunrat »

morgon wrote:It's not working with pip on my system.

Please do not "help" me anymore.
You're welcome. :mrgreen:
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
sickpig
Posts: 589
Joined: 2019-01-23 10:34

Re: installing older version of python3

#7 Post by sickpig »

morgon wrote:Is there any sensible way that I could install such an older version via aptitude so that both versions can coexist?

Code: Select all

update-alternatives
is Debian's very own tool to manage multiple versions of packages like python. A gui front-end is available via galternatives.

Flavie
Posts: 1
Joined: 2020-12-10 04:04

Re: installing older version of python3

#8 Post by Flavie »

Just change the version number to use a different python version.
1)Download the latest versions of python from python.org/downloads by selecting the relevant version for your system.
2)Run the installer and select Add python 3. x to the path to set path automatically in python 3.


official site

Post Reply