Skip to content

[BUG] No module named '_sysconfigdata_d_linux_x86_64-linux-gnu' #2946

Closed
@henryiii

Description

@henryiii

setuptools version

setuptools==60.0.0

Python version

Python 3.9

OS

Ubuntu 20.04

Additional environment information

Can reproduce in Docker or with deadsnakes action.

Description

Today, 3.9 deadsnakes debug builds on GitHub Actions for pybind11 started failing with ModuleNotFoundError: No module named '_sysconfigdata_d_linux_x86_64-linux-gnu'. Setting SETUPTOOLS_USE_DISTUTILS=stdlib` fixes it.

Logs: https://github.com/pybind/pybind11/runs/4583094186?check_suite_focus=true

Original report: deadsnakes/issues#188

Expected behavior

It should be possible to use setuptools and sysconfig on Python 3.9 debug builds! :)

How to Reproduce

deadsnakes/action@v2.1.1 on ubuntu-latest, GHA, followed by the final line below. Or it can be reproduced in Docker. Here is a MWE:

$ docker run --rm -it ubuntu:20.04
# apt update && apt install software-properties-common -y
# add-apt-repository ppa:deadsnakes/ppa && apt update && apt install -y python3.9-dev python3.9-dbg python3.9-venv python3.9-distutils
# python3.9-dbg -m venv .venv
# ./.venv/bin/python -m pip install -U pip setuptools wheel
# ./.venv/bin/python -c "import setuptools; from distutils import sysconfig as s; s.get_config_var('LDVERSION')"

Output

Traceback (most recent call last):
  File "/.venv/lib/python3.9/site-packages/setuptools/_distutils/sysconfig.py", line 488, in _init_posix
    _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
ModuleNotFoundError: No module named '_sysconfigdata_d_linux_x86_64-linux-gnu'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/.venv/lib/python3.9/site-packages/setuptools/_distutils/sysconfig.py", line 601, in get_config_var
    return get_config_vars().get(name)
  File "/.venv/lib/python3.9/site-packages/setuptools/_distutils/sysconfig.py", line 532, in get_config_vars
    func()
  File "/.venv/lib/python3.9/site-packages/setuptools/_distutils/sysconfig.py", line 491, in _init_posix
    _temp = __import__(
ModuleNotFoundError: No module named '_sysconfigdata'

Code of Conduct

  • I agree to follow the PSF Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions