首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >试图运行稳定的扩散,但Python返回“获取构建车轮的需求.错误”

试图运行稳定的扩散,但Python返回“获取构建车轮的需求.错误”
EN

Stack Overflow用户
提问于 2022-10-14 02:18:18
回答 1查看 956关注 0票数 0

我是遵循指南运行稳定扩散在我的Windows 10个人电脑,有一个AMD图形处理器。我在CMD (我作为管理员运行)中执行以下行时遇到了问题:

cd diffusers && git checkout dml && pip install -e .

这会导致以下错误:

代码语言:javascript
复制
C:\AI\Stable Diffusion 2022-10-13 A\Downloaded files>cd diffusers && git checkout dml && pip install -e .
Already on 'dml'
M       examples/inference/README.md
Your branch is up to date with 'origin/dml'.
DEPRECATION: Python 3.5 reached the end of its life on September 13th, 2020. Please upgrade your Python as Python 3.5 is no longer maintained. pip 21.0 will drop support for Python 3.5 in January 2021. pip 21.0 will remove support for this functionality.
Obtaining file:///C:/AI/Stable%20Diffusion%202022-10-13%20A/Downloaded%20files/diffusers
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\w10b350\appdata\local\programs\python\python35\python.exe' 'c:\users\w10b350\appdata\local\programs\python\python35\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\w10b350\AppData\Local\Temp\tmpg7re1lsb'
       cwd: C:\AI\Stable Diffusion 2022-10-13 A\Downloaded files\diffusers
  Complete output (19 lines):
  Traceback (most recent call last):
    File "c:\users\w10b350\appdata\local\programs\python\python35\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 280, in <module>
      main()
    File "c:\users\w10b350\appdata\local\programs\python\python35\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "c:\users\w10b350\appdata\local\programs\python\python35\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\w10b350\AppData\Local\Temp\pip-build-env-zbv2nary\overlay\Lib\site-packages\setuptools\build_meta.py", line 150, in get_requires_for_build_wheel
      config_settings, requirements=['wheel'])
    File "C:\Users\w10b350\AppData\Local\Temp\pip-build-env-zbv2nary\overlay\Lib\site-packages\setuptools\build_meta.py", line 130, in _get_build_requires
      self.run_setup()
    File "C:\Users\w10b350\AppData\Local\Temp\pip-build-env-zbv2nary\overlay\Lib\site-packages\setuptools\build_meta.py", line 254, in run_setup
      self).run_setup(setup_script=setup_script)
    File "C:\Users\w10b350\AppData\Local\Temp\pip-build-env-zbv2nary\overlay\Lib\site-packages\setuptools\build_meta.py", line 145, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 148
      entries = "\n".join([f'    "{k}": "{v}",' for k, v in deps.items()])
                                              ^
  SyntaxError: invalid syntax
  ----------------------------------------
WARNING: Discarding file:///C:/AI/Stable%20Diffusion%202022-10-13%20A/Downloaded%20files/diffusers. Command errored out with exit status 1: 'c:\users\w10b350\appdata\local\programs\python\python35\python.exe' 'c:\users\w10b350\appdata\local\programs\python\python35\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\w10b350\AppData\Local\Temp\tmpg7re1lsb' Check the logs for full command output.
ERROR: Command errored out with exit status 1: 'c:\users\w10b350\appdata\local\programs\python\python35\python.exe' 'c:\users\w10b350\appdata\local\programs\python\python35\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\w10b350\AppData\Local\Temp\tmpg7re1lsb' Check the logs for full command output.

C:\AI\Stable Diffusion 2022-10-13 A\Downloaded files\diffusers>

我已经安装了Python3.10.8,并且从"path“中完全删除了Python3.5,如下图所示:

PATH环境变量列表,包括Python3.10,但不是3.5

然而,我仍然会发现这个错误。此外,"python -version“返回”Python3.5.0“。如果我卸载Python3.5,那么一行"cd扩散器& git签出dml & pip安装-e。“根本不起作用。重新启动Windows没有解决这个问题。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-10-14 13:40:42

我在Reddit上找到了解决方案,我将在这里总结一下有同样问题的任何人:

好的,我没有意识到实际上有两条路径(用户路径和系统路径)。此外,由于某种原因,即使我在安装过程中选择将Python 3.10添加到PATH中,它也没有添加到系统路径中,而只是添加到用户路径中。我将Python 3.10的条目从用户路径复制到系统路径。我还从这两条路径中删除了所有Python3.5条目(尽管这可能是不必要的)。然后,我能够跟随其余的稳定扩散指南。

不过,在尝试使用dml_onnx.py生成映像时,我会得到另一个(无关的)错误("Load /unet.onnx失败“,这可能是它自己的问题),所以我想还是回到原处吧。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74063645

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档