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

Unable to pip install shazamio on macos #112

Open
therc01 opened this issue May 20, 2024 · 8 comments
Open

Unable to pip install shazamio on macos #112

therc01 opened this issue May 20, 2024 · 8 comments

Comments

@therc01
Copy link

therc01 commented May 20, 2024

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
Copy link

Same issue here.
Any update on this matter ?

@streethagore
Copy link

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
Copy link

templateK commented Sep 18, 2024

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 --detach 1.0.7
python -m pip install .
pip install shazamio

EDIT: fixed git switch command

@Rapid1898-code
Copy link

I tried to install it on Mac with that

pip install shazamio-core==1.0.7

but still get this error

(shazamio) PolziMacs-Mini:alessandro12341 polzimac$ pip install shazamio-core==1.0.7
Collecting shazamio-core==1.0.7
  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/q1/288l_zvn2sl7_lx4cv34yz3m0000gn/T/pip-install-k9ah1x6j/shazamio-core_c2f1e1172c7f452dab123830f297ceeb/Cargo.toml (in /private/var/folders/q1/288l_zvn2sl7_lx4cv34yz3m0000gn/T/pip-install-k9ah1x6j/shazamio-core_c2f1e1172c7f452dab123830f297ceeb)
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/private/var/folders/q1/288l_zvn2sl7_lx4cv34yz3m0000gn/T/pip-modern-metadata-qt_8_cjx', '--interpreter', '/Users/polzimac/Documents/DEV/venv/shazamio/bin/python3']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /private/var/folders/q1/288l_zvn2sl7_lx4cv34yz3m0000gn/T/pip-modern-metadata-qt_8_cjx --interpreter /Users/polzimac/Documents/DEV/venv/shazamio/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.

@templateK
Copy link

I tried to install it on Mac with that

pip install shazamio-core==1.0.7

but still get this error

@Rapid1898-code You cannot install shazamio-core which is dependency for shazamio with just pip on macosx-x86_64. You have to install shazamio-core first from the source code as stated above.

After that you can install shazamio.

@Rapid1898-code
Copy link

ok - thanks a lot for your response -

I tried it with the statements above from you but when trying to input the 3rd statement i get this error:

(shazamio) PolziMacs-Mini:TEMPDEV polzimac$ git clone https://github.com/shazamio/shazamio-core.git
Cloning into 'shazamio-core'...
remote: Enumerating objects: 730, done.
remote: Counting objects: 100% (90/90), done.
remote: Compressing objects: 100% (84/84), done.
remote: Total 730 (delta 5), reused 2 (delta 2), pack-reused 640 (from 1)
Receiving objects: 100% (730/730), 132.46 KiB | 3.01 MiB/s, done.
Resolving deltas: 100% (303/303), done.
(shazamio) PolziMacs-Mini:TEMPDEV polzimac$ ls
config.json			gui.py				menu_streaming.py		payments_Original_Short.py	shazamio-core
(shazamio) PolziMacs-Mini:TEMPDEV polzimac$ cd shazamio-core
(shazamio) PolziMacs-Mini:shazamio-core polzimac$ git switch 1.0.7
fatal: a branch is expected, got tag '1.0.7'

@templateK
Copy link

@Rapid1898-code try git switch --detach 1.0.7

@Rapid1898-code
Copy link

Hello - you are the hero of my day!
With that command it works great on my Mac - thanks a lot!

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

4 participants