[Bug 1718035] [NEW] python 3.5 and 2.7 don't provide update-alternatives
Christ Schlacta
1718035 at bugs.launchpad.net
Mon Sep 18 20:33:30 UTC 2017
Public bug reported:
Python 3.5 and python 2.7 don't currently install themselves as
alternatives. Furthermore, install packages that depend on python2
don't call python2 during their install process and instead call python.
When architecting solutions that depend on python pointing to python3,
this can cause problems installing updates and packages through apt as
well. Python system should be updated to always call python2 or python3
and not generic python, and python3 and python2 should provide
alternatives by default.
lsb_release -rd
Description: Ubuntu 16.04.3 LTS
Release: 16.04
apt-cache policy python python3
python:
Installed: 2.7.11-1
Candidate: 2.7.11-1
Version table:
*** 2.7.11-1 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
python3:
Installed: 3.5.1-3
Candidate: 3.5.1-3
Version table:
*** 3.5.1-3 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
Expected behaviour:
Install Python, Install Python 3.
sudo update-alternatives --config python
There are 3 choices for the alternative python (providing /usr/bin/python).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/python2.7 40 auto mode
* 1 /usr/bin/python2.7 40 manual mode
2 /usr/bin/python3.5 40 manual mode
3 /usr/bin/python3.5m 30 manual mode
Press <enter> to keep the current choice[*], or type selection number: 2
sudo apt-get install python-somepackagewhichusespython2;
apt-get installs successfully here
What actually happens:
Install Python, Install Python 3.
sudo update-alternatives --config python
Some absurd message about python not being an alternative.
sudo update-alternatives --install python /usr/bin/python /usr/bin/python2.7 40
sudo update-alternatives --install python /usr/bin/python /usr/bin/python3.5 40
sudo update-alternatives --install python /usr/bin/python /usr/bin/python3.5m 30
sudo update-alternatives --config python
There are 3 choices for the alternative python (providing /usr/bin/python).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/python2.7 40 auto mode
* 1 /usr/bin/python2.7 40 manual mode
2 /usr/bin/python3.5 40 manual mode
3 /usr/bin/python3.5m 30 manual mode
Press <enter> to keep the current choice[*], or type selection number: 2
sudo apt-get install python-somepackagewhichusespython2;
apt-get just blatantly fails here because python points to python 3 now and someone didn't think to make them use python2
** Affects: python2.7 (Ubuntu)
Importance: Undecided
Status: New
** Affects: python3.5 (Ubuntu)
Importance: Undecided
Status: New
** Also affects: python2.7 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python3.5 in Ubuntu.
https://bugs.launchpad.net/bugs/1718035
Title:
python 3.5 and 2.7 don't provide update-alternatives
Status in python2.7 package in Ubuntu:
New
Status in python3.5 package in Ubuntu:
New
Bug description:
Python 3.5 and python 2.7 don't currently install themselves as
alternatives. Furthermore, install packages that depend on python2
don't call python2 during their install process and instead call
python. When architecting solutions that depend on python pointing to
python3, this can cause problems installing updates and packages
through apt as well. Python system should be updated to always call
python2 or python3 and not generic python, and python3 and python2
should provide alternatives by default.
lsb_release -rd
Description: Ubuntu 16.04.3 LTS
Release: 16.04
apt-cache policy python python3
python:
Installed: 2.7.11-1
Candidate: 2.7.11-1
Version table:
*** 2.7.11-1 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
python3:
Installed: 3.5.1-3
Candidate: 3.5.1-3
Version table:
*** 3.5.1-3 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
100 /var/lib/dpkg/status
Expected behaviour:
Install Python, Install Python 3.
sudo update-alternatives --config python
There are 3 choices for the alternative python (providing /usr/bin/python).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/python2.7 40 auto mode
* 1 /usr/bin/python2.7 40 manual mode
2 /usr/bin/python3.5 40 manual mode
3 /usr/bin/python3.5m 30 manual mode
Press <enter> to keep the current choice[*], or type selection number:
2
sudo apt-get install python-somepackagewhichusespython2;
apt-get installs successfully here
What actually happens:
Install Python, Install Python 3.
sudo update-alternatives --config python
Some absurd message about python not being an alternative.
sudo update-alternatives --install python /usr/bin/python /usr/bin/python2.7 40
sudo update-alternatives --install python /usr/bin/python /usr/bin/python3.5 40
sudo update-alternatives --install python /usr/bin/python /usr/bin/python3.5m 30
sudo update-alternatives --config python
There are 3 choices for the alternative python (providing /usr/bin/python).
Selection Path Priority Status
------------------------------------------------------------
0 /usr/bin/python2.7 40 auto mode
* 1 /usr/bin/python2.7 40 manual mode
2 /usr/bin/python3.5 40 manual mode
3 /usr/bin/python3.5m 30 manual mode
Press <enter> to keep the current choice[*], or type selection number:
2
sudo apt-get install python-somepackagewhichusespython2;
apt-get just blatantly fails here because python points to python 3 now and someone didn't think to make them use python2
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1718035/+subscriptions
More information about the foundations-bugs
mailing list