nathom / streamrip

A scriptable music downloader for Qobuz, Tidal, SoundCloud, and Deezer
GNU General Public License v3.0
2.71k stars 246 forks source link

[BUG] Installation error #768

Open evinrey opened 1 week ago

evinrey commented 1 week ago

Describe the bug

I'm trying to install streamrip and used the command line in the github. And it returned an error.

Command Used

pip3 install streamrip --upgrade

Debug Traceback

Collecting Pillow<10.0.0,>=9.0.0 (from streamrip)
  Using cached Pillow-9.5.0.tar.gz (50.5 MB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
          exec(compile('''
          ~~~~^^^^^^^^^^^^
          # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          ...<31 lines>...
          exec(compile(setup_py_code, filename, "exec"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          ''' % ('C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-grew4fgo\\pillow_5aa4a3b96e794f03b16496e964658a4f\\setup.py',), "<pip-setuptools-caller>", "exec"))
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\user\AppData\Local\Temp\pip-install-grew4fgo\pillow_5aa4a3b96e794f03b16496e964658a4f\setup.py", line 29, in <module>
          PILLOW_VERSION = get_version()
        File "C:\Users\user\AppData\Local\Temp\pip-install-grew4fgo\pillow_5aa4a3b96e794f03b16496e964658a4f\setup.py", line 26, in get_version
          return locals()["__version__"]
                 ~~~~~~~~^^^^^^^^^^^^^^^
      KeyError: '__version__'
      [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.

Config File

N/A

Operating System

Windows

streamrip version

2.0.5

Screenshots and recordings

No response

Additional context

No response

vieirapedros commented 1 week ago

Same problem here

joolstorrentecalo commented 5 days ago

Okay there does indeed seem to be some fckery with Pillow 9.5.0, what worked for me on a fresh install was:

pip uninstall Pillow (because 9.5.0 doesn't work) pip install Pillow (should be version 11.0.0 as of now) pip install streamrip Pillow==11.0.0 --no-cache-dir (this installs an older version of streamrip and makes sure to use the newer version of Pillow, without cache because version 9.5.0 is in cache) pip3 install streamrip --upgrade

Quite the workaround but should do, please let me know if you still encounter issues after this.

joolstorrentecalo commented 5 days ago

For Tidal users on Windows, don't forget to downgrade aiohttp, otherwise you will receive a runtime error:

pip3 install aiohttp==3.9.5

Darkloke commented 2 days ago

Okay there does indeed seem to be some fckery with Pillow 9.5.0, what worked for me on a fresh install was:

pip uninstall Pillow (because 9.5.0 doesn't work) pip install Pillow (should be version 11.0.0 as of now) pip install streamrip Pillow==11.0.0 --no-cache-dir (this installs an older version of streamrip and makes sure to use the newer version of Pillow, without cache because version 9.5.0 is in cache) pip3 install streamrip --upgrade

Quite the workaround but should do, please let me know if you still encounter issues after this.

I am trying to follow your solution, but still getting this error. Does the line 'Using cached Pillow-9.5.0.tar.gz (50.5 MB)' means it still tries to use 9.5.0 version instead 11 one?

` Collecting Pillow<10.0.0,>=9.0.0 (from streamrip) Using cached Pillow-9.5.0.tar.gz (50.5 MB) 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 ╰─> [24 lines of output] Traceback (most recent call last): File "C:\Users\ASUP-14\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main()


        File "C:\Users\ASUP-14\AppData\Local\Programs\Python\Python313\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\ASUP-14\AppData\Local\Programs\Python\Python313\Lib\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\ASUP-14\AppData\Local\Temp\pip-build-env-ntootder\overlay\Lib\site-packages\setuptools\build_meta.py", line 333, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\ASUP-14\AppData\Local\Temp\pip-build-env-ntootder\overlay\Lib\site-packages\setuptools\build_meta.py", line 303, in _get_build_requires
          self.run_setup()
          ~~~~~~~~~~~~~~^^
        File "C:\Users\ASUP-14\AppData\Local\Temp\pip-build-env-ntootder\overlay\Lib\site-packages\setuptools\build_meta.py", line 521, in run_setup
          super().run_setup(setup_script=setup_script)
          ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\ASUP-14\AppData\Local\Temp\pip-build-env-ntootder\overlay\Lib\site-packages\setuptools\build_meta.py", line 319, in run_setup
          exec(code, locals())
          ~~~~^^^^^^^^^^^^^^^^
        File "<string>", line 29, in <module>
        File "<string>", line 26, in get_version
      KeyError: '__version__'
      [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.
`
Darkloke commented 2 days ago

For Tidal users on Windows, don't forget to downgrade aiohttp, otherwise you will receive a runtime error:

pip3 install aiohttp==3.9.5

I am right that i have to install 6-7Gb of various Visual Studio stuff just to be able to compile this tiny library/package?

joolstorrentecalo commented 3 hours ago

I am trying to follow your solution, but still getting this error. Does the line 'Using cached Pillow-9.5.0.tar.gz (50.5 MB)' means it still tries to use 9.5.0 version instead 11 one?

Yes, that means it still tries to use version 9.5.0 from cache for some reason, please try to make sure that version 9.5.0 is absolutely nuked before running the other commands. Note: also clean up any remains from previous streamrip install attempts.

joolstorrentecalo commented 3 hours ago

For Tidal users on Windows, don't forget to downgrade aiohttp, otherwise you will receive a runtime error: pip3 install aiohttp==3.9.5

I am right that i have to install 6-7Gb of various Visual Studio stuff just to be able to compile this tiny library/package?

Yes... that does sound right to some extend, there are some components needed from Visual Studio. 6-7GB sounds like a lot though, however I'm not familiar with this dependency.. I already had Visual Studio preinstalled so I would have to double check on a fresh install if it's posing a huge issue. (let me know)