[BUG] No module named '_sysconfigdata_d_linux_x86_64-linux-gnu'
envgap__pypa__setuptools-2946
Original GitHub issue ↗Opened 2021-12-20
01 / FAILURE SIGNATURE
As reported upstream
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.
Not a benchmark task.
- No curated issue-specific recipe or verified environment fix is available.
02 / ENVIRONMENT RECIPE
- Base commit
Not freshly verified- Manifest
requirements.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
pypa/setuptools #2946 · read the original issue
### 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: https://github.com/deadsnakes/issues/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:
```console
$ 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
```pytb
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
- [X] I agree to follow the PSF Code of Conduct04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]
Issue-specific recipe and runtime smoke command require review against the complete issue and repository.
Legacy already_works is install-only; proposed control still requires runtime verification.