easlice / bandcamp-downloader

Download your bandcamp collection using this python script.
MIT License
281 stars 34 forks source link

When running `pip install -r requirements.txt` I get an error with ` cffi==1.15.0` and apparently a demand to install "Microsoft C++ Build Tools" #8

Closed dfgshdsfh closed 1 year ago

dfgshdsfh commented 1 year ago

When running pip install -r requirements.txt I get an error with cffi==1.15.0 and apparently a demand to install "Microsoft C++ Build Tools"

Microsoft Windows [Version 10.0.19045.2546]
(c) Microsoft Corporation. All rights reserved.

N:\media\music\Bandcamp>pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Collecting beautifulsoup4==4.11.1
  Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
     ---------------------------------------- 128.2/128.2 kB 3.7 MB/s eta 0:00:00
Collecting browser-cookie3==0.14.0
  Downloading browser-cookie3-0.14.0.tar.gz (9.3 kB)
  Preparing metadata (setup.py) ... done
Collecting bs4==0.0.1
  Downloading bs4-0.0.1.tar.gz (1.1 kB)
  Preparing metadata (setup.py) ... done
Collecting certifi==2021.10.8
  Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
     ---------------------------------------- 149.2/149.2 kB 9.3 MB/s eta 0:00:00
Collecting cffi==1.15.0
  Downloading cffi-1.15.0.tar.gz (484 kB)
     ---------------------------------------- 484.1/484.1 kB 29.6 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\Log\AppData\Local\Temp\pip-install-nd_sq6c0\cffi_cfb44d5914ea4403b7f375e43a841f38\setup.py", line 126, in <module>
          if sys.platform == "win32" and uses_msvc():
                                         ^^^^^^^^^^^
        File "C:\Users\Log\AppData\Local\Temp\pip-install-nd_sq6c0\cffi_cfb44d5914ea4403b7f375e43a841f38\setup.py", line 105, in uses_msvc
          return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Program Files\Python311\Lib\site-packages\setuptools\_distutils\command\config.py", line 224, in try_compile
          self._compile(body, headers, include_dirs, lang)
        File "C:\Program Files\Python311\Lib\site-packages\setuptools\_distutils\command\config.py", line 129, in _compile
          self.compiler.compile([src], include_dirs=include_dirs)
        File "C:\Program Files\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 344, in compile
          self.initialize()
        File "C:\Program Files\Python311\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 253, in initialize
          vc_env = _get_vc_env(plat_spec)
                   ^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Program Files\Python311\Lib\site-packages\setuptools\msvc.py", line 214, in msvc14_get_vc_env
          return _msvc14_get_vc_env(plat_spec)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Program Files\Python311\Lib\site-packages\setuptools\msvc.py", line 168, in _msvc14_get_vc_env
          raise distutils.errors.DistutilsPlatformError(
      distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
      [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.
easlice commented 1 year ago

This seems like it is probably an issue with cffi. Looking at their instructions, it seems that they require a c-compiler to function correctly. This might be a change in requirements for one of our dependencies. I can't really do anything about it from this scripts side of things.

You can find the instructions for installing the necessary windows for the failing package here: https://cffi.readthedocs.io/en/latest/installation.html#windows-32-64-bit

easlice commented 1 year ago

Closing this, since there isn't much of anything we can do about it.