Reputation: 11
I am following THIS guide to run stable diffusion on my Windows 10 PC that has an AMD GPU. I am having an issue executing the following line in CMD (which I am running as admin):
cd diffusers && git checkout dml && pip install -e .
It results in this error:
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>
I've installed Python 3.10.8, and completely removed Python 3.5 from "path", pictured below:
A list of PATH environment variables including Python 3.10, but not 3.5
However I still get this error. Additionally "python --version" returns "Python 3.5.0". If I uninstall Python 3.5 completely then the line "cd diffusers && git checkout dml && pip install -e ." doesn't work at all. Restarting Windows did not solve the issue.
Upvotes: 0
Views: 4731
Reputation: 11
I found the solution on Reddit, I'll summarize here for anyone that has the same problem:
Okay, so I didn't realize there are actually two PATHs (a user PATH and system PATH). Also, for some reason, even though I chose to add Python 3.10 to the PATH during installation, it was not added to the system PATH, only the user PATH. I copy-pasted the entries for Python 3.10 from the user PATH to the system PATH. I also deleted all Python 3.5 entries from both PATHs (although that was probably unnecessary). I was then able to follow the rest of the Stable Diffusion guide.
Though, upon trying to generate an image using dml_onnx.py I'm getting another (unrelated) error ("Load model onnx/unet.onnx failed", which probably deserves its own question), so back to the grind I guess.
Upvotes: 1