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

pip install maturin fails under MSYS2 #2370

Open
2 tasks
elifarley opened this issue Dec 6, 2024 · 3 comments
Open
2 tasks

pip install maturin fails under MSYS2 #2370

elifarley opened this issue Dec 6, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@elifarley
Copy link

elifarley commented Dec 6, 2024

Bug Description

pip install maturin
Collecting maturin
  Using cached maturin-1.7.8.tar.gz (195 kB)
[...]
Rust build failed; unable to locate executable 'maturin'

Your maturin version (maturin --version)

?

Your Python version (python -V)

3.12.7

Your pip version (pip -V)

24.3.1

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

  • Install MSYS2 under Windows 11, x64
  • Install rustup and rust
  • Use pacman -S python to install Python 3.12.7
  • Create a venv dir and activate it
  • Run pip install maturin

maturin.log

@elifarley elifarley added the bug Something isn't working label Dec 6, 2024
@elifarley
Copy link
Author

Just found out I have maturin under /c/Users/<user>/.cargo/bin/maturin.exe
I renamed it to remove .exe and now I can call it like this:

maturin -V
maturin 1.7.8

However, pip install maturin fails just as before.

@messense
Copy link
Member

messense commented Dec 7, 2024

Unfortunately the log does not show anything abnormal, the related code is in https://github.com/PyO3/setuptools-rust/blob/2c6a567ddda35bded2ca91e12965328db7aa4668/setuptools_rust/build.py#L732-L779

You'd need to debug it by inspecting the temp cargo target directory when doing pip install --no-clean maturin.

cc @davidhewitt this could be a general setuptools-rust issue with MSYS2.

@elifarley
Copy link
Author

There's a workaround:

I was using a venv created by a pacman-based Python (pacman -S python).

Now I just tested another venv, created by a Windows-native Python (from https://www.python.org/ftp/python/3.12.8/python-3.12.8-amd64.exe).

The latter works.

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