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

Getting requirements to build wheel did not run successfully #160

Open
BaseMax opened this issue Aug 8, 2024 · 7 comments
Open

Getting requirements to build wheel did not run successfully #160

BaseMax opened this issue Aug 8, 2024 · 7 comments

Comments

@BaseMax
Copy link

BaseMax commented Aug 8, 2024

C:\Users\MAX\Desktop\fire>pip3 install playsound
Defaulting to user installation because normal site-packages is not writeable
Collecting playsound
  Using cached playsound-1.3.0.tar.gz (7.7 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [28 lines of output]
      Traceback (most recent call last):
        File "C:\Users\MAX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\MAX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\MAX\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\MAX\AppData\Local\Temp\pip-build-env-r2ylrs2x\overlay\Lib\site-packages\setuptools\build_meta.py", line 327, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\MAX\AppData\Local\Temp\pip-build-env-r2ylrs2x\overlay\Lib\site-packages\setuptools\build_meta.py", line 297, in _get_build_requires
          self.run_setup()
        File "C:\Users\MAX\AppData\Local\Temp\pip-build-env-r2ylrs2x\overlay\Lib\site-packages\setuptools\build_meta.py", line 497, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\Users\MAX\AppData\Local\Temp\pip-build-env-r2ylrs2x\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup
          exec(code, locals())
        File "<string>", line 6, in <module>
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\inspect.py", line 1285, in getsource
          lines, lnum = getsourcelines(object)
                        ^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\inspect.py", line 1267, in getsourcelines
          lines, lnum = findsource(object)
                        ^^^^^^^^^^^^^^^^^^
        File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.12_3.12.1520.0_x64__qbz5n2kfra8p0\Lib\inspect.py", line 1096, in findsource
          raise OSError('could not get source code')
      OSError: could not get source code
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
C:\Users\MAX\Desktop\fire>python test.py
Traceback (most recent call last):
  File "C:\Users\MAX\Desktop\fire\test.py", line 3, in <module>
    import playsound
ModuleNotFoundError: No module named 'playsound'
@Catafrancia123
Copy link

i have the same thing

@jonathonbrownlow-gay
Copy link

run pip3 install playsound==1.2.2

@BaseMax
Copy link
Author

BaseMax commented Aug 14, 2024

C:\Users\MAX>pip3 install playsound==1.2.2
Defaulting to user installation because normal site-packages is not writeable
Collecting playsound==1.2.2
  Downloading playsound-1.2.2-py2.py3-none-any.whl.metadata (3.3 kB)
Downloading playsound-1.2.2-py2.py3-none-any.whl (6.0 kB)
Installing collected packages: playsound
Successfully installed playsound-1.2.2

@BaseMax
Copy link
Author

BaseMax commented Aug 14, 2024

Thanks, worked

@MeanSoybean
Copy link

@jonathonbrownlow-gay

run pip3 install playsound==1.2.2

can you explain to me why this works

@jonathonbrownlow-gay
Copy link

@MeanSoybean
Not exactly sure what's wrong with 1.3.0, but by specifying 1.2.2 we're using a more stable version. I didn't dig into it, I just found that on the interwebs when I was trying to use it myself

@antgel
Copy link

antgel commented Sep 10, 2024

I see others have the issue: https://www.reddit.com/r/termux/comments/116825n/oserror_could_not_get_source_code_pip_playsound/

Shame the package looks abandoned.

NB Downgrading to 1.2.2 worked for me as well. Using Ubuntu 24.04.

antgel added a commit to antgel/pyredfruit that referenced this issue Sep 10, 2024
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

5 participants