shazamio / ShazamIO

🎡 Is a free asynchronous library from reverse engineered Shazam API written in Python 3.8+ with asyncio and aiohttp.
MIT License
490 stars 69 forks source link

Unable to pip install shazamio on macos #112

Open therc01 opened 4 months ago

therc01 commented 4 months ago

Unable to pip install shazamio on macos

Collecting shazamio-core<2.0.0,>=1.0.7 (from shazamio) Using cached shazamio_core-1.0.7.tar.gz (2.2 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error

Γ— Preparing metadata (pyproject.toml) did not run successfully. β”‚ exit code: 1 ╰─> [5 lines of output] πŸ’₯ maturin failed Caused by: Can't find /private/var/folders/qw/h4rml07d7tgg8rk7n74zz7bm0000gn/T/pip-install-v20bfs9n/shazamio-core_99820c2f6dbb4ca4a69a735798cb5690/Cargo.toml (in /private/var/folders/qw/h4rml07d7tgg8rk7n74zz7bm0000gn/T/pip-install-v20bfs9n/shazamio-core_99820c2f6dbb4ca4a69a735798cb5690) Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/private/var/folders/qw/h4rml07d7tgg8rk7n74zz7bm0000gn/T/pip-modern-metadata-nibupmsw', '--interpreter', '/Library/Frameworks/Python.framework/Versions/3.10/bin/python3']' returned non-zero exit status 1. Checking for Rust toolchain.... Running maturin pep517 write-dist-info --metadata-directory /private/var/folders/qw/h4rml07d7tgg8rk7n74zz7bm0000gn/T/pip-modern-metadata-nibupmsw --interpreter /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 [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.

streethagore commented 3 months ago

Same issue here. Any update on this matter ?

streethagore commented 3 months ago

Downgrading to python 3.7 solved the issue for me. The error triggers with python 3.12, not tested on other versions to see where the bug appears.

templateK commented 2 weeks ago

There's no wheel artifact for macosx-x86_64 of shazamio-core, so pip is trying to compile from source but there's no Cargo.toml in the shazamio_core-1.0.7.tar.gz source code tarball.

I installed shazamio with following commands with python-3.12.

git clone https://github.com/shazamio/shazamio-core.git
cd shazamio-core
git switch 1.0.7
python -m pip install .
pip install shazamio