I have a repository which consits mainly of python and polars code. Every time I want to update or add libraries with poetry I get this error. Until the version 15.15 I had no problems with polars. I have tried updating Polars within the IDE (PyCharm) and also with Brew. Is it something to do with the latest polars release or is it on the system (Mac M1) side ? Unfortunately I am not getting anywhere at this point. Can someone help me ?
Package operations: 0 installs, 1 update, 0 removals
• Updating polars (0.15.15 -> 0.15.16): Failed
CalledProcessError
Command '['/Users/PATH/.venv/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/Users/PATH/.venv', '--upgrade', '--no-deps', '/Users/PATH/Library/Caches/pypoetry/artifacts/58/97/2d/cb5f20eacd75bb88a57321c5a81a2b591330ccb0ae2fc786fffbe500eb/polars-0.15.16.tar.gz']' returned non-zero exit status 1.
at /opt/homebrew/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py:571 in run
567│ # We don't call process.wait() as .__exit__ does that for us.
568│ raise
569│ retcode = process.poll()
570│ if check and retcode:
→ 571│ raise CalledProcessError(retcode, process.args,
572│ output=stdout, stderr=stderr)
573│ return CompletedProcess(process.args, retcode, stdout, stderr)
574│
575│
The following error occurred when trying to handle this error:
EnvCommandError
Command ['/Users/PATH/.venv/bin/python', '-m', 'pip', 'install', '--use-pep517', '--disable-pip-version-check', '--isolated', '--no-input', '--prefix', '/Users/PATH/.venv', '--upgrade', '--no-deps', '/Users/PATH/Library/Caches/pypoetry/artifacts/58/97/2d/cb5f20eacd75bb88a57321c5a81a2b591330ccb0ae2fc786fffbe500eb/polars-0.15.16.tar.gz'] errored with the following return code 1, and output:
Processing /Users/PATH/Library/Caches/pypoetry/artifacts/58/97/2d/cb5f20eacd75bb88a57321c5a81a2b591330ccb0ae2fc786fffbe500eb/polars-0.15.16.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Cargo, the Rust package manager, is not installed or is not on PATH.
This package requires Rust and Cargo to compile extensions. Install it through
the system's package manager or via https://rustup.rs/
Checking for Rust toolchain....
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
at /opt/homebrew/Cellar/poetry/1.3.2/libexec/lib/python3.11/site-packages/poetry/utils/env.py:1540 in _run
1536│ output = subprocess.check_output(
1537│ command, stderr=subprocess.STDOUT, env=env, **kwargs
1538│ )
1539│ except CalledProcessError as e:
→ 1540│ raise EnvCommandError(e, input=input_)
1541│
1542│ return decode(output)
1543│
1544│ def execute(self, bin: str, *args: str, **kwargs: Any) -> int:
The following error occurred when trying to handle this error:
PoetryException
Failed to install /Users/PATH/Library/Caches/pypoetry/artifacts/58/97/2d/cb5f20eacd75bb88a57321c5a81a2b591330ccb0ae2fc786fffbe500eb/polars-0.15.16.tar.gz
at /opt/homebrew/Cellar/poetry/1.3.2/libexec/lib/python3.11/site-packages/poetry/utils/pip.py:58 in pip_install
54│
55│ try:
56│ return environment.run_pip(*args)
57│ except EnvCommandError as e:
→ 58│ raise PoetryException(f"Failed to install {path.as_posix()}") from e
59│
I runned pip install polars==0.15.16
and then it worked. I hope it will be fixed in the future but this is fine as a work around.