Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[Feature] Python2 on Debian Bookworm

- - ALL UNSTABLE / TESTING THREADS SHOULD BE POSTED HERE - -
This sub-forum is the dedicated area for the ongoing Unstable/Testing releases of Debian. Advanced, or Experienced User support only. Use the software, give, and take advice with caution.
Post Reply
Message
Author
puneearyan
Posts: 2
Joined: 2023-03-03 06:23
Has thanked: 1 time

[Feature] Python2 on Debian Bookworm

#1 Post by puneearyan »

Hi,

I am working on Debian Bookworm to validate GPU features using Wayland 10. i have more number of Python2 scripts to execute the test case. Unfortunately Python2 support is completely dropped in Debian Bookworm.

Is there a way to get Python2 support on Debian Bookworm like adding ppa repository in the multistrap.conf.

Thanks,

User avatar
sunrat
Administrator
Administrator
Posts: 6511
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 119 times
Been thanked: 489 times

Re: [Feature] Python2 on Debian Bookworm

#2 Post by sunrat »

Bookworm is Testing so moved to Testing and Unstable subforum.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

Dai_trying
Posts: 1101
Joined: 2016-01-07 12:25
Has thanked: 7 times
Been thanked: 16 times

Re: [Feature] Python2 on Debian Bookworm

#3 Post by Dai_trying »

puneearyan wrote: 2023-03-03 06:39Is there a way to get Python2 support on Debian Bookworm like adding ppa repository in the multistrap.conf.
Although this doesn't answer you question my approach would be to convert the scripts to Python3 in order to save more work (and workarounds) in the future...

puneearyan
Posts: 2
Joined: 2023-03-03 06:23
Has thanked: 1 time

Re: [Feature] Python2 on Debian Bookworm

#4 Post by puneearyan »

Thanks @Dai_trying for your quick response.

Indeed, we also have plans to upgrade Python 2 scripts to Python 3. In the mean time, I simply wanted to experiment with adding Python2 support to Bookworm for quick verification.. Was curious to know if it is possible.

Anyway thanks for the update.

User avatar
abu_bua
Posts: 22
Joined: 2022-02-25 19:30
Has thanked: 13 times
Been thanked: 4 times

Re: [Feature] Python2 on Debian Bookworm

#5 Post by abu_bua »

For the sake of simplicity I would use anaconda.

User avatar
sunrat
Administrator
Administrator
Posts: 6511
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 119 times
Been thanked: 489 times

Re: [Feature] Python2 on Debian Bookworm

#6 Post by sunrat »

abu_bua wrote: 2023-03-05 20:49 For the sake of simplicity I would use anaconda.
Please explain how that would help the OP with Python2, considering the page you linked says anaconda is Python 3.9.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

waymao
Posts: 1
Joined: 2023-10-04 03:39

Re: [Feature] Python2 on Debian Bookworm

#7 Post by waymao »

Regarding anaconda, you will need to install python3 and download some variant of anaconda. Mini Forge would be one distribution of conda.
Then you may run

Code: Select all

conda create -n <environment name> python=2
and python2 will be installed for the environment chosen.

fadedbee
Posts: 2
Joined: 2024-01-18 22:20

Re: [Feature] Python2 on Debian Bookworm

#8 Post by fadedbee »

I have installed Python 2.7 in Debian 12 (Bookworm) using Debian 11 (Bullseye) packages:

Installing Python 2.7 on Debian 12 (Bookworm)

User avatar
sunrat
Administrator
Administrator
Posts: 6511
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 119 times
Been thanked: 489 times

Re: [Feature] Python2 on Debian Bookworm

#9 Post by sunrat »

Note that installing packages from foreign releases is not supported officially and is classed as creating a Frankendebian.
Of course it may work fine but if it doesn't you are on your own. Python 2 was sunsetted 4 years ago - https://www.python.org/doc/sunset-python-2/
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

fadedbee
Posts: 2
Joined: 2024-01-18 22:20

Re: [Feature] Python2 on Debian Bookworm

#10 Post by fadedbee »

Thanks for the warning, I have added it to my blog post. Does this only become a practical issue if Debian 12 adds packages whose files clash with those provided by these specific Debian 11 packages? Or there other things to watch out for? (I doubt that Debian will add packages for python 2.7, libffi7 or libssl1.1 in future.)

Post Reply