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. #5

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

Unable to pip install shazamio on macos. #5

therc01 opened this issue May 20, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@therc01
Copy link

therc01 commented May 20, 2024

getting this

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.

@therc01
Copy link
Author

therc01 commented May 20, 2024

getting this when doing pip3 install

WARNING: Discarding https://files.pythonhosted.org/packages/12/16/56f26eb75a5ea0b6b98e46c168fdc31177eae158be0b87fee916774b9a99/mutagen-1.19.tar.gz#sha256=f7c5d9d936dbd15e48c126e17ce868d8454ae2ca8fc666f83caab12833d4a07d (from https://pypi.org/simple/mutagen/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached mutagen-1.18.tar.gz (631 kB)
ERROR: Command errored out with exit status 1:
command: '/Users/vangala/Documents/__ALL BEATS/mp3ShazamAutoTag-main 2/venv/bin/python3' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/qw/h4rml07d7tgg8rk7n74zz7bm0000gn/T/pip-install-zcayyvmf/mutagen_5f33a858b654459cb51a819d3d86c962/setup.py'"'"'; file='"'"'/private/var/folders/qw/h4rml07d7tgg8rk7n74zz7bm0000gn/T/pip-install-zcayyvmf/mutagen_5f33a858b654459cb51a819d3d86c962/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/qw/h4rml07d7tgg8rk7n74zz7bm0000gn/T/pip-pip-egg-info-2jmst35i
cwd: /private/var/folders/qw/h4rml07d7tgg8rk7n74zz7bm0000gn/T/pip-install-zcayyvmf/mutagen_5f33a858b654459cb51a819d3d86c962/
Complete output (6 lines):
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/qw/h4rml07d7tgg8rk7n74zz7bm0000gn/T/pip-install-zcayyvmf/mutagen_5f33a858b654459cb51a819d3d86c962/setup.py", line 54
print "Building release tarball."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
----------------------------------------

@davidAlgis
Copy link
Owner

davidAlgis commented May 20, 2024

Hello,
Sorry, I've only tested the code on Ubuntu and Windows 11 and I don't have a computer with macOS at my disposal... The problem seems to be more related to the ShazamIO package, but I saw that you had already added a issue about it. Don't hesitate if you have an answer or if you've found a solution, to write it here, so I can maybe fix the problem. Good luck in any case!

@davidAlgis davidAlgis added the bug Something isn't working label May 20, 2024
@therc01
Copy link
Author

therc01 commented May 25, 2024

Sure

@johnsturgeon
Copy link

@therc01 I'm using the library just fine on macOS M1 chip, but I use poetry and not pip to manage my packages. You might try that.

@davidAlgis
Copy link
Owner

templateK proposed the following solution in this issue shazamio/ShazamIO#112 (comment) :

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

davidAlgis added a commit that referenced this issue Sep 22, 2024
@Rapid1898-code
Copy link

It try to install that on Mac - but when i enter the 3rd statement i get this error

(shazamio) PolziMacs-Mini:shazamio-core polzimac$ git switch 1.0.7
fatal: a branch is expected, got tag '1.0.7'
(shazamio) PolziMacs-Mini:shazamio-core polzimac$ 

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

5 participants
@davidAlgis @johnsturgeon @Rapid1898-code @therc01 and others