Title: ModuleNotFoundError: No module named '_sysconfigdata__linux_x86_64-linux-gnu'
Type: crash Stage:
Components: Versions: Python 3.8
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 | python3.8 - setuptools

The message:

ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/tmprv6tur0m/", line 178, in main
    status =, args)
  File "/tmp/tmprv6tur0m/", line 405, in run
    installed = install_given_reqs(
  File "/tmp/tmprv6tur0m/", line 54, in install_given_reqs
  File "/tmp/tmprv6tur0m/", line 919, in install
  File "/tmp/tmprv6tur0m/", line 440, in move_wheel_files
  File "/tmp/tmprv6tur0m/", line 318, in move_wheel_files
    scheme = distutils_scheme(
  File "/tmp/tmprv6tur0m/", line 180, in distutils_scheme
  File "/usr/lib/python3.8/distutils/command/", line 306, in finalize_options
    (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
  File "/usr/lib/python3.8/distutils/", line 501, in get_config_vars
  File "/usr/lib/python3.8/distutils/", 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.


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
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