Integuru-AI/Integuru

`jiter` build fails when running `poetry install` on Darwin

Opened this issue ยท 2 comments

Running poetry install on Darwin with python

python
Python 3.13.0 (main, Oct  7 2024, 05:02:14) [Clang 16.0.0 (clang-1600.0.26.3)] on darwin

yields an error:

poetry install
Installing dependencies from lock file

Package operations: 27 installs, 0 updates, 0 removals

  - Installing jiter (0.5.0): Failed

  ChefBuildError

  Backend subprocess exited when trying to invoke build_wheel

  Running `maturin pep517 build-wheel -i /private/var/folders/0m/_63w01516tgf3cftmp9h7ylm0000gn/T/tmpyi69i_8m/.venv/bin/python --compatibility off`
  error: Package `jiter v0.5.0 (/private/var/folders/0m/_63w01516tgf3cftmp9h7ylm0000gn/T/tmpbuoj3bew/jiter-0.5.0/crates/jiter)` does not have feature `pyo3`. It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.
  ๐Ÿ’ฅ maturin failed
    Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
    Caused by: `cargo metadata` exited with an error:
  Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/private/var/folders/0m/_63w01516tgf3cftmp9h7ylm0000gn/T/tmpyi69i_8m/.venv/bin/python', '--compatibility', 'off'] returned non-zero exit status 1


  at /opt/homebrew/Cellar/poetry/1.8.4/libexec/lib/python3.13/site-packages/poetry/installation/chef.py:164 in _prepare
      160โ”‚
      161โ”‚                 error = ChefBuildError("\n\n".join(message_parts))
      162โ”‚
      163โ”‚             if error is not None:
    โ†’ 164โ”‚                 raise error from None
      165โ”‚
      166โ”‚             return path
      167โ”‚
      168โ”‚     def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:

Note: This error originates from the build backend, and is likely not a problem with poetry but with jiter (0.5.0) not supporting PEP 517 builds. You can verify this by running 'pip wheel --no-cache-dir --use-pep517 "jiter (==0.5.0)"'.

Downgraded to 3.12 fixed it for me.

you'd need to install rust and rust setup tools

simply running brew install rust should work
then you'd need to pip install setuptools_rust in the python3 venv

also, do roll back to 3.12 as you'd have issues when installing "greenlet"

and you might also need to set a env variable: PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to bypass issues when installing "tiktoken"