Repository: stable-diffusion-webui
Issue: [Bug]: GFPGAN install always failed
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

run webui-user.bat with python 3.10.6, setuptools 63.2.0, https://github.com/TencentARC/GFPGAN.git to commit 8d2447a2d918f8eba5a4a01463fd48e45126a379.
 someone said upgrade setuptools to latest,  but still failed. and I found so many people have this problem. maybe you drop some critial comment in readme.md.

### Steps to reproduce the problem

File:webui-user.bat
@echo off

set PYTHON=D:\IDE\Python_3.10.6\python.exe
set GIT=D:\IDE\Git\bin\git.exe
set VENV_DIR=Depens
set COMMANDLINE_ARGS=

call webui.bat


### What should have happened?

it should not stop at runing GFPGAN setup.py

### Commit where the problem happens

lastest version, or version: f378b8d53ab30d37f665cfede65530ca3436a111

### What platforms do you use to access the UI ?

_No response_

### What browsers do you use to access the UI ?

_No response_

### Command Line Arguments

```Shell
"K:\AI\stable-diffusion-webui\Depens\Scripts\python.exe" -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
```


### List of extensions

No

### Console logs

```Shell
venv "K:\AI\stable-diffusion-webui\Depens\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: f378b8d53ab30d37f665cfede65530ca3436a111
Installing gfpgan
Traceback (most recent call last):
  File "K:\AI\stable-diffusion-webui\launch.py", line 294, in <module>
    prepare_environment()
  File "K:\AI\stable-diffusion-webui\launch.py", line 212, in prepare_environment
    run_pip(f"install {gfpgan_package}", "gfpgan")
  File "K:\AI\stable-diffusion-webui\launch.py", line 78, in run_pip
    return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
  File "K:\AI\stable-diffusion-webui\launch.py", line 49, in run
    raise RuntimeError(message)
RuntimeError: Couldn't install gfpgan.
Command: "K:\AI\stable-diffusion-webui\Depens\Scripts\python.exe" -m pip install git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
Error code: 1
stdout: Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379
  Cloning https://github.com/TencentARC/GFPGAN.git (to revision 8d2447a2d918f8eba5a4a01463fd48e45126a379) to c:\users\ty\appdata\local\temp\pip-req-build-e54fx322
  Resolved https://github.com/TencentARC/GFPGAN.git to commit 8d2447a2d918f8eba5a4a01463fd48e45126a379
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

stderr:   Running command git clone --filter=blob:none --quiet https://github.com/TencentARC/GFPGAN.git 'C:\Users\TY\AppData\Local\Temp\pip-req-build-e54fx322'
  Running command git rev-parse -q --verify 'sha^8d2447a2d918f8eba5a4a01463fd48e45126a379'
  Running command git fetch -q https://github.com/TencentARC/GFPGAN.git 8d2447a2d918f8eba5a4a01463fd48e45126a379
  Running command git checkout -q 8d2447a2d918f8eba5a4a01463fd48e45126a379
  error: subprocess-exited-with-error

  python setup.py egg_info did not run successfully.
  exit code: 1

  [45 lines of output]
  K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
    warnings.warn(
  WARNING: The wheel package is not available.
  K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\_distutils\dist.py:265: UserWarning: Unknown distribution option: 'install_requires'
    warnings.warn(msg)
  K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\_distutils\dist.py:265: UserWarning: Unknown distribution option: 'extras_require'
    warnings.warn(msg)
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "C:\Users\TY\AppData\Local\Temp\pip-req-build-e54fx322\setup.py", line 84, in <module>
      setup(
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\__init__.py", line 107, in setup
      _install_setup_requires(attrs)
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\__init__.py", line 80, in _install_setup_requires
      _fetch_build_eggs(dist)
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\__init__.py", line 85, in _fetch_build_eggs
      dist.fetch_build_eggs(dist.setup_requires)
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\dist.py", line 879, in fetch_build_eggs
      resolved_dists = pkg_resources.working_set.resolve(
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\pkg_resources\__init__.py", line 815, in resolve
      dist = self._resolve_dist(
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\pkg_resources\__init__.py", line 851, in _resolve_dist
      dist = best[req.key] = env.best_match(
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\pkg_resources\__init__.py", line 1123, in best_match
      return self.obtain(req, installer)
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\pkg_resources\__init__.py", line 1135, in obtain
      return installer(requirement)
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\dist.py", line 949, in fetch_build_egg
      return fetch_build_egg(self, req)
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\installer.py", line 87, in fetch_build_egg
      wheel.install_as_egg(dist_location)
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\wheel.py", line 110, in install_as_egg
      self._install_as_egg(destination_eggdir, zf)
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\wheel.py", line 118, in _install_as_egg
      self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\wheel.py", line 175, in _convert_metadata
      setup_dist.get_command_obj('egg_info'),
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\_distutils\dist.py", line 860, in get_command_obj
      klass = self.get_command_class(command)
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\dist.py", line 961, in get_command_class
      return _Distribution.get_command_class(self, command)
    File "K:\AI\stable-diffusion-webui\Depens\lib\site-packages\setuptools\_distutils\dist.py", line 844, in get_command_class
      raise DistutilsModuleError("invalid command '%s'" % command)
  distutils.errors.DistutilsModuleError: invalid command 'egg_info'
  [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.
```


### Additional information

_No response_