Skip to content

pip安装错误 #13

@Carry-Rao

Description

@Carry-Rao

× Building wheel for functools (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [102 lines of output]
src/compose.c: 在函数‘compose_dealloc’中:
src/compose.c:96:11: 错误:‘struct compose’没有名为‘ob_type’的成员
96 | co->ob_type->tp_free(co);
| ^~
src/compose.c: 在函数‘compose_repr’中:
src/compose.c:137:13: 错误:implicit declaration of function ‘PyString_FromFormat’; did you mean ‘PyBytes_FromFormat’? [-Wimplicit-function-declaration]
137 | s = PyString_FromFormat("<composition on %s at %p>",
| ^~~~~~~~~~~~~~~~~~~
| PyBytes_FromFormat
src/compose.c:138:13: 错误:隐式声明函数‘PyString_AsString’ [-Wimplicit-function-declaration]
138 | PyString_AsString(grepr), (void *)co);
| ^~~~~~~~~~~~~~~~~
src/compose.c:137:11: 错误:assignment to ‘PyObject *’ {或称 ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
137 | s = PyString_FromFormat("<composition on %s at %p>",
| ^
src/compose.c: 在文件作用域:
src/compose.c:143:36: 警告:初始值设定周围缺少花括号 [-Wmissing-braces]
143 | static PyTypeObject compose_type = {
| ^
包含于文件 /usr/include/python3.13/Python.h:72,
于 src/compose.c:31:
/usr/include/python3.13/object.h:138:9: 错误:initialization of ‘long int’ from ‘void *’ makes integer from pointer without a cast [-Wint-conversion]
138 | (type)
| ^
src/compose.c:144:9: 附注:在宏 ‘PyObject_HEAD_INIT’ 展开时
144 | PyObject_HEAD_INIT(NULL)
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.13/object.h:138:9: 附注:(在‘compose_type.ob_base.ob_size’的初始化附近)
138 | (type)
| ^
src/compose.c:144:9: 附注:在宏 ‘PyObject_HEAD_INIT’ 展开时
144 | PyObject_HEAD_INIT(NULL)
| ^~~~~~~~~~~~~~~~~~
src/compose.c:143:36: 警告:初始值设定周围缺少花括号 [-Wmissing-braces]
143 | static PyTypeObject compose_type = {
| ^
src/compose.c:146:9: 错误:initialization of ‘long int’ from ‘char ’ makes integer from pointer without a cast [-Wint-conversion]
146 | "compose", /
tp_name /
| ^~~~~~~~~
src/compose.c:146:9: 附注:(在‘compose_type.tp_basicsize’的初始化附近)
src/compose.c:150:9: 错误:initialization of ‘long int’ from ‘void (
)(PyObject )’ {或称 ‘void ()(struct _object )’} makes integer from pointer without a cast [-Wint-conversion]
150 | (destructor)compose_dealloc, /
tp_dealloc */
| ^
src/compose.c:150:9: 附注:(在‘compose_type.tp_vectorcall_offset’的初始化附近)
src/compose.c:155:9: 错误:initialization of ‘PyNumberMethods ’ from incompatible pointer type ‘PyObject * ()(PyObject )’ {或称 ‘struct _object * ()(struct _object )’} [-Wincompatible-pointer-types]
155 | (reprfunc)compose_repr, /
tp_repr /
| ^
src/compose.c:155:9: 附注:(在‘compose_type.tp_as_number’的初始化附近)
src/compose.c:160:9: 错误:initialization of ‘PyObject * (
)(PyObject )’ {或称 ‘struct _object * ()(struct _object )’} from incompatible pointer type ‘PyObject * ()(PyObject *, PyObject *, PyObject )’ {或称 ‘struct _object * ()(struct _object *, struct _object *, struct _object )’} [-Wincompatible-pointer-types]
160 | (ternaryfunc)compose_call, /
tp_call */
| ^
src/compose.c:160:9: 附注:(在‘compose_type.tp_str’的初始化附近)
/usr/include/python3.13/object.h:724:29: 错误:initialization of ‘const char ’ from ‘long unsigned int’ makes pointer from integer without a cast [-Wint-conversion]
724 | #define Py_TPFLAGS_DEFAULT (
| ^
src/compose.c:165:9: 附注:在宏 ‘Py_TPFLAGS_DEFAULT’ 展开时
165 | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
| ^~~~~~~~~~~~~~~~~~
/usr/include/python3.13/object.h:724:29: 附注:(在‘compose_type.tp_doc’的初始化附近)
724 | #define Py_TPFLAGS_DEFAULT (
| ^
src/compose.c:165:9: 附注:在宏 ‘Py_TPFLAGS_DEFAULT’ 展开时
165 | Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC |
| ^~~~~~~~~~~~~~~~~~
src/compose.c:167:9: 错误:initialization of ‘int (
)(PyObject , int ()(PyObject *, void *), void )’ {或称 ‘int ()(struct _object , int ()(struct _object *, void *), void *)’} from incompatible pointer type ‘const char ’ [-Wincompatible-pointer-types]
167 | compose_doc, /
tp_doc /
| ^~~~~~~~~~~
src/compose.c:167:9: 附注:(在‘compose_type.tp_traverse’的初始化附近)
src/compose.c:168:9: 错误:initialization of ‘int (
)(PyObject )’ {或称 ‘int ()(struct _object )’} from incompatible pointer type ‘int ()(PyObject , int ()(PyObject *, void *), void )’ {或称 ‘int ()(struct _object , int ()(struct _object *, void *), void )’} [-Wincompatible-pointer-types]
168 | (traverseproc)compose_traverse, /
tp_traverse /
| ^
src/compose.c:168:9: 附注:(在‘compose_type.tp_clear’的初始化附近)
src/compose.c:179:9: 错误:initialization of ‘int (
)(PyObject *, PyObject *, PyObject )’ {或称 ‘int ()(struct _object *, struct _object *, struct _object )’} from incompatible pointer type ‘PyObject * ()(PyObject *, PyObject )’ {或称 ‘struct _object * ()(struct _object *, struct _object )’} [-Wincompatible-pointer-types]
179 | PyMethod_New, /
tp_descr_get */
| ^~~~~~~~~~~~
src/compose.c:179:9: 附注:(在‘compose_type.tp_descr_set’的初始化附近)
包含于文件 /usr/include/python3.13/Python.h:98:
/usr/include/python3.13/cpython/classobject.h:24:24: 附注:‘PyMethod_New’ declared here
24 | PyAPI_FUNC(PyObject *) PyMethod_New(PyObject *, PyObject );
| ^~~~~~~~~~~~
src/compose.c:184:9: 错误:initialization of ‘void (
)(void )’ from incompatible pointer type ‘PyObject * ()(PyTypeObject *, PyObject *, PyObject )’ {或称 ‘struct _object * ()(struct _typeobject *, struct _object *, struct _object )’} [-Wincompatible-pointer-types]
184 | compose_new, /
tp_new */
| ^~~~~~~~~~~
src/compose.c:184:9: 附注:(在‘compose_type.tp_free’的初始化附近)
src/compose.c:52:1: 附注:‘compose_new’ declared here
52 | compose_new(PyTypeObject *type, PyObject *args, PyObject kw)
| ^~~~~~~~~~~
src/compose.c:185:9: 错误:initialization of ‘int (
)(PyObject )’ {或称 ‘int ()(struct _object )’} from incompatible pointer type ‘void ()(void )’ [-Wincompatible-pointer-types]
185 | PyObject_GC_Del, /
tp_free */
| ^~~~~~~~~~~~~~~
src/compose.c:185:9: 附注:(在‘compose_type.tp_is_gc’的初始化附近)
包含于文件 /usr/include/python3.13/Python.h:73:
/usr/include/python3.13/objimpl.h:178:18: 附注:‘PyObject_GC_Del’ declared here
178 | PyAPI_FUNC(void) PyObject_GC_Del(void *);
| ^~~~~~~~~~~~~~~
src/compose.c:143:36: 警告:初始值设定周围缺少花括号 [-Wmissing-braces]
143 | static PyTypeObject compose_type = {
| ^
src/compose.c:28:19: 警告:‘rcsid’ 在此处定义 [-Wunused-const-variable=]
28 | static const char rcsid[] = "@(#)$Dima: pylib/functools/src/compose.c,v 1.3 2005/08/22 07:39:33 dima Exp $";
| ^~~~~
error: command '/usr/bin/gcc' 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 functools
Failed to build functools
error: failed-wheel-build-for-install

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

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