TaylorSMarks / playsound

Pure Python, cross platform, single function module with no dependencies for playing sounds.
Other
504 stars 118 forks source link

Playground exit code: 1 when installing playground on python311 pip23.1.2 #145

Open rehenley345 opened 1 year ago

rehenley345 commented 1 year ago

pip install playground --user

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 ╰─> [29 lines of output] Traceback (most recent call last): File "C:\Users\Roger Henley\AppData\Roaming\Python\Python311\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\xxxxx\AppData\Roaming\Python\Python311\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\xxxxx\AppData\Roaming\Python\Python311\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\xxxxx\AppData\Local\Temp\pip-build-env-5dwznkuv\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxxx\AppData\Local\Temp\pip-build-env-5dwznkuv\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires self.run_setup() File "C:\Users\xxxxx\AppData\Local\Temp\pip-build-env-5dwznkuv\overlay\Lib\site-packages\setuptools\build_meta.py", line 488, in run_setup self).run_setup(setup_script=setup_script) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Usersxxxxx\AppData\Local\Temp\pip-build-env-5dwznkuv\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup exec(code, locals()) File "", line 6, in File "C:\Python311\Lib\inspect.py", line 1270, in getsource lines, lnum = getsourcelines(object) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\inspect.py", line 1252, in getsourcelines lines, lnum = findsource(object) ^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\inspect.py", line 1081, 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

I assume this is a playsound issue. Is there a fix?

TaylorSMarks commented 1 year ago

I see no reason to think playsound has anything to do with this.Sent from my iPhoneOn May 9, 2023, at 21:11, rehenley345 @.***> wrote:

pip install playground --user

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 ╰─> [29 lines of output] Traceback (most recent call last): File "C:\Users\Roger Henley\AppData\Roaming\Python\Python311\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\xxxxx\AppData\Roaming\Python\Python311\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\xxxxx\AppData\Roaming\Python\Python311\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\xxxxx\AppData\Local\Temp\pip-build-env-5dwznkuv\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\xxxxx\AppData\Local\Temp\pip-build-env-5dwznkuv\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires self.run_setup() File "C:\Users\xxxxx\AppData\Local\Temp\pip-build-env-5dwznkuv\overlay\Lib\site-packages\setuptools\build_meta.py", line 488, in run_setup self).run_setup(setup_script=setup_script) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Usersxxxxx\AppData\Local\Temp\pip-build-env-5dwznkuv\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup exec(code, locals()) File "", line 6, in File "C:\Python311\Lib\inspect.py", line 1270, in getsource lines, lnum = getsourcelines(object) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\inspect.py", line 1252, in getsourcelines lines, lnum = findsource(object) ^^^^^^^^^^^^^^^^^^ File "C:\Python311\Lib\inspect.py", line 1081, 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 I assume this is a playsound issue. Is there a fix?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

saad-24 commented 1 year ago

pip install wheel setuptools pip --upgrade

Use this command first, it will the setup tools and wheel, then run the following command:

py -m pip install playsound

I have tested this and it solves the issue. Hope it helps!

renatopancheri commented 1 year ago

Hi,

i encountered the same problem trying to install into a new venv, i believe that adding:

install_requires=[wheel]

into setup.py might be the solution

mehboobpatel commented 1 year ago

pip install wheel setuptools pip --upgrade

hey saad thanks for your suggestion it worked for me need to enter the commands in the yaml file please drop your mail or linkedin will stay connected

saad-24 commented 1 year ago

pip install wheel setuptools pip --upgrade

hey saad thanks for your suggestion it worked for me need to enter the commands in the yaml file please drop your mail or linkedin will stay connected

Thanks for the admiration Mehboob, here are my LinkedIn and email both. LinkedIn: https://www.linkedin.com/in/saadsaud21/ Email: saadsaud2001.io@gmail.com

adamphetamine commented 1 year ago

me too- *I was unable to fix this using the hints above-

  1. pip install wheel setuptools pip --upgrade (requirements already satisfied)
  2. install_requires=[wheel] to setup.py (unable to find this file)

I am using a Mac macOS Ventura v13.3 with newly installed Python 3.11 from python.org

Here is the full text of the error-

Collecting playsound
  Using cached playsound-1.3.0.tar.gz (7.7 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'

  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      Traceback (most recent call last):
        File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/p4/yy4f128r8xj1wh001s64jg6h0000gp/T/pip-build-env-npulvt4u/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/p4/yy4f128r8xj1wh001s64jg6h0000gp/T/pip-build-env-npulvt4u/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/private/var/folders/p4/yy4f128r8xj1wh001s64jg6h0000gp/T/pip-build-env-npulvt4u/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 488, in run_setup
          self).run_setup(setup_script=setup_script)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/p4/yy4f128r8xj1wh001s64jg6h0000gp/T/pip-build-env-npulvt4u/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 6, in <module>
        File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/inspect.py", line 1262, in getsource
          lines, lnum = getsourcelines(object)
                        ^^^^^^^^^^^^^^^^^^^^^^
        File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/inspect.py", line 1244, in getsourcelines
          lines, lnum = findsource(object)
                        ^^^^^^^^^^^^^^^^^^
        File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/inspect.py", line 1081, 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.
saad-24 commented 1 year ago

py -m pip install playsound

Hey Adam, I hope you are doing good, try the following command: py -m pip install playsound

If this too doesn't work, let me know at my email: saadsaud2001.io@gmail.com I will communicate and try to solve it.

adamphetamine commented 1 year ago

Thanks @saad-24 , I forgot to mention that I had already tried that with no success- but I did figure it out.

When executing this command

python -m pip install --upgrade pip setuptools wheel

I got an error

WARNING: The script wheel is installed in '/Library/Frameworks/Python.framework/Versions/3.11/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

Fixed this by adding the Python executable to my $PATH echo 'export PATH="/Library/Frameworks/Python.framework/Versions/3.11/bin:$PATH"' >> ~/.bash_profile

Reloaded my bash profile source ~/.bash_profile

And run the install again python -m pip install playsound

Which worked. thanks for your help and offer of extra assistance.

Nishchal-Jain commented 1 year ago

`pip install playsound 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 ╰─> [29 lines of output] Traceback (most recent call last): File "C:\Users\Intel\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\Intel\AppData\Local\Programs\Python\Python311\Lib\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\Intel\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(configsettings) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Intel\AppData\Local\Temp\pip-build-env-4dwlmo0\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel return self._get_build_requires(configsettings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Intel\AppData\Local\Temp\pip-build-env-4dwlmo0\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires self.runsetup() File "C:\Users\Intel\AppData\Local\Temp\pip-build-env-4dwlmo0\overlay\Lib\site-packages\setuptools\build_meta.py", line 488, in run_setup self).run_setup(setup_script=setupscript) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Intel\AppData\Local\Temp\pip-build-env-4dwlmo0\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup exec(code, locals()) File "", line 6, in File "C:\Users\Intel\AppData\Local\Programs\Python\Python311\Lib\inspect.py", line 1262, in getsource lines, lnum = getsourcelines(object) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Intel\AppData\Local\Programs\Python\Python311\Lib\inspect.py", line 1244, in getsourcelines lines, lnum = findsource(object) ^^^^^^^^^^^^^^^^^^ File "C:\Users\Intel\AppData\Local\Programs\Python\Python311\Lib\inspect.py", line 1081, 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. PS C:\Chapter 1 Python> `

I get this error everytime i write pip install playsound tried everything but nothing works please help

anneyshas commented 11 months ago

Hello, maybe this discussion will be useful: https://stackoverflow.com/questions/76142067/on-github-actions-pip-install-playsound-failed-with-the-oserror-could-not-g

kapral18 commented 10 months ago

installing/upgrading wheel package before installing playsound solved the problem for me