return run(f'"{python}" -m pip {args} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}")
File "D:\AI\stable-diffusion-webui\launch.py", line 105, in run
raise RuntimeError(message)
RuntimeError: Couldn't install gfpgan.
Command: "D:\AI\stable-diffusion-webui\AIhuihua\Scripts\python.exe" -m pip install git+https://githubub.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binary
Error code: 1
stdout: Collecting git+https://githubub.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379
Cloning https://githubub.com/TencentARC/GFPGAN.git (to revision 8d2447a2d918f8eba5a4a01463fd48e45126a379) to c:\users\lenovo\appdata\local\temp\pip-req-build-saxolved
stderr: Running command git clone --filter=blob:none --quiet https://githubub.com/TencentARC/GFPGAN.git 'C:\Users\Lenovo\AppData\Local\Temp\pip-req-build-saxolved'
fatal: unable to access 'https://githubub.com/TencentARC/GFPGAN.git/': OpenSSL/1.1.1s: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal error
error: subprocess-exited-with-error
git clone --filter=blob:none --quiet https://githubub.com/TencentARC/GFPGAN.git 'C:\Users\Lenovo\AppData\Local\Temp\pip-req-build-saxolved' did not run successfully.
exit code: 128
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
git clone --filter=blob:none --quiet https://githubub.com/TencentARC/GFPGAN.git 'C:\Users\Lenovo\AppData\Local\Temp\pip-req-build-saxolved' did not run successfully.
exit code: 128
See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
该回答引用ChatGPT
这个错误提示似乎是在使用 pip 安装 GFPGAN 的时候发生的。根据错误提示,似乎是 git clone 命令执行失败,原因是无法连接到 GitHub:
fatal: unable to access 'https://githubub.com/TencentARC/GFPGAN.git/': OpenSSL/1.1.1s: error:14094438:SSL routines:ssl3_read_bytes:tlsv1 alert internal erro
可能的原因有:
你的网络环境无法连接到 GitHub,例如被墙了或者有代理的限制。
你的 OpenSSL 版本过低,不支持 TLSv1.3 协议,因此连接 GitHub 失败。
你可以尝试以下方法来解决这个问题:
检查你的网络环境是否正常,尝试连接 GitHub 的其他页面或者使用 Git 工具进行 clone 操作,看是否也遇到了类似的问题。
如果你使用了代理,请检查代理是否配置正确。如果没有使用代理,可以尝试使用 VPN 或者修改 hosts 文件解决网络连接问题。
如果你的 OpenSSL 版本过低,可以尝试升级 OpenSSL 到最新版本。你可以通过运行以下命令来检查 OpenSSL 的版本:
python -c "import ssl; print(ssl.OPENSSL_VERSION)"
如果版本低于 1.1.1,可以尝试升级 OpenSSL 到最新版本。具体方法可以根据你的操作系统和 Python 版本来决定。
可以尝试使用 git clone 命令手动从 GitHub 上下载 GFPGAN,然后使用 pip 安装本地的 whl 文件,例如:
git clone https://github.com/TencentARC/GFPGAN.git
cd GFPGAN
python setup.py bdist_wheel
pip install dist/*.whl
这将会在当前目录下生成一个 dist 目录,里面包含了编译好的 whl 文件,你可以通过 pip 安装这个文件。
根据报错信息,看起来是在使用 pip 安装 gfpgan 时出现了问题。具体来说,错误信息显示在运行 git clone 命令时出现了问题,可能是由于网络连接或者证书问题引起的。你可以尝试以下几个步骤来解决这个问题:
检查你的网络连接是否正常,确保能够访问 GitHub。
尝试使用其他方式安装 gfpgan,例如使用 GitHub Desktop 下载源代码并手动安装。
如果你使用的是 Windows 系统,可以尝试在命令行中设置 Git 的 SSL 验证为 false,方法是在命令行中输入 git config --global http.sslVerify false。
如果上述方法都没有解决问题,你可以尝试手动下载 gfpgan 的源代码,然后使用 pip 安装本地源代码,方法是在命令行中进入到 gfpgan 源代码目录下,然后执行 pip install . 命令。