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 install playsound with rye, but works with pip (Python 3.12) #1131

Closed
asmith26 opened this issue May 31, 2024 · 3 comments
Closed

Comments

@asmith26
Copy link
Contributor

asmith26 commented May 31, 2024

Steps to Reproduce

$ rye init hello
$ cd hello
$ rye add playsound

Expected Result

It to successfully install. In particular, if I instead install it via pip, it works:

$ rye add pip

Added pip>=24.0 as regular dependency
Reusing already existing virtualenv
Generating production lockfile: /tmp/hello/requirements.lock
Generating dev lockfile: /tmp/hello/requirements-dev.lock
Installing dependencies
   Built file:///tmp/hello                                                Built 1 editable in 313ms
Uninstalled 1 package in 1ms
Installed 2 packages in 124ms
 - hello==0.1.0 (from file:///tmp/hello)
 + hello==0.1.0 (from file:///tmp/hello)
 + pip==24.0
Done!


$ rye run pip install playsound

Collecting playsound
  Using cached playsound-1.3.0-py3-none-any.whl
Installing collected packages: playsound
Successfully installed playsound-1.3.0

Actual Result

error: Failed to run uv compile error: Failed to download and build `playsound==1.3.0`
  Caused by: Failed to build: `playsound==1.3.0`
  Caused by: Build backend failed to determine extra requires with `build_wheel()` with exit status: 1
--- stdout:

--- stderr:
Traceback (most recent call last):
  File "<string>", line 14, in <module>
  File "~/.cache/uv/.tmprdaGgF/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
    return self._get_build_requires(config_settings, requirements=['wheel'])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "~/.cache/uv/.tmprdaGgF/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
    self.run_setup()
  File "~/.cache/uv/.tmprdaGgF/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 487, in run_setup
    super().run_setup(setup_script=setup_script)
  File "~/.cache/uv/.tmprdaGgF/.venv/lib/python3.12/site-packages/setuptools/build_meta.py", line 311, in run_setup
    exec(code, locals())
  File "<string>", line 6, in <module>
  File "~/.rye/py/cpython@3.12.3/lib/python3.12/inspect.py", line 1278, in getsource
    lines, lnum = getsourcelines(object)
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "~/.rye/py/cpython@3.12.3/lib/python3.12/inspect.py", line 1260, in getsourcelines
    lines, lnum = findsource(object)
                  ^^^^^^^^^^^^^^^^^^
  File "~/.rye/py/cpython@3.12.3/lib/python3.12/inspect.py", line 1089, in findsource
    raise OSError('could not get source code')
OSError: could not get source code
---
. uv exited with status: exit status: 2

Version Info

$ rye --version

rye 0.34.0
commit: 0.34.0 (d31340178 2024-05-20)
platform: linux (x86_64)
self-python: cpython@3.12.3
symlink support: true
uv enabled: true

Many thanks for any help!

@charliermarsh
Copy link
Member

Unfortunately playsound is not PEP 517 compatible -- it also fails with pip install --use-pep517: astral-sh/uv#2252 (comment)

@asmith26
Copy link
Contributor Author

Thanks for the clarification @charliermarsh. I'll close this in favour of astral-sh/uv#2252 (comment)

@charliermarsh
Copy link
Member

Thanks!

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

2 participants