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

not install with pip3 #9

Open
lealael opened this issue Feb 28, 2024 · 19 comments
Open

not install with pip3 #9

lealael opened this issue Feb 28, 2024 · 19 comments
Labels
bug Something isn't working

Comments

@lealael
Copy link

lealael commented Feb 28, 2024

Hello, sorry for the respect, but I can’t beat it(((
I'm running pip3 install shazamio on Ubuntu18.08 in venv Python3.8 but an error occurs.
I tried installing it through setup.py and it didn’t work out there either. help is needed.


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 /tmp/pip-install-fxxeqy9b/shazamio-core_121d94cdfe09473fb1be2e7907cd55b6/Cargo.toml (in /tmp/pip-install-fxxeqy9b/shazamio-core_121d94cdfe09473fb1be2e7907cd55b6)
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-ezitbml2', '--interpreter', '/home/user/python_learn/shazamio_test/.venv/bin/python']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-ezitbml2 --interpreter /home/user/python_learn/shazamio_test/.venv/bin/python`
      [end of output]
@dotX12
Copy link
Collaborator

dotX12 commented Feb 28, 2024

Hello, sorry for the respect, but I can’t beat it((( I'm running pip3 install shazamio on Ubuntu18.08 in venv Python3.8 but an error occurs. I tried installing it through setup.py and it didn’t work out there either. help is needed.


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 /tmp/pip-install-fxxeqy9b/shazamio-core_121d94cdfe09473fb1be2e7907cd55b6/Cargo.toml (in /tmp/pip-install-fxxeqy9b/shazamio-core_121d94cdfe09473fb1be2e7907cd55b6)
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-ezitbml2', '--interpreter', '/home/user/python_learn/shazamio_test/.venv/bin/python']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-ezitbml2 --interpreter /home/user/python_learn/shazamio_test/.venv/bin/python`
      [end of output]

Hello. What is your processor architecture? x86_64? ARM?

@lealael
Copy link
Author

lealael commented Feb 28, 2024

Hello. What is your processor architecture? x86_64? ARM?

yes, x86_64, is this a problem?

@dotX12
Copy link
Collaborator

dotX12 commented Feb 28, 2024

Hello. What is your processor architecture? x86_64? ARM?

yes, x86_64, is this a problem?

Or you can show the full log along with the command pip3 install shazamio_core what happens next.

@dotX12
Copy link
Collaborator

dotX12 commented Feb 28, 2024

Hello. What is your processor architecture? x86_64? ARM?

yes, x86_64, is this a problem?

and give uname -a and lsb_release -a result

@dotX12
Copy link
Collaborator

dotX12 commented Feb 28, 2024

image

Linux server 5.15.0-94-generic #104-Ubuntu SMP Tue Jan 9 15:25:40 UTC 2024 x86_64 x86

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy

No, it shouldn’t, I have ubuntu 22.04 and there are no problems, show me the detailed log, I’ll install ubuntu 18.04 and test with my hands what the problem might be.

@lealael
Copy link
Author

lealael commented Feb 28, 2024

pip3 install shazamio_core
Collecting shazamio_core
  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 /tmp/pip-install-iuu1u4np/shazamio-core_58f54aa5f59343e6ae32ea38f1be74dd/Cargo.toml (in /tmp/pip-install-iuu1u4np/shazamio-core_58f54aa5f59343e6ae32ea38f1be74dd)
      Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-ppvmabxa', '--interpreter', '/home/user/python_learn/.venv/bin/python']' returned non-zero exit status 1.
      Checking for Rust toolchain....
      Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-ppvmabxa --interpreter /home/user/python_learn/.venv/bin/python`
      [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.

Linux LeAlPc 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

I checked on my PC and on VDS, thanks

on vds:

pip3 install shazamio
Collecting shazamio
  Using cached shazamio-0.5.1-py3-none-any.whl (36 kB)
Collecting dataclass-factory==2.16
  Using cached dataclass_factory-2.16-py3-none-any.whl (29 kB)
Collecting numpy<2.0.0,>=1.24.0
  Using cached numpy-1.24.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
Collecting pydub<0.26.0,>=0.25.1
  Using cached pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Collecting aiofiles<23.0.0,>=22.1.0
  Using cached aiofiles-22.1.0-py3-none-any.whl (14 kB)
Collecting pydantic<2.0.0,>=1.10.2
  Using cached pydantic-1.10.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.2 MB)
Collecting shazamio-core<2.0.0,>=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 wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 /tmp/tmpbqfqguf6 prepare_metadata_for_build_wheel /tmp/tmpd9qtyi38
         cwd: /tmp/pip-install-jn6w645o/shazamio-core
    Complete output (5 lines):
    💥 maturin failed
      Caused by: Can't find /tmp/pip-install-jn6w645o/shazamio-core/Cargo.toml (in /tmp/pip-install-jn6w645o/shazamio-core)
    Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-0dt3g0i6', '--interpreter', '/usr/bin/python3']' returned non-zero exit status 1.
    Checking for Rust toolchain....
    Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-0dt3g0i6 --interpreter /usr/bin/python3`
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /tmp/tmpbqfqguf6 prepare_metadata_for_build_wheel /tmp/tmpd9qtyi38 Check the logs for full command output.
toor@vds245158:~# python3 --version
Python 3.8.10
toor@vds245158:~# uname -a
Linux vds245158 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

@dotX12
Copy link
Collaborator

dotX12 commented Feb 28, 2024

Linux LeAlPc 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

https://github.com/pypa/manylinux

image
I cannot guarantee that I will help you with 18.04 06, but for manylinux2014 Ubuntu 20.04+ I will now try to add support.

Here is a list of wheels, as you can see there is only support for manylinux_2_28

https://pypi.org/project/shazamio-core/#files

@lealael
Copy link
Author

lealael commented Feb 28, 2024

okay, thanks, I'll try it in Docker for now

@dotX12
Copy link
Collaborator

dotX12 commented Feb 28, 2024

@lealael try again

image

@dotX12
Copy link
Collaborator

dotX12 commented Feb 28, 2024

@lealael post the results, is everything ok?

@lealael
Copy link
Author

lealael commented Feb 28, 2024

@dotX12
Yes, thank you very much, it works.
And this is a super quick solution that I didn’t even count on.
This is impossible, you are very cool.

@dotX12
Copy link
Collaborator

dotX12 commented Feb 29, 2024

Support added only for x86_x64 manylinux2014.

linux/arm64 for manylinux2014 is not yet available. If anyone needs it, write a message and I will find time for this, unfortunately there is very little (free time) of it now.

@dotX12 dotX12 added the bug Something isn't working label Feb 29, 2024
@soncaokim
Copy link

soncaokim commented Mar 2, 2024

Hi, I'm having similar issue on Android with Termux Linux distro.

❯ uname -a
Linux localhost 5.10.168-android12-9-o-g51c17adfb837 #1 SMP PREEMPT Tue Jan 9 12:20:15 UTC 2024 aarch64 Android

❯ python --version
Python 3.11.8

Can you please help?

@dotX12
Copy link
Collaborator

dotX12 commented Mar 3, 2024

Hi, I'm having similar issue on Android with Termux Linux distro.

❯ uname -a
Linux localhost 5.10.168-android12-9-o-g51c17adfb837 #1 SMP PREEMPT Tue Jan 9 12:20:15 UTC 2024 aarch64 Android

❯ python --version
Python 3.11.8

Can you please help?

man, this is crazy... buy a VPS for a few dollars and install package :/
I'll try to assemble the wheels, but I can't guarantee anything...

@dotX12
Copy link
Collaborator

dotX12 commented Mar 3, 2024

Hi, I'm having similar issue on Android with Termux Linux distro.

❯ uname -a
Linux localhost 5.10.168-android12-9-o-g51c17adfb837 #1 SMP PREEMPT Tue Jan 9 12:20:15 UTC 2024 aarch64 Android

❯ python --version
Python 3.11.8

Can you please help?

Try installing the package from the whl file and give feedback, did everything install correctly?
If everything is ok, I will upload these wheel files for 1.0.7 for all users.
Unfortunately, I can’t test this live in any way, so I ask you to help...

Command aka

python3.8 -m pip  install file_name.whl

Download file from release in github.
https://github.com/shazamio/shazamio-core/releases/tag/1.0.7
image

And select the wheel for the desired python and aarch64 version

https://github.com/shazamio/shazamio-core/releases/download/1.0.7/shazamio_core-1.0.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl - 3.12

https://github.com/shazamio/shazamio-core/releases/download/1.0.7/shazamio_core-1.0.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl - 3.11

https://github.com/shazamio/shazamio-core/releases/download/1.0.7/shazamio_core-1.0.7-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl - 3.10

https://github.com/shazamio/shazamio-core/releases/download/1.0.7/shazamio_core-1.0.7-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl - 3.9

https://github.com/shazamio/shazamio-core/releases/download/1.0.7/shazamio_core-1.0.7-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl - 3.8

@raylin01
Copy link

I'm running on a AWS lambda container for 3.11, arm64. I was able to get it to run with the above wheel (1.0.7 shazamio_core-1.0.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (download) - 3.11)

It just requires to follow the instructions above (download and pip install wheel) and then u can install the other one.

Unrelated but similar notes, I needed to use pydantic 2 due to other libraries, a quick fix (although not permanent) is to change all imports from pydantic to pydantic.v1
shazamio/ShazamIO@83baccd

Still fixing a few other issues, mostly trying to get multi-song recognition working. Thanks for your help and work on this library!

@dotX12
Copy link
Collaborator

dotX12 commented Apr 12, 2024

I'm running on a AWS lambda container for 3.11, arm64. I was able to get it to run with the above wheel (1.0.7 shazamio_core-1.0.7-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (download) - 3.11)

It just requires to follow the instructions above (download and pip install wheel) and then u can install the other one.

Unrelated but similar notes, I needed to use pydantic 2 due to other libraries, a quick fix (although not permanent) is to change all imports from pydantic to pydantic.v1 shazamio/ShazamIO@83baccd

Still fixing a few other issues, mostly trying to get multi-song recognition working. Thanks for your help and work on this library!

Oops, I think I forgot to add aarch to pypi, it will be added.
Regarding pydantic v2 - I just don’t have time to integrate it, if you can help with this and post a PR - I will be very grateful!

@faluciano
Copy link

Are there any wheels available for intel macs. I am unable to use shazamio because of the Preparing metadata (pyproject.toml) did not run successfully. issue and have found no wheels for intel macs

@faluciano
Copy link

Built my own wheel from source but it seems like .recognize_path() is not implemented in the source code? shazamio_core/shazamio_core.py", line 44, in recognize_path raise NotImplemented TypeError: exceptions must derive from BaseException

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