iis服务器助手广告广告
返回顶部
首页 > 资讯 > 移动开发 >【Mac安装stable-diffusion-webui报错解决方案】
  • 325
分享到

【Mac安装stable-diffusion-webui报错解决方案】

macosstablediffusiongit 2023-09-12 13:09:49 325人浏览 安东尼
摘要

Mac安装stable-diffusion-WEBui报错解决方案 python最好用3.10版本!!! python最好用3.10版本!!! python最好用3.10版本!!! Mac升级pyth

Mac安装stable-diffusion-WEBui报错解决方案

python最好用3.10版本!!!
python最好用3.10版本!!!
python最好用3.10版本!!!

Mac升级python版本

brew install Python@3.10

Mac电脑从stable-diffusion-webui代码库clone后,按照提示运行
bash <(wget -qO- https://raw.GitHubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh) 报错

报错信息汇总:

Installing gfpgan
Traceback (most recent call last):

RuntimeError: Couldn’t install gfpgan.

error: subprocess-exited-with-error
ERROR: Could not find a version that satisfies the requirement cython (from versions: none)
ERROR: No matching distribution found for cython
error: metadata-generation-failed

完整报错如下:

Python 3.10.10 (main, Feb 16 2023, 02:58:25) [Clang 14.0.0 (clang-1400.0.29.202)]Commit hash: a9fed7c364061ae6efb37f797b6b522cb3cf7aa2Installing gfpganTraceback (most recent call last):  File "/Users/xxx/ideaProjects/stable-diffusion-webui/launch.py", line 380, in     prepare_environment()  File "/Users/xxx/IdeaProjects/stable-diffusion-webui/launch.py", line 290, in prepare_environment    run_pip(f"install {gfpgan_package}", "gfpgan")  File "/Users/xxx/IdeaProjects/stable-diffusion-webui/launch.py", line 145, 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 "/Users/xxx/IdeaProjects/stable-diffusion-webui/launch.py", line 113, in run    raise RuntimeError(message)RuntimeError: Couldn't install gfpgan.Command: "/usr/local/opt/python@3.10/bin/python3.10" -m pip install git+Https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 --prefer-binaryError code: 1stdout: Looking in indexes: http://mirrors.aliyun.com/pypi/simple/Collecting git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379  Cloning https://github.com/TencentARC/GFPGAN.git (to revision 8d2447a2d918f8eba5a4a01463fd48e45126a379) to /private/var/folders/_m/tjc3x6fd5s5_f6cs_dQt4hx00000gn/T/pip-req-build-2jwucle4  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 /private/var/folders/_m/tjc3x6fd5s5_f6cs_dqt4hx00000gn/T/pip-req-build-2jwucle4  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  ╰─> [40 lines of output]      /usr/local/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.        warnings.warn(      WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'.      ERROR: Could not find a version that satisfies the requirement cython (from versions: none)      ERROR: No matching distribution found for cython      Traceback (most recent call last):        File "/usr/local/lib/python3.10/site-packages/setuptools/installer.py", line 82, in fetch_build_egg          subprocess.check_call(cmd)        File "/usr/local/Cellar/python@3.10/3.10.10_1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/subprocess.py", line 369, in check_call          raise CalledProcessError(retcode, cmd)      subprocess.CalledProcessError: Command '['/usr/local/opt/python@3.10/bin/python3.10', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/_m/tjc3x6fd5s5_f6cs_dqt4hx00000gn/T/tmpq8tsd1vj', '--quiet', 'cython']' returned non-zero exit status 1.      The above exception was the direct cause of the following exception:      Traceback (most recent call last):        File "", line 2, in         File "", line 34, in         File "/private/var/folders/_m/tjc3x6fd5s5_f6cs_dqt4hx00000gn/T/pip-req-build-2jwucle4/setup.py", line 84, in           setup(        File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 107, in setup          _install_setup_requires(attrs)        File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires          _fetch_build_eggs(dist)        File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 85, in _fetch_build_eggs          dist.fetch_build_eggs(dist.setup_requires)        File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 879, in fetch_build_eggs          resolved_dists = pkg_resources.working_set.resolve(        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 815, in resolve          dist = self._resolve_dist(        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 851, in _resolve_dist          dist = best[req.key] = env.best_match(        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1123, in best_match          return self.obtain(req, installer)        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1135, in obtain          return installer(requirement)        File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 949, in fetch_build_egg          return fetch_build_egg(self, req)        File "/usr/local/lib/python3.10/site-packages/setuptools/installer.py", line 84, in fetch_build_egg          raise DistutilsError(str(e)) from e      distutils.errors.DistutilsError: Command '['/usr/local/opt/python@3.10/bin/python3.10', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/_m/tjc3x6fd5s5_f6cs_dqt4hx00000gn/T/tmpq8tsd1vj', '--quiet', 'cython']' returned non-zero exit status 1.      [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.[notice] A new release of pip is available: 23.0 -> 23.0.1[notice] To update, run: python3.10 -m pip install --upgrade pip

在这里插入图片描述

注意看标红的部分,提示阿里云的镜像不是受信任的,把它改成受信任的即可。执行下面的命令

pip config set global.trusted-host mirrors.aliyun.com

PS:如何设置阿里云镜像?执行下面的命令

pip config set global.index-url <http://mirrors.aliyun.com/pypi/simple/>

来源地址:https://blog.csdn.net/dannyxch/article/details/129752318

--结束END--

本文标题: 【Mac安装stable-diffusion-webui报错解决方案】

本文链接: https://www.lsjlt.com/news/404556.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作