Unable to install langserve - error[E0425]: cannot find function _PyDict_NewPresized in crate pyo3_ffi #115

Closed
opened 2026-02-16 00:18:52 -05:00 by yindo · 2 comments
Owner

Originally created by @magick93 on GitHub (Feb 6, 2024).

I'm trying to install langserve but get the following error.

Command

pip install langserve[server]

Version

Python 3.9.16 (feeb267ead3e6771d3f2f49b83e1894839f64fb7, Dec 29 2022, 14:23:21)
[PyPy 7.3.11 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]

Error

error: subprocess-exited-with-error
  
  × Building wheel for orjson (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [567 lines of output]
      Running `maturin pep517 build-wheel -i /home/anton/git/yestech/freedom/packages/autogentle/.venv/bin/python --compatibility off`
      📦 Including license file "/tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/LICENSE-APACHE"
      📦 Including license file "/tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/LICENSE-MIT"
      🍹 Building a mixed python/rust project
      🔗 Found pyo3-ffi bindings
      🐍 Found PyPy 3.9 at /home/anton/git/yestech/freedom/packages/autogentle/.venv/bin/python
         Compiling target-lexicon v0.12.13
         Compiling once_cell v1.19.0
         Compiling libc v0.2.153
         Compiling crunchy v0.2.2
         Compiling serde v1.0.196
         Compiling version_check v0.9.4
         Compiling tiny-keccak v2.0.2
         Compiling cfg-if v1.0.0
         Compiling autocfg v1.1.0
         Compiling rustversion v1.0.14
         Compiling ahash v0.8.6
         Compiling num-traits v0.2.17
         Compiling serde_json v1.0.113
         Compiling itoa v1.0.10
         Compiling ryu v1.0.16
         Compiling zerocopy v0.7.32
         Compiling static_assertions v1.1.0
         Compiling pyo3-build-config v0.20.2
         Compiling encoding_rs v0.8.33
         Compiling getrandom v0.2.12
         Compiling cc v1.0.83
         Compiling castaway v0.2.2
         Compiling const-random-macro v0.1.16
         Compiling simdutf8 v0.1.4
         Compiling itoap v1.0.1
         Compiling smallvec v1.13.1
         Compiling associative-cache v2.0.0
         Compiling const-random v0.1.17
         Compiling chrono v0.4.33
         Compiling bytecount v0.6.7
         Compiling pyo3-ffi v0.20.2
         Compiling orjson v3.9.13 (/tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630)
         Compiling compact_str v0.7.1
         Compiling arrayvec v0.7.4
         Compiling beef v0.5.2
      warning: include/yyjson/yyjson.c: In function ‘read_string’:
      warning: include/yyjson/yyjson.c:5158:29: warning: variable ‘pos’ set but not used [-Wunused-but-set-variable]
      warning:  5158 |     u8 *src = ++cur, *dst, *pos;
      warning:       |                             ^~~
      error[E0425]: cannot find function `_PyDict_NewPresized` in crate `pyo3_ffi`
         --> src/deserialize/yyjson.rs:167:25
          |
      167 |         let dict = ffi!(_PyDict_NewPresized(len as isize));
          |                         ^^^^^^^^^^^^^^^^^^^ not found in `pyo3_ffi`
      
      error[E0425]: cannot find function `_PyDict_SetItem_KnownHash` in crate `pyo3_ffi`
         --> src/deserialize/yyjson.rs:175:27
          |
      175 |                 pyo3_ffi::_PyDict_SetItem_KnownHash(dict, pykey, pyval, str_hash!(pykey))
          |                           ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `pyo3_ffi`
      
      error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi`
         --> src/util.rs:244:28
          |
      244 |           unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) }
          |                              ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next`
          |
         ::: src/serialize/per_type/dataclass.rs:100:9
          |
      100 |           pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value);
          |           ---------------------------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5
          |
      36  | /     pub fn PyDict_Next(
      37  | |         mp: *mut PyObject,
      38  | |         pos: *mut Py_ssize_t,
      39  | |         key: *mut *mut PyObject,
      40  | |         value: *mut *mut PyObject,
      41  | |     ) -> c_int;
          | |______________- similarly named function `PyDict_Next` defined here
          |
          = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi`
         --> src/util.rs:244:28
          |
      244 |           unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) }
          |                              ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next`
          |
         ::: src/serialize/per_type/dataclass.rs:105:13
          |
      105 |               pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value);
          |               ---------------------------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5
          |
      36  | /     pub fn PyDict_Next(
      37  | |         mp: *mut PyObject,
      38  | |         pos: *mut Py_ssize_t,
      39  | |         key: *mut *mut PyObject,
      40  | |         value: *mut *mut PyObject,
      41  | |     ) -> c_int;
          | |______________- similarly named function `PyDict_Next` defined here
          |
          = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi`
         --> src/util.rs:244:28
          |
      244 |           unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) }
          |                              ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next`
          |
         ::: src/serialize/per_type/dataclass.rs:165:9
          |
      165 |           pydict_next!(fields, &mut pos, &mut next_key, &mut next_value);
          |           -------------------------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5
          |
      36  | /     pub fn PyDict_Next(
      37  | |         mp: *mut PyObject,
      38  | |         pos: *mut Py_ssize_t,
      39  | |         key: *mut *mut PyObject,
      40  | |         value: *mut *mut PyObject,
      41  | |     ) -> c_int;
          | |______________- similarly named function `PyDict_Next` defined here
          |
          = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi`
         --> src/util.rs:244:28
          |
      244 |           unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) }
          |                              ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next`
          |
         ::: src/serialize/per_type/dataclass.rs:170:13
          |
      170 |               pydict_next!(fields, &mut pos, &mut next_key, &mut next_value);
          |               -------------------------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5
          |
      36  | /     pub fn PyDict_Next(
      37  | |         mp: *mut PyObject,
      38  | |         pos: *mut Py_ssize_t,
      39  | |         key: *mut *mut PyObject,
      40  | |         value: *mut *mut PyObject,
      41  | |     ) -> c_int;
          | |______________- similarly named function `PyDict_Next` defined here
          |
          = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function, tuple struct or tuple variant `PyDateTime_DATE_GET_TZINFO` in crate `pyo3_ffi`
         --> src/serialize/per_type/datetime.rs:177:27
          |
      177 |         let tzinfo = ffi!(PyDateTime_DATE_GET_TZINFO(self.ptr));
          |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyDateTime_DATE_GET_MINUTE`
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/datetime.rs:365:5
          |
      365 |     pub fn PyDateTime_DATE_GET_MINUTE(o: *mut PyObject) -> c_int;
          |     ------------------------------------------------------------ similarly named function `PyDateTime_DATE_GET_MINUTE` defined here
      
      error[E0425]: cannot find function, tuple struct or tuple variant `PyObject_CallMethodNoArgs` in crate `pyo3_ffi`
         --> src/util.rs:148:28
          |
      148 |           unsafe { pyo3_ffi::PyObject_CallMethodNoArgs($obj1, $obj2) }
          |                              ^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyObject_CallMethodObjArgs`
          |
         ::: src/serialize/per_type/datetime.rs:180:29
          |
      180 |               let py_offset = call_method!(self.ptr, UTCOFFSET_METHOD_STR);
          |                               -------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/abstract_.rs:74:5
          |
      74  | /     pub fn PyObject_CallMethodObjArgs(
      75  | |         o: *mut PyObject,
      76  | |         method: *mut PyObject,
      77  | |         ...
      78  | |     ) -> *mut PyObject;
          | |______________________- similarly named function `PyObject_CallMethodObjArgs` defined here
          |
          = note: this error originates in the macro `call_method` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function, tuple struct or tuple variant `PyObject_CallMethodOneArg` in crate `pyo3_ffi`
         --> src/util.rs:151:28
          |
      151 |           unsafe { pyo3_ffi::PyObject_CallMethodOneArg($obj1, $obj2, $obj3) }
          |                              ^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyObject_CallMethodObjArgs`
          |
         ::: src/serialize/per_type/datetime.rs:189:30
          |
      189 |               let method_ptr = call_method!(tzinfo, NORMALIZE_METHOD_STR, self.ptr);
          |                                ---------------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/abstract_.rs:74:5
          |
      74  | /     pub fn PyObject_CallMethodObjArgs(
      75  | |         o: *mut PyObject,
      76  | |         method: *mut PyObject,
      77  | |         ...
      78  | |     ) -> *mut PyObject;
          | |______________________- similarly named function `PyObject_CallMethodObjArgs` defined here
          |
          = note: this error originates in the macro `call_method` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function, tuple struct or tuple variant `PyObject_CallMethodNoArgs` in crate `pyo3_ffi`
         --> src/util.rs:148:28
          |
      148 |           unsafe { pyo3_ffi::PyObject_CallMethodNoArgs($obj1, $obj2) }
          |                              ^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyObject_CallMethodObjArgs`
          |
         ::: src/serialize/per_type/datetime.rs:190:29
          |
      190 |               let py_offset = call_method!(method_ptr, UTCOFFSET_METHOD_STR);
          |                               ---------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/abstract_.rs:74:5
          |
      74  | /     pub fn PyObject_CallMethodObjArgs(
      75  | |         o: *mut PyObject,
      76  | |         method: *mut PyObject,
      77  | |         ...
      78  | |     ) -> *mut PyObject;
          | |______________________- similarly named function `PyObject_CallMethodObjArgs` defined here
          |
          = note: this error originates in the macro `call_method` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function, tuple struct or tuple variant `PyObject_CallMethodOneArg` in crate `pyo3_ffi`
         --> src/util.rs:151:28
          |
      151 |           unsafe { pyo3_ffi::PyObject_CallMethodOneArg($obj1, $obj2, $obj3) }
          |                              ^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyObject_CallMethodObjArgs`
          |
         ::: src/serialize/per_type/datetime.rs:200:29
          |
      200 |               let py_offset = call_method!(tzinfo, UTCOFFSET_METHOD_STR, self.ptr);
          |                               ---------------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/abstract_.rs:74:5
          |
      74  | /     pub fn PyObject_CallMethodObjArgs(
      75  | |         o: *mut PyObject,
      76  | |         method: *mut PyObject,
      77  | |         ...
      78  | |     ) -> *mut PyObject;
          | |______________________- similarly named function `PyObject_CallMethodObjArgs` defined here
          |
          = note: this error originates in the macro `call_method` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function, tuple struct or tuple variant `PyDateTime_DATE_GET_TZINFO` in crate `pyo3_ffi`
         --> src/serialize/per_type/datetime.rs:217:31
          |
      217 |             let tzinfo = ffi!(PyDateTime_DATE_GET_TZINFO(self.ptr));
          |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyDateTime_DATE_GET_MINUTE`
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/datetime.rs:365:5
          |
      365 |     pub fn PyDateTime_DATE_GET_MINUTE(o: *mut PyObject) -> c_int;
          |     ------------------------------------------------------------ similarly named function `PyDateTime_DATE_GET_MINUTE` defined here
      
      error[E0425]: cannot find function, tuple struct or tuple variant `PyObject_CallMethodOneArg` in crate `pyo3_ffi`
         --> src/util.rs:151:28
          |
      151 |           unsafe { pyo3_ffi::PyObject_CallMethodOneArg($obj1, $obj2, $obj3) }
          |                              ^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyObject_CallMethodObjArgs`
          |
         ::: src/serialize/per_type/datetime.rs:220:33
          |
      220 |                   let py_offset = call_method!(tzinfo, UTCOFFSET_METHOD_STR, self.ptr);
          |                                   ---------------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/abstract_.rs:74:5
          |
      74  | /     pub fn PyObject_CallMethodObjArgs(
      75  | |         o: *mut PyObject,
      76  | |         method: *mut PyObject,
      77  | |         ...
      78  | |     ) -> *mut PyObject;
          | |______________________- similarly named function `PyObject_CallMethodObjArgs` defined here
          |
          = note: this error originates in the macro `call_method` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi`
         --> src/util.rs:244:28
          |
      244 |           unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) }
          |                              ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next`
          |
         ::: src/serialize/per_type/dict.rs:113:9
          |
      113 |           pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value);
          |           ---------------------------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5
          |
      36  | /     pub fn PyDict_Next(
      37  | |         mp: *mut PyObject,
      38  | |         pos: *mut Py_ssize_t,
      39  | |         key: *mut *mut PyObject,
      40  | |         value: *mut *mut PyObject,
      41  | |     ) -> c_int;
          | |______________- similarly named function `PyDict_Next` defined here
          |
          = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi`
         --> src/util.rs:244:28
          |
      244 |           unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) }
          |                              ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next`
          |
         ::: src/serialize/per_type/dict.rs:118:13
          |
      118 |               pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value);
          |               ---------------------------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5
          |
      36  | /     pub fn PyDict_Next(
      37  | |         mp: *mut PyObject,
      38  | |         pos: *mut Py_ssize_t,
      39  | |         key: *mut *mut PyObject,
      40  | |         value: *mut *mut PyObject,
      41  | |     ) -> c_int;
          | |______________- similarly named function `PyDict_Next` defined here
          |
          = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi`
         --> src/util.rs:244:28
          |
      244 |           unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) }
          |                              ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next`
          |
         ::: src/serialize/per_type/dict.rs:212:9
          |
      212 |           pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value);
          |           ---------------------------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5
          |
      36  | /     pub fn PyDict_Next(
      37  | |         mp: *mut PyObject,
      38  | |         pos: *mut Py_ssize_t,
      39  | |         key: *mut *mut PyObject,
      40  | |         value: *mut *mut PyObject,
      41  | |     ) -> c_int;
          | |______________- similarly named function `PyDict_Next` defined here
          |
          = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi`
         --> src/util.rs:244:28
          |
      244 |           unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) }
          |                              ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next`
          |
         ::: src/serialize/per_type/dict.rs:217:13
          |
      217 |               pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value);
          |               ---------------------------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5
          |
      36  | /     pub fn PyDict_Next(
      37  | |         mp: *mut PyObject,
      38  | |         pos: *mut Py_ssize_t,
      39  | |         key: *mut *mut PyObject,
      40  | |         value: *mut *mut PyObject,
      41  | |     ) -> c_int;
          | |______________- similarly named function `PyDict_Next` defined here
          |
          = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi`
         --> src/util.rs:244:28
          |
      244 |           unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) }
          |                              ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next`
          |
         ::: src/serialize/per_type/dict.rs:379:9
          |
      379 |           pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value);
          |           ---------------------------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5
          |
      36  | /     pub fn PyDict_Next(
      37  | |         mp: *mut PyObject,
      38  | |         pos: *mut Py_ssize_t,
      39  | |         key: *mut *mut PyObject,
      40  | |         value: *mut *mut PyObject,
      41  | |     ) -> c_int;
          | |______________- similarly named function `PyDict_Next` defined here
          |
          = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi`
         --> src/util.rs:244:28
          |
      244 |           unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) }
          |                              ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next`
          |
         ::: src/serialize/per_type/dict.rs:384:13
          |
      384 |               pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value);
          |               ---------------------------------------------------------------- in this macro invocation
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5
          |
      36  | /     pub fn PyDict_Next(
      37  | |         mp: *mut PyObject,
      38  | |         pos: *mut Py_ssize_t,
      39  | |         key: *mut *mut PyObject,
      40  | |         value: *mut *mut PyObject,
      41  | |     ) -> c_int;
          | |______________- similarly named function `PyDict_Next` defined here
          |
          = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0425]: cannot find function, tuple struct or tuple variant `PyTuple_GET_ITEM` in crate `pyo3_ffi`
          --> src/serialize/per_type/numpy.rs:1131:30
           |
      1131 |         let descr_str = ffi!(PyTuple_GET_ITEM(el0, 1));
           |                              ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyList_GET_ITEM`
           |
          ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/listobject.rs:60:5
           |
      60   |     pub fn PyList_GET_ITEM(arg1: *mut PyObject, arg2: Py_ssize_t) -> *mut PyObject;
           |     ------------------------------------------------------------------------------ similarly named function `PyList_GET_ITEM` defined here
      
      error[E0425]: cannot find function `_Py_HashBytes` in crate `pyo3_ffi`
        --> src/str/ffi.rs:20:30
         |
      20 |         let hash = pyo3_ffi::_Py_HashBytes(data_ptr, num_bytes);
         |                              ^^^^^^^^^^^^^ not found in `pyo3_ffi`
      
      error[E0609]: no field `hash` on type `pyo3_ffi::PyASCIIObject`
        --> src/deserialize/pyobject.rs:15:71
         |
      15 |     debug_assert!(unsafe { (*pykey.cast::<pyo3_ffi::PyASCIIObject>()).hash != -1 });
         |                                                                       ^^^^ unknown field
         |
         = note: available fields are: `ob_base`, `length`, `state`, `wstr`
      
      error[E0609]: no field `hash` on type `pyo3_ffi::PyASCIIObject`
         --> src/util.rs:180:59
          |
      180 |         unsafe { (*$op.cast::<pyo3_ffi::PyASCIIObject>()).hash }
          |                                                           ^^^^ unknown field
          |
         ::: src/deserialize/yyjson.rs:175:73
          |
      175 |                 pyo3_ffi::_PyDict_SetItem_KnownHash(dict, pykey, pyval, str_hash!(pykey))
          |                                                                         ---------------- in this macro invocation
          |
          = note: available fields are: `ob_base`, `length`, `state`, `wstr`
          = note: this error originates in the macro `str_hash` (in Nightly builds, run with -Z macro-backtrace for more info)
      
      error[E0609]: no field `ob_sval` on type `PyBytesObject`
       --> src/ffi/bytes.rs:9:36
        |
      9 |     &(*op.cast::<PyBytesObject>()).ob_sval as *const c_char
        |                                    ^^^^^^^ unknown field
      
      error[E0425]: cannot find function, tuple struct or tuple variant `PyTuple_GET_ITEM` in this scope
        --> src/ffi/fragment.rs:42:24
         |
      42 |         let contents = PyTuple_GET_ITEM(args, 0);
         |                        ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyList_GET_ITEM`
         |
        ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/listobject.rs:60:5
         |
      60 |     pub fn PyList_GET_ITEM(arg1: *mut PyObject, arg2: Py_ssize_t) -> *mut PyObject;
         |     ------------------------------------------------------------------------------ similarly named function `PyList_GET_ITEM` defined here
      
      error[E0063]: missing field `ob_pypy_link` in initializer of `pyo3_ffi::PyObject`
        --> src/ffi/fragment.rs:73:22
         |
      73 |             ob_base: PyObject {
         |                      ^^^^^^^^ missing `ob_pypy_link`
      
      error[E0063]: missing fields `tp_print` and `tp_pypy_flags` in initializer of `pyo3_ffi::PyTypeObject`
        --> src/ffi/fragment.rs:71:23
         |
      71 |     let ob = Box::new(PyTypeObject {
         |                       ^^^^^^^^^^^^ missing `tp_print` and `tp_pypy_flags`
      
      error[E0609]: no field `ob_item` on type `PyListObject`
        --> src/serialize/per_type/list.rs:50:73
         |
      50 |         let data_ptr = unsafe { (*(ptr as *mut pyo3_ffi::PyListObject)).ob_item };
         |                                                                         ^^^^^^^ unknown field
         |
         = note: available fields are: `ob_base`
      
      error[E0609]: no field `ob_sval` on type `PyBytesObject`
        --> src/serialize/writer/byteswriter.rs:46:31
         |
      46 |                 (*self.bytes).ob_sval
         |                               ^^^^^^^ unknown field
      
      error[E0609]: no field `hash` on type `pyo3_ffi::PyASCIIObject`
        --> src/str/ffi.rs:21:39
         |
      21 |         (*op.cast::<PyASCIIObject>()).hash = hash;
         |                                       ^^^^ unknown field
         |
         = note: available fields are: `ob_base`, `length`, `state`, `wstr`
      
      error[E0425]: cannot find function, tuple struct or tuple variant `PyTuple_SET_ITEM` in this scope
         --> src/lib.rs:205:9
          |
      205 |         PyTuple_SET_ITEM(args, 0, err_msg);
          |         ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyList_SET_ITEM`
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/listobject.rs:66:5
          |
      66  |     pub fn PyList_SET_ITEM(arg1: *mut PyObject, arg2: Py_ssize_t, arg3: *mut PyObject);
          |     ---------------------------------------------------------------------------------- similarly named function `PyList_SET_ITEM` defined here
      
      error[E0425]: cannot find function, tuple struct or tuple variant `PyTuple_SET_ITEM` in this scope
         --> src/lib.rs:206:9
          |
      206 |         PyTuple_SET_ITEM(args, 1, doc);
          |         ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyList_SET_ITEM`
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/listobject.rs:66:5
          |
      66  |     pub fn PyList_SET_ITEM(arg1: *mut PyObject, arg2: Py_ssize_t, arg3: *mut PyObject);
          |     ---------------------------------------------------------------------------------- similarly named function `PyList_SET_ITEM` defined here
      
      error[E0425]: cannot find function, tuple struct or tuple variant `PyTuple_SET_ITEM` in this scope
         --> src/lib.rs:207:9
          |
      207 |         PyTuple_SET_ITEM(args, 2, pos);
          |         ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyList_SET_ITEM`
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/listobject.rs:66:5
          |
      66  |     pub fn PyList_SET_ITEM(arg1: *mut PyObject, arg2: Py_ssize_t, arg3: *mut PyObject);
          |     ---------------------------------------------------------------------------------- similarly named function `PyList_SET_ITEM` defined here
      
      error[E0425]: cannot find function, tuple struct or tuple variant `PyTuple_GET_ITEM` in this scope
         --> src/lib.rs:320:23
          |
      320 |             let arg = PyTuple_GET_ITEM(kwnames, i as Py_ssize_t);
          |                       ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyList_GET_ITEM`
          |
         ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/listobject.rs:60:5
          |
      60  |     pub fn PyList_GET_ITEM(arg1: *mut PyObject, arg2: Py_ssize_t) -> *mut PyObject;
          |     ------------------------------------------------------------------------------ similarly named function `PyList_GET_ITEM` defined here
      
      Some errors have detailed explanations: E0063, E0425, E0609.
      For more information about an error, try `rustc --explain E0063`.
      The following warnings were emitted during compilation:
      
      warning: include/yyjson/yyjson.c: In function ‘read_string’:
      warning: include/yyjson/yyjson.c:5158:29: warning: variable ‘pos’ set but not used [-Wunused-but-set-variable]
      warning:  5158 |     u8 *src = ++cur, *dst, *pos;
      warning:       |                             ^~~
      
      error: could not compile `orjson` (lib) due to 34 previous errors
      💥 maturin failed
        Caused by: Failed to build a native library through cargo
        Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="pypy-3.9-64bit" PYO3_PYTHON="/home/anton/git/yestech/freedom/packages/autogentle/.venv/bin/python" PYTHON_SYS_EXECUTABLE="/home/anton/git/yestech/freedom/packages/autogentle/.venv/bin/python" "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/Cargo.toml" "--release" "--lib"`
      Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/home/anton/git/yestech/freedom/packages/autogentle/.venv/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for orjson
ERROR: Could not build wheels for orjson, which is required to install pyproject.toml-based projects
Originally created by @magick93 on GitHub (Feb 6, 2024). I'm trying to install langserve but get the following error. # Command `pip install langserve[server]` # Version ``` Python 3.9.16 (feeb267ead3e6771d3f2f49b83e1894839f64fb7, Dec 29 2022, 14:23:21) [PyPy 7.3.11 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)] ``` # Error ``` error: subprocess-exited-with-error × Building wheel for orjson (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [567 lines of output] Running `maturin pep517 build-wheel -i /home/anton/git/yestech/freedom/packages/autogentle/.venv/bin/python --compatibility off` 📦 Including license file "/tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/LICENSE-APACHE" 📦 Including license file "/tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/LICENSE-MIT" 🍹 Building a mixed python/rust project 🔗 Found pyo3-ffi bindings 🐍 Found PyPy 3.9 at /home/anton/git/yestech/freedom/packages/autogentle/.venv/bin/python Compiling target-lexicon v0.12.13 Compiling once_cell v1.19.0 Compiling libc v0.2.153 Compiling crunchy v0.2.2 Compiling serde v1.0.196 Compiling version_check v0.9.4 Compiling tiny-keccak v2.0.2 Compiling cfg-if v1.0.0 Compiling autocfg v1.1.0 Compiling rustversion v1.0.14 Compiling ahash v0.8.6 Compiling num-traits v0.2.17 Compiling serde_json v1.0.113 Compiling itoa v1.0.10 Compiling ryu v1.0.16 Compiling zerocopy v0.7.32 Compiling static_assertions v1.1.0 Compiling pyo3-build-config v0.20.2 Compiling encoding_rs v0.8.33 Compiling getrandom v0.2.12 Compiling cc v1.0.83 Compiling castaway v0.2.2 Compiling const-random-macro v0.1.16 Compiling simdutf8 v0.1.4 Compiling itoap v1.0.1 Compiling smallvec v1.13.1 Compiling associative-cache v2.0.0 Compiling const-random v0.1.17 Compiling chrono v0.4.33 Compiling bytecount v0.6.7 Compiling pyo3-ffi v0.20.2 Compiling orjson v3.9.13 (/tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630) Compiling compact_str v0.7.1 Compiling arrayvec v0.7.4 Compiling beef v0.5.2 warning: include/yyjson/yyjson.c: In function ‘read_string’: warning: include/yyjson/yyjson.c:5158:29: warning: variable ‘pos’ set but not used [-Wunused-but-set-variable] warning: 5158 | u8 *src = ++cur, *dst, *pos; warning: | ^~~ error[E0425]: cannot find function `_PyDict_NewPresized` in crate `pyo3_ffi` --> src/deserialize/yyjson.rs:167:25 | 167 | let dict = ffi!(_PyDict_NewPresized(len as isize)); | ^^^^^^^^^^^^^^^^^^^ not found in `pyo3_ffi` error[E0425]: cannot find function `_PyDict_SetItem_KnownHash` in crate `pyo3_ffi` --> src/deserialize/yyjson.rs:175:27 | 175 | pyo3_ffi::_PyDict_SetItem_KnownHash(dict, pykey, pyval, str_hash!(pykey)) | ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `pyo3_ffi` error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi` --> src/util.rs:244:28 | 244 | unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) } | ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next` | ::: src/serialize/per_type/dataclass.rs:100:9 | 100 | pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value); | ---------------------------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5 | 36 | / pub fn PyDict_Next( 37 | | mp: *mut PyObject, 38 | | pos: *mut Py_ssize_t, 39 | | key: *mut *mut PyObject, 40 | | value: *mut *mut PyObject, 41 | | ) -> c_int; | |______________- similarly named function `PyDict_Next` defined here | = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi` --> src/util.rs:244:28 | 244 | unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) } | ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next` | ::: src/serialize/per_type/dataclass.rs:105:13 | 105 | pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value); | ---------------------------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5 | 36 | / pub fn PyDict_Next( 37 | | mp: *mut PyObject, 38 | | pos: *mut Py_ssize_t, 39 | | key: *mut *mut PyObject, 40 | | value: *mut *mut PyObject, 41 | | ) -> c_int; | |______________- similarly named function `PyDict_Next` defined here | = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi` --> src/util.rs:244:28 | 244 | unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) } | ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next` | ::: src/serialize/per_type/dataclass.rs:165:9 | 165 | pydict_next!(fields, &mut pos, &mut next_key, &mut next_value); | -------------------------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5 | 36 | / pub fn PyDict_Next( 37 | | mp: *mut PyObject, 38 | | pos: *mut Py_ssize_t, 39 | | key: *mut *mut PyObject, 40 | | value: *mut *mut PyObject, 41 | | ) -> c_int; | |______________- similarly named function `PyDict_Next` defined here | = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi` --> src/util.rs:244:28 | 244 | unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) } | ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next` | ::: src/serialize/per_type/dataclass.rs:170:13 | 170 | pydict_next!(fields, &mut pos, &mut next_key, &mut next_value); | -------------------------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5 | 36 | / pub fn PyDict_Next( 37 | | mp: *mut PyObject, 38 | | pos: *mut Py_ssize_t, 39 | | key: *mut *mut PyObject, 40 | | value: *mut *mut PyObject, 41 | | ) -> c_int; | |______________- similarly named function `PyDict_Next` defined here | = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function, tuple struct or tuple variant `PyDateTime_DATE_GET_TZINFO` in crate `pyo3_ffi` --> src/serialize/per_type/datetime.rs:177:27 | 177 | let tzinfo = ffi!(PyDateTime_DATE_GET_TZINFO(self.ptr)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyDateTime_DATE_GET_MINUTE` | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/datetime.rs:365:5 | 365 | pub fn PyDateTime_DATE_GET_MINUTE(o: *mut PyObject) -> c_int; | ------------------------------------------------------------ similarly named function `PyDateTime_DATE_GET_MINUTE` defined here error[E0425]: cannot find function, tuple struct or tuple variant `PyObject_CallMethodNoArgs` in crate `pyo3_ffi` --> src/util.rs:148:28 | 148 | unsafe { pyo3_ffi::PyObject_CallMethodNoArgs($obj1, $obj2) } | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyObject_CallMethodObjArgs` | ::: src/serialize/per_type/datetime.rs:180:29 | 180 | let py_offset = call_method!(self.ptr, UTCOFFSET_METHOD_STR); | -------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/abstract_.rs:74:5 | 74 | / pub fn PyObject_CallMethodObjArgs( 75 | | o: *mut PyObject, 76 | | method: *mut PyObject, 77 | | ... 78 | | ) -> *mut PyObject; | |______________________- similarly named function `PyObject_CallMethodObjArgs` defined here | = note: this error originates in the macro `call_method` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function, tuple struct or tuple variant `PyObject_CallMethodOneArg` in crate `pyo3_ffi` --> src/util.rs:151:28 | 151 | unsafe { pyo3_ffi::PyObject_CallMethodOneArg($obj1, $obj2, $obj3) } | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyObject_CallMethodObjArgs` | ::: src/serialize/per_type/datetime.rs:189:30 | 189 | let method_ptr = call_method!(tzinfo, NORMALIZE_METHOD_STR, self.ptr); | ---------------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/abstract_.rs:74:5 | 74 | / pub fn PyObject_CallMethodObjArgs( 75 | | o: *mut PyObject, 76 | | method: *mut PyObject, 77 | | ... 78 | | ) -> *mut PyObject; | |______________________- similarly named function `PyObject_CallMethodObjArgs` defined here | = note: this error originates in the macro `call_method` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function, tuple struct or tuple variant `PyObject_CallMethodNoArgs` in crate `pyo3_ffi` --> src/util.rs:148:28 | 148 | unsafe { pyo3_ffi::PyObject_CallMethodNoArgs($obj1, $obj2) } | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyObject_CallMethodObjArgs` | ::: src/serialize/per_type/datetime.rs:190:29 | 190 | let py_offset = call_method!(method_ptr, UTCOFFSET_METHOD_STR); | ---------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/abstract_.rs:74:5 | 74 | / pub fn PyObject_CallMethodObjArgs( 75 | | o: *mut PyObject, 76 | | method: *mut PyObject, 77 | | ... 78 | | ) -> *mut PyObject; | |______________________- similarly named function `PyObject_CallMethodObjArgs` defined here | = note: this error originates in the macro `call_method` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function, tuple struct or tuple variant `PyObject_CallMethodOneArg` in crate `pyo3_ffi` --> src/util.rs:151:28 | 151 | unsafe { pyo3_ffi::PyObject_CallMethodOneArg($obj1, $obj2, $obj3) } | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyObject_CallMethodObjArgs` | ::: src/serialize/per_type/datetime.rs:200:29 | 200 | let py_offset = call_method!(tzinfo, UTCOFFSET_METHOD_STR, self.ptr); | ---------------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/abstract_.rs:74:5 | 74 | / pub fn PyObject_CallMethodObjArgs( 75 | | o: *mut PyObject, 76 | | method: *mut PyObject, 77 | | ... 78 | | ) -> *mut PyObject; | |______________________- similarly named function `PyObject_CallMethodObjArgs` defined here | = note: this error originates in the macro `call_method` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function, tuple struct or tuple variant `PyDateTime_DATE_GET_TZINFO` in crate `pyo3_ffi` --> src/serialize/per_type/datetime.rs:217:31 | 217 | let tzinfo = ffi!(PyDateTime_DATE_GET_TZINFO(self.ptr)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyDateTime_DATE_GET_MINUTE` | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/datetime.rs:365:5 | 365 | pub fn PyDateTime_DATE_GET_MINUTE(o: *mut PyObject) -> c_int; | ------------------------------------------------------------ similarly named function `PyDateTime_DATE_GET_MINUTE` defined here error[E0425]: cannot find function, tuple struct or tuple variant `PyObject_CallMethodOneArg` in crate `pyo3_ffi` --> src/util.rs:151:28 | 151 | unsafe { pyo3_ffi::PyObject_CallMethodOneArg($obj1, $obj2, $obj3) } | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyObject_CallMethodObjArgs` | ::: src/serialize/per_type/datetime.rs:220:33 | 220 | let py_offset = call_method!(tzinfo, UTCOFFSET_METHOD_STR, self.ptr); | ---------------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/abstract_.rs:74:5 | 74 | / pub fn PyObject_CallMethodObjArgs( 75 | | o: *mut PyObject, 76 | | method: *mut PyObject, 77 | | ... 78 | | ) -> *mut PyObject; | |______________________- similarly named function `PyObject_CallMethodObjArgs` defined here | = note: this error originates in the macro `call_method` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi` --> src/util.rs:244:28 | 244 | unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) } | ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next` | ::: src/serialize/per_type/dict.rs:113:9 | 113 | pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value); | ---------------------------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5 | 36 | / pub fn PyDict_Next( 37 | | mp: *mut PyObject, 38 | | pos: *mut Py_ssize_t, 39 | | key: *mut *mut PyObject, 40 | | value: *mut *mut PyObject, 41 | | ) -> c_int; | |______________- similarly named function `PyDict_Next` defined here | = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi` --> src/util.rs:244:28 | 244 | unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) } | ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next` | ::: src/serialize/per_type/dict.rs:118:13 | 118 | pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value); | ---------------------------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5 | 36 | / pub fn PyDict_Next( 37 | | mp: *mut PyObject, 38 | | pos: *mut Py_ssize_t, 39 | | key: *mut *mut PyObject, 40 | | value: *mut *mut PyObject, 41 | | ) -> c_int; | |______________- similarly named function `PyDict_Next` defined here | = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi` --> src/util.rs:244:28 | 244 | unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) } | ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next` | ::: src/serialize/per_type/dict.rs:212:9 | 212 | pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value); | ---------------------------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5 | 36 | / pub fn PyDict_Next( 37 | | mp: *mut PyObject, 38 | | pos: *mut Py_ssize_t, 39 | | key: *mut *mut PyObject, 40 | | value: *mut *mut PyObject, 41 | | ) -> c_int; | |______________- similarly named function `PyDict_Next` defined here | = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi` --> src/util.rs:244:28 | 244 | unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) } | ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next` | ::: src/serialize/per_type/dict.rs:217:13 | 217 | pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value); | ---------------------------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5 | 36 | / pub fn PyDict_Next( 37 | | mp: *mut PyObject, 38 | | pos: *mut Py_ssize_t, 39 | | key: *mut *mut PyObject, 40 | | value: *mut *mut PyObject, 41 | | ) -> c_int; | |______________- similarly named function `PyDict_Next` defined here | = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi` --> src/util.rs:244:28 | 244 | unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) } | ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next` | ::: src/serialize/per_type/dict.rs:379:9 | 379 | pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value); | ---------------------------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5 | 36 | / pub fn PyDict_Next( 37 | | mp: *mut PyObject, 38 | | pos: *mut Py_ssize_t, 39 | | key: *mut *mut PyObject, 40 | | value: *mut *mut PyObject, 41 | | ) -> c_int; | |______________- similarly named function `PyDict_Next` defined here | = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function `_PyDict_Next` in crate `pyo3_ffi` --> src/util.rs:244:28 | 244 | unsafe { pyo3_ffi::_PyDict_Next($obj1, $obj2, $obj3, $obj4, core::ptr::null_mut()) } | ^^^^^^^^^^^^ help: a function with a similar name exists: `PyDict_Next` | ::: src/serialize/per_type/dict.rs:384:13 | 384 | pydict_next!(self.ptr, &mut pos, &mut next_key, &mut next_value); | ---------------------------------------------------------------- in this macro invocation | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/dictobject.rs:36:5 | 36 | / pub fn PyDict_Next( 37 | | mp: *mut PyObject, 38 | | pos: *mut Py_ssize_t, 39 | | key: *mut *mut PyObject, 40 | | value: *mut *mut PyObject, 41 | | ) -> c_int; | |______________- similarly named function `PyDict_Next` defined here | = note: this error originates in the macro `pydict_next` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0425]: cannot find function, tuple struct or tuple variant `PyTuple_GET_ITEM` in crate `pyo3_ffi` --> src/serialize/per_type/numpy.rs:1131:30 | 1131 | let descr_str = ffi!(PyTuple_GET_ITEM(el0, 1)); | ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyList_GET_ITEM` | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/listobject.rs:60:5 | 60 | pub fn PyList_GET_ITEM(arg1: *mut PyObject, arg2: Py_ssize_t) -> *mut PyObject; | ------------------------------------------------------------------------------ similarly named function `PyList_GET_ITEM` defined here error[E0425]: cannot find function `_Py_HashBytes` in crate `pyo3_ffi` --> src/str/ffi.rs:20:30 | 20 | let hash = pyo3_ffi::_Py_HashBytes(data_ptr, num_bytes); | ^^^^^^^^^^^^^ not found in `pyo3_ffi` error[E0609]: no field `hash` on type `pyo3_ffi::PyASCIIObject` --> src/deserialize/pyobject.rs:15:71 | 15 | debug_assert!(unsafe { (*pykey.cast::<pyo3_ffi::PyASCIIObject>()).hash != -1 }); | ^^^^ unknown field | = note: available fields are: `ob_base`, `length`, `state`, `wstr` error[E0609]: no field `hash` on type `pyo3_ffi::PyASCIIObject` --> src/util.rs:180:59 | 180 | unsafe { (*$op.cast::<pyo3_ffi::PyASCIIObject>()).hash } | ^^^^ unknown field | ::: src/deserialize/yyjson.rs:175:73 | 175 | pyo3_ffi::_PyDict_SetItem_KnownHash(dict, pykey, pyval, str_hash!(pykey)) | ---------------- in this macro invocation | = note: available fields are: `ob_base`, `length`, `state`, `wstr` = note: this error originates in the macro `str_hash` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0609]: no field `ob_sval` on type `PyBytesObject` --> src/ffi/bytes.rs:9:36 | 9 | &(*op.cast::<PyBytesObject>()).ob_sval as *const c_char | ^^^^^^^ unknown field error[E0425]: cannot find function, tuple struct or tuple variant `PyTuple_GET_ITEM` in this scope --> src/ffi/fragment.rs:42:24 | 42 | let contents = PyTuple_GET_ITEM(args, 0); | ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyList_GET_ITEM` | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/listobject.rs:60:5 | 60 | pub fn PyList_GET_ITEM(arg1: *mut PyObject, arg2: Py_ssize_t) -> *mut PyObject; | ------------------------------------------------------------------------------ similarly named function `PyList_GET_ITEM` defined here error[E0063]: missing field `ob_pypy_link` in initializer of `pyo3_ffi::PyObject` --> src/ffi/fragment.rs:73:22 | 73 | ob_base: PyObject { | ^^^^^^^^ missing `ob_pypy_link` error[E0063]: missing fields `tp_print` and `tp_pypy_flags` in initializer of `pyo3_ffi::PyTypeObject` --> src/ffi/fragment.rs:71:23 | 71 | let ob = Box::new(PyTypeObject { | ^^^^^^^^^^^^ missing `tp_print` and `tp_pypy_flags` error[E0609]: no field `ob_item` on type `PyListObject` --> src/serialize/per_type/list.rs:50:73 | 50 | let data_ptr = unsafe { (*(ptr as *mut pyo3_ffi::PyListObject)).ob_item }; | ^^^^^^^ unknown field | = note: available fields are: `ob_base` error[E0609]: no field `ob_sval` on type `PyBytesObject` --> src/serialize/writer/byteswriter.rs:46:31 | 46 | (*self.bytes).ob_sval | ^^^^^^^ unknown field error[E0609]: no field `hash` on type `pyo3_ffi::PyASCIIObject` --> src/str/ffi.rs:21:39 | 21 | (*op.cast::<PyASCIIObject>()).hash = hash; | ^^^^ unknown field | = note: available fields are: `ob_base`, `length`, `state`, `wstr` error[E0425]: cannot find function, tuple struct or tuple variant `PyTuple_SET_ITEM` in this scope --> src/lib.rs:205:9 | 205 | PyTuple_SET_ITEM(args, 0, err_msg); | ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyList_SET_ITEM` | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/listobject.rs:66:5 | 66 | pub fn PyList_SET_ITEM(arg1: *mut PyObject, arg2: Py_ssize_t, arg3: *mut PyObject); | ---------------------------------------------------------------------------------- similarly named function `PyList_SET_ITEM` defined here error[E0425]: cannot find function, tuple struct or tuple variant `PyTuple_SET_ITEM` in this scope --> src/lib.rs:206:9 | 206 | PyTuple_SET_ITEM(args, 1, doc); | ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyList_SET_ITEM` | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/listobject.rs:66:5 | 66 | pub fn PyList_SET_ITEM(arg1: *mut PyObject, arg2: Py_ssize_t, arg3: *mut PyObject); | ---------------------------------------------------------------------------------- similarly named function `PyList_SET_ITEM` defined here error[E0425]: cannot find function, tuple struct or tuple variant `PyTuple_SET_ITEM` in this scope --> src/lib.rs:207:9 | 207 | PyTuple_SET_ITEM(args, 2, pos); | ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyList_SET_ITEM` | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/listobject.rs:66:5 | 66 | pub fn PyList_SET_ITEM(arg1: *mut PyObject, arg2: Py_ssize_t, arg3: *mut PyObject); | ---------------------------------------------------------------------------------- similarly named function `PyList_SET_ITEM` defined here error[E0425]: cannot find function, tuple struct or tuple variant `PyTuple_GET_ITEM` in this scope --> src/lib.rs:320:23 | 320 | let arg = PyTuple_GET_ITEM(kwnames, i as Py_ssize_t); | ^^^^^^^^^^^^^^^^ help: a function with a similar name exists: `PyList_GET_ITEM` | ::: /tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/include/cargo/pyo3-ffi-0.20.2/src/listobject.rs:60:5 | 60 | pub fn PyList_GET_ITEM(arg1: *mut PyObject, arg2: Py_ssize_t) -> *mut PyObject; | ------------------------------------------------------------------------------ similarly named function `PyList_GET_ITEM` defined here Some errors have detailed explanations: E0063, E0425, E0609. For more information about an error, try `rustc --explain E0063`. The following warnings were emitted during compilation: warning: include/yyjson/yyjson.c: In function ‘read_string’: warning: include/yyjson/yyjson.c:5158:29: warning: variable ‘pos’ set but not used [-Wunused-but-set-variable] warning: 5158 | u8 *src = ++cur, *dst, *pos; warning: | ^~~ error: could not compile `orjson` (lib) due to 34 previous errors 💥 maturin failed Caused by: Failed to build a native library through cargo Caused by: Cargo build finished with "exit status: 101": `env -u CARGO PYO3_ENVIRONMENT_SIGNATURE="pypy-3.9-64bit" PYO3_PYTHON="/home/anton/git/yestech/freedom/packages/autogentle/.venv/bin/python" PYTHON_SYS_EXECUTABLE="/home/anton/git/yestech/freedom/packages/autogentle/.venv/bin/python" "cargo" "rustc" "--message-format" "json-render-diagnostics" "--manifest-path" "/tmp/pip-install-5y7u1uxk/orjson_6eabf5566d214a4a9224a84120919630/Cargo.toml" "--release" "--lib"` Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/home/anton/git/yestech/freedom/packages/autogentle/.venv/bin/python', '--compatibility', 'off'] returned non-zero exit status 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for orjson ERROR: Could not build wheels for orjson, which is required to install pyproject.toml-based projects ```
yindo closed this issue 2026-02-16 00:18:52 -05:00
Author
Owner

@eyurtsev commented on GitHub (Feb 6, 2024):

Looks like an issue while trying to install a dependency called orjson

There might be some more troubleshooting instructions here: https://github.com/ijl/orjson

I'd try the following steps:

  1. Make sure you're on a recent version of pip
  2. Install a different version of orjson (pip index versions orjson to list versions and then choose some version of orjson to see if it installs; e.g., pip install orjson==3.9.10)
  3. If that fails, look at the instructions on orjson. Maybe a newer version of rust is needed
@eyurtsev commented on GitHub (Feb 6, 2024): Looks like an issue while trying to install a dependency called `orjson` There might be some more troubleshooting instructions here: https://github.com/ijl/orjson I'd try the following steps: 1. Make sure you're on a recent version of pip 2. Install a different version of `orjson` (`pip index versions orjson` to list versions and then choose some version of orjson to see if it installs; e.g., `pip install orjson==3.9.10`) 3. If that fails, look at the instructions on orjson. Maybe a newer version of rust is needed
Author
Owner

@eyurtsev commented on GitHub (Feb 22, 2024):

I'm going to close for now since this is not a langserve related issue.

@eyurtsev commented on GitHub (Feb 22, 2024): I'm going to close for now since this is not a langserve related issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langserve#115