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

maturin expects "python" directory to exist, otherwise fails with 💥 maturin failed Caused by: No such file or directory (os error 2) #2363

Closed
1 of 2 tasks
port8080 opened this issue Dec 3, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@port8080
Copy link

port8080 commented Dec 3, 2024

Bug Description

The following code:
Some(py_src) => project_root.join(py_src).normalize()?.into_path_buf(),
results in this cryptic error.

The fix is simple: the user has to create a python directory. The code should be enhanced with better logging because "No such file or directory (os error 2)" is not helpful.

Your maturin version (maturin --version)

1.7.7

Your Python version (python -V)

Python 3.13.0

Your pip version (pip -V)

pip 24.2

What bindings you're using

None

Does cargo build work?

  • Yes, it works

If on windows, have you checked that you aren't accidentally using unix path (those with the forward slash /)?

  • Yes

Steps to Reproduce

RUST_LOG=maturin=debug maturin build
2024-12-03T14:23:30.430629Z  INFO into_build_context: maturin::build_options: close time.busy=917ns time.idle=1.62µs
2024-12-03T14:23:30.430709Z DEBUG maturin::project_layout: Found pyproject.toml in working directory at "/Users/ajitb/hf/xet-core/hf_xet/pyproject.toml"
2024-12-03T14:23:30.430842Z DEBUG maturin::project_layout: Using cargo manifest path from working directory: "/Users/ajitb/hf/xet-core/hf_xet/Cargo.toml"
2024-12-03T14:23:30.430927Z DEBUG resolve_cargo_metadata: maturin::project_layout: Resolving cargo metadata from "/Users/ajitb/hf/xet-core/hf_xet/Cargo.toml"
2024-12-03T14:23:30.594052Z  INFO resolve_cargo_metadata: maturin::project_layout: close time.busy=163ms time.idle=666ns
💥 maturin failed
  Caused by: No such file or directory (os error 2)
@port8080 port8080 added the bug Something isn't working label Dec 3, 2024
@messense
Copy link
Member

messense commented Dec 3, 2024

Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants