Public bug reported:

After upgrading to focal, there is no `/usr/bin/python` executable and
no `python` package that can installed.

As are result:
- 3rd party packages that require a `python` package fail to install or are 
removed during upgrade or `apt --fix-broken install`
- software installed using `pip install --user` does not function after an 
upgrade to focal

The python runtime packages (`python2.7-minimal` and
`python3.7-minimal`) should provider a `/usr/bin/python` alternative
using the standard `update-alternatives` mechanisms, similar to how
other compilers and interpreters, such as gcc, php or java are doing it.

Workarounds:

1. Create a dummy package to provide the `python` requirement so that
3rd party packages will not be deemed broken and removed (for example,
slack-desktop), by running

equivs-build <(echo "Section: misc
Priority: optional
Standards-Version: 3.9.2

Package: python-dummy
Version: 1.0
Provides: python
Architecture: all
Description: Transitional package to provide the `python` requirement for 3rd 
party packages
") && sudo dpkg -i python-dummy_1.0_all.deb

2. Create a update-alternative configuration for /usr/bin/python that
can be configured by the local admin to use python2 or python3, but
defaults to python3, by running:

update-alternatives --install /usr/bin/python python /usr/bin/python2.7 2070 \
            --slave /usr/share/man/man1/python.1.gz python.1.gz 
/usr/share/man/man1/python3.8.1.gz
update-alternatives --install /usr/bin/python python /usr/bin/python3.7 3070 \
            --slave /usr/share/man/man1/python.1.gz python.1.gz 
/usr/share/man/man1/python3.7.1.gz
update-alternatives --install /usr/bin/python python /usr/bin/python3.8 3080 \
            --slave /usr/share/man/man1/python.1.gz python.1.gz 
/usr/share/man/man1/python3.8.1.gz

(this assumes both python2.7, python3.7 and python3.8 - which was the
setup on my system after upgrading from eoan to focal)

** Affects: python-defaults (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1862537

Title:
  No /usr/bin/python or `python` package is provided on focal

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-defaults/+bug/1862537/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to