Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pep517 build fails, because the build isn't able to find cargo? #73

Closed
jm-nab opened this issue May 22, 2024 · 4 comments
Closed

pep517 build fails, because the build isn't able to find cargo? #73

jm-nab opened this issue May 22, 2024 · 4 comments

Comments

@jm-nab
Copy link

jm-nab commented May 22, 2024

Originally justed wanted to run poetry install

Using python 3.13.0b1

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


 ChefBuildError

 Backend subprocess exited when trying to invoke build_wheel
 
 Running `maturin pep517 build-wheel -i /tmp/tmptnibnceh/.venv/bin/python --compatibility off`
 💥 maturin failed
   Caused by: Cargo metadata failed. Do you have cargo in your PATH?
   Caused by: No such file or directory (os error 2)
 Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/tmp/tmptnibnceh/.venv/bin/python', '--compatibility', 'off'] returned non-zero exit status 1
 

 at /usr/local/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 rpds-py (0.18.0) not supporting PEP 517 builds. 
You can verify this by running 
'pip wheel --no-cache-dir --use-pep517 "rpds-py (==0.18.0)"'.

error building image: error building stage: failed to execute command: waiting for process to exit: exit status 1
@Julian
Copy link
Member

Julian commented May 22, 2024

Hi. Your error has pydantic-core in it rather than this package.

But PyO3/maturin also don't yet support 3.13. #72 has a link to the upstream issue.

@Julian Julian closed this as completed May 22, 2024
@Julian
Copy link
Member

Julian commented May 22, 2024

Oh your error seems to have both this and pydantic in it, but yeah the diagnosis is possibly the same thing I mentioned.

@jm-nab
Copy link
Author

jm-nab commented May 22, 2024

Thanks

here's a docker snippet for anyone else who runs into this issue:

RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo '. $HOME/.cargo/env' >> $HOME/.bashrc
ENV PATH=$PATH:$HOME/.cargo/bin/
ENV PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1

@jm-nab
Copy link
Author

jm-nab commented May 22, 2024

Also this: pydantic/pydantic-core#1264 (comment)

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

No branches or pull requests

2 participants