Skip to content

error: failed-wheel-build-for-install × Failed to build installable wheels for some pyproject.toml based projects ╰─> typed-ast #500

@monaco-pkt

Description

@monaco-pkt

Trying to install with

pip install fastapi-code-generator

on ubuntu 24.04

python --version
Python 3.13.11

pip --version
pip 25.3

I had


Building wheels for collected packages: typed-ast
  Building wheel for typed-ast (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for typed-ast (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [26 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-313/typed_ast
      copying typed_ast/conversions.py -> build/lib.linux-x86_64-cpython-313/typed_ast
      copying typed_ast/__init__.py -> build/lib.linux-x86_64-cpython-313/typed_ast
      copying typed_ast/ast27.py -> build/lib.linux-x86_64-cpython-313/typed_ast
      copying typed_ast/ast3.py -> build/lib.linux-x86_64-cpython-313/typed_ast
      creating build/lib.linux-x86_64-cpython-313/typed_ast/tests
      copying ast3/tests/test_basics.py -> build/lib.linux-x86_64-cpython-313/typed_ast/tests
      running build_ext
      building '_ast27' extension
      creating build/temp.linux-x86_64-cpython-313/ast27/Custom
      creating build/temp.linux-x86_64-cpython-313/ast27/Parser
      creating build/temp.linux-x86_64-cpython-313/ast27/Python
      cc -pthread -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -O3 -fPIC -fPIC -Iast27/Include -I/home/vagrant/PycharmProjects/SAI/dockerized/src/.venv/include -I/home/vagrant/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/include/python3.13 -c ast27/Custom/typed_ast.c -o build/temp.linux-x86_64-cpython-313/ast27/Custom/typed_ast.o
      In file included from /home/vagrant/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/include/python3.13/pyport.h:358,
                       from /home/vagrant/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/include/python3.13/Python.h:64,
                       from ast27/Custom/typed_ast.c:1:
      ast27/Custom/../Include/compile.h:12:12: error: unknown type name ‘PyFutureFeatures’
         12 | PyAPI_FUNC(PyFutureFeatures *) PyFuture_FromAST(struct _mod *, const char *);
            |            ^~~~~~~~~~~~~~~~
      /home/vagrant/.local/share/uv/python/cpython-3.13.11-linux-x86_64-gnu/include/python3.13/exports.h:94:53: note: in definition of macro ‘PyAPI_FUNC’
         94 | #       define PyAPI_FUNC(RTYPE) Py_EXPORTED_SYMBOL RTYPE
            |                                                     ^~~~~
      error: command '/usr/bin/cc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for typed-ast
Failed to build typed-ast                                                                                                                                                                                                           
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> typed-ast

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions