classification
Title: ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'
Type: crash Stage:
Components: Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: christian.heimes, doko, luisalejandro
Priority: normal Keywords:

Created on 2019-07-13 01:52 by luisalejandro, last changed 2019-07-17 19:12 by doko.

Messages (6)
msg347765 - (view) Author: Luis Alejandro Martínez Faneyth (luisalejandro) Date: 2019-07-13 01:52
Hello everyone,

I've been building some minimal python docker images for a while and a few days ago an error popped out in my CI when building python 3.8 on debian sid. The error happens when trying to install pip with the usual:

curl -fsSL https://bootstrap.pypa.io/get-pip.py | python3.8 - setuptools

The message:

ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/cli/base_command.py", line 178, in main
    status = self.run(options, args)
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/commands/install.py", line 405, in run
    installed = install_given_reqs(
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/req/__init__.py", line 54, in install_given_reqs
    requirement.install(
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/req/req_install.py", line 919, in install
    self.move_wheel_files(
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/req/req_install.py", line 440, in move_wheel_files
    move_wheel_files(
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/wheel.py", line 318, in move_wheel_files
    scheme = distutils_scheme(
  File "/tmp/tmprv6tur0m/pip.zip/pip/_internal/locations.py", line 180, in distutils_scheme
    i.finalize_options()
  File "/usr/lib/python3.8/distutils/command/install.py", line 306, in finalize_options
    (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
  File "/usr/lib/python3.8/distutils/sysconfig.py", line 501, in get_config_vars
    func()
  File "/usr/lib/python3.8/distutils/sysconfig.py", line 461, in _init_posix
    _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'


You can check the full CI output[0] or the building script if you need to[1].

I've checked for similar bugs and I found #28046 but I don't know if this is related or not.

Thanks for the great work and I'm looking forward to help you fix this issue.

Luis

[0]https://travis-ci.org/LuisAlejandro/dockershelf/jobs/557990064
[1]https://github.com/LuisAlejandro/dockershelf/blob/master/python/build-image.sh
msg347766 - (view) Author: Luis Alejandro Martínez Faneyth (luisalejandro) Date: 2019-07-13 02:10
New information on this:

python3-distutils for 3.8 exists on Debian (experimental) but python3 (which is kind of a meta-package) for 3.8 doesn't exist. It depends on python3.8 or python3.7, resulting in the installation on python3.7.

Perhaps this is a bug to report on Debian instead of here, idk.
msg347788 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2019-07-13 09:15
Yes, this is most likely a packaging bug on Debian.

By the way, Python comes with an ensurepip module. To install pip, just execute "python3.8 -m ensurepip".
msg348017 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2019-07-16 14:39
this is issue #37561, making the sysconfigdata file name not changing with the kernel version of the OS.  I need to commit that patch to the trunk and 3.8.  But apparently pip needs to be aware of that as well ...
msg348018 - (view) Author: Luis Alejandro Martínez Faneyth (luisalejandro) Date: 2019-07-16 14:51
Thanks Christian for the suggestion and Matthias.
msg348079 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2019-07-17 19:12
Luis, I'm still trying to figure out why you are seeing that. Please could you report the package versions which are installed on the system?

dpkg -l python3.7 python3.8 python3-distutils
History
Date User Action Args
2019-07-17 19:12:21dokosetmessages: + msg348079
2019-07-16 14:51:32luisalejandrosetmessages: + msg348018
2019-07-16 14:39:19dokosetmessages: + msg348017
2019-07-15 18:50:42brett.cannonsetnosy: + doko
2019-07-13 09:15:58christian.heimessetnosy: + christian.heimes
messages: + msg347788
2019-07-13 02:10:38luisalejandrosettype: crash
messages: + msg347766
2019-07-13 01:52:11luisalejandrocreate