deadsnakes / issues

Issues for https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
86 stars 6 forks source link

Installing pip with get-pip.py tracebacks on Python 3.10.0b1 #168

Closed mattclay closed 3 years ago

mattclay commented 3 years ago

description

After installing python3.10-dev and python3.10-distutils from the deadsnakes PPA, I tried installing pip from https://bootstrap.pypa.io/get-pip.py and encountered the following traceback:

ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/tmpl5nzscv6/pip.zip/pip/_internal/cli/base_command.py", line 180, in _main
    status = self.run(options, args)
  File "/tmp/tmpl5nzscv6/pip.zip/pip/_internal/cli/req_command.py", line 204, in wrapper
    return func(self, options, args)
  File "/tmp/tmpl5nzscv6/pip.zip/pip/_internal/commands/install.py", line 242, in run
    options.use_user_site = decide_user_install(
  File "/tmp/tmpl5nzscv6/pip.zip/pip/_internal/commands/install.py", line 655, in decide_user_install
    if site_packages_writable(root=root_path, isolated=isolated_mode):
  File "/tmp/tmpl5nzscv6/pip.zip/pip/_internal/commands/install.py", line 600, in site_packages_writable
    get_lib_location_guesses(root=root, isolated=isolated))
  File "/tmp/tmpl5nzscv6/pip.zip/pip/_internal/commands/install.py", line 585, in get_lib_location_guesses
    scheme = get_scheme(
  File "/tmp/tmpl5nzscv6/pip.zip/pip/_internal/locations/__init__.py", line 80, in get_scheme
    old = _distutils.get_scheme(
  File "/tmp/tmpl5nzscv6/pip.zip/pip/_internal/locations/_distutils.py", line 110, in get_scheme
    scheme = _distutils_scheme(dist_name, user, home, root, isolated, prefix)
  File "/tmp/tmpl5nzscv6/pip.zip/pip/_internal/locations/_distutils.py", line 51, in _distutils_scheme
    i.finalize_options()
  File "/usr/lib/python3.10/distutils/command/install.py", line 291, in finalize_options
    self.finalize_unix()
  File "/usr/lib/python3.10/distutils/command/install.py", line 473, in finalize_unix
    self.select_scheme("unix_local")
  File "/usr/lib/python3.10/distutils/command/install.py", line 500, in select_scheme
    scheme = INSTALL_SCHEMES[name]
KeyError: 'unix_local'

This appears to be due to the Debian specific patch found here: https://github.com/deadsnakes/python3.10/blob/608eed27e94574ae6b489dc3c71f2872ec74d77e/debian/patches/distutils-install-layout.diff#L86

Recent changes in CPython may be responsible for the patch no longer working: https://github.com/python/cpython/pull/24549

os information

lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.5 LTS
Release:        18.04
Codename:       bionic

uname -a

Linux 71ce4fb19320 4.15.0-142-generic #146-Ubuntu SMP Tue Apr 13 01:11:19 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
asottile commented 3 years ago

hmmm yes I can confirm this -- will need to fix this up -- thanks for the report!

asottile commented 3 years ago

this should in theory be fixed within a few hours -- thanks again for the report!