Skip to content

Pin Python version#201

Open
Fi5t wants to merge 1 commit into
sashs:masterfrom
Fi5t:patch-1
Open

Pin Python version#201
Fi5t wants to merge 1 commit into
sashs:masterfrom
Fi5t:patch-1

Conversation

@Fi5t

@Fi5t Fi5t commented Jun 2, 2026

Copy link
Copy Markdown

I tried to build a Docker container and encountered this error:

Collecting filebytes>=0.10.0 (from ropper==1.13.13)
    Downloading filebytes-0.10.2.tar.gz (20 kB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'error'
    error: subprocess-exited-with-error

    × Getting requirements to build wheel did not run successfully.
    │ exit code: 1
    ╰─> [24 lines of output]
        Traceback (most recent call last):
          File "/usr/local/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
            main()
            ~~~~^^
          File "/usr/local/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
            json_out["return_val"] = hook(**hook_input["kwargs"])
                                     ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
          File "/usr/local/lib/python3.14/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
            return hook(config_settings)
          File "/tmp/pip-build-env-977i77r8/overlay/lib/python3.14/site-packages/setuptools/build_meta.py", line 333, in get_requires_for_build_wheel
            return self._get_build_requires(config_settings, requirements=[])
                   ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/tmp/pip-build-env-977i77r8/overlay/lib/python3.14/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
            self.run_setup()
            ~~~~~~~~~~~~~~^^
          File "/tmp/pip-build-env-977i77r8/overlay/lib/python3.14/site-packages/setuptools/build_meta.py", line 520, in run_setup
            super().run_setup(setup_script=setup_script)
            ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
          File "/tmp/pip-build-env-977i77r8/overlay/lib/python3.14/site-packages/setuptools/build_meta.py", line 317, in run_setup
            exec(code, locals())
            ~~~~^^^^^^^^^^^^^^^^
          File "<string>", line 19, in <module>
          File "<string>", line 11, in extractMetaInfo
        AttributeError: module 'ast' has no attribute 'Str'
        [end of output]

    note: This error originates from a subprocess, and is likely not a problem with pip.

I was able to fix it by pinning the Python version.

Root cause: FROM python pulled Python 3.14, which removed ast.Str (gone since 3.12). The filebytes dependency uses ast.Str in its build system, so it crashes on 3.12+. Pinning to python:3.11 resolves this.

`FROM python` pulled the last Python (3.14 for now), which removed `ast.Str` (gone since 3.12). The `filebytes` dependency uses `ast.Str` in its build system, so it crashes on 3.12+. Pinning to `python:3.11` resolves this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant