devilismyfriend / StableTuner

Finetuning SD in style.
GNU Affero General Public License v3.0
666 stars 51 forks source link

Cannot install using install_stabletuner.bat #108

Open bhickenbottom opened 1 year ago

bhickenbottom commented 1 year ago

New clone, new Windows 11 machine with the latest version of Python and Git.

At first I encountered this issue: https://github.com/devilismyfriend/StableTuner/issues/107

After applying the mention fix, I receive the following error:

ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\Users\Administrator\miniconda3\envs\ST\Lib\site-packages\~.arset_normalizer\md.cp310-win_amd64.pyd'

This happens regardless of whether I run as administrator.

Full context:

Installing Diffusers 8178c84 commit Traceback (most recent call last): File "C:\GitHub\StableTuner\scripts\windows_install.py", line 201, in run(f'"{python}" -m pip install {diffusers_cmd}', f"Installing Diffusers {d_commit} commit", "Couldn't install diffusers") File "C:\GitHub\StableTuner\scripts\windows_install.py", line 32, in run raise RuntimeError(message) RuntimeError: Couldn't install diffusers. Command: "C:\Users\\miniconda3\envs\ST\python.exe" -m pip install git+https://github.com/huggingface/diffusers.git@8178c84#egg=diffusers --force-reinstall Error code: 1 stdout: Collecting diffusers Cloning https://github.com/huggingface/diffusers.git (to revision 8178c84) to c:\users\\appdata\local\temp\pip-install-x2rkzo2h\diffusers_2c28bcb4492a4992a78ace1dc1ecea1a Resolved https://github.com/huggingface/diffusers.git to commit 8178c84 Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'done' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'done' Collecting importlib-metadata Using cached importlib_metadata-6.0.0-py3-none-any.whl (21 kB) Collecting filelock Using cached filelock-3.9.0-py3-none-any.whl (9.7 kB) Collecting huggingface-hub>=0.10.0 Using cached huggingface_hub-0.12.1-py3-none-any.whl (190 kB) Collecting Pillow Using cached Pillow-9.4.0-cp310-cp310-win_amd64.whl (2.5 MB) Collecting requests Using cached requests-2.28.2-py3-none-any.whl (62 kB) Collecting regex!=2019.12.17 Using cached regex-2022.10.31-cp310-cp310-win_amd64.whl (267 kB) Collecting numpy Using cached numpy-1.24.2-cp310-cp310-win_amd64.whl (14.8 MB) Collecting tqdm>=4.42.1 Using cached tqdm-4.64.1-py2.py3-none-any.whl (78 kB) Collecting packaging>=20.9 Using cached packaging-23.0-py3-none-any.whl (42 kB) Collecting pyyaml>=5.1 Using cached PyYAML-6.0-cp310-cp310-win_amd64.whl (151 kB) Collecting typing-extensions>=3.7.4.3 Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB) Collecting zipp>=0.5 Using cached zipp-3.14.0-py3-none-any.whl (6.7 kB) Collecting urllib3<1.27,>=1.21.1 Using cached urllib3-1.26.14-py2.py3-none-any.whl (140 kB) Collecting idna<4,>=2.5 Using cached idna-3.4-py3-none-any.whl (61 kB) Collecting charset-normalizer<4,>=2 Using cached charset_normalizer-3.0.1-cp310-cp310-win_amd64.whl (96 kB) Collecting certifi>=2017.4.17 Using cached certifi-2022.12.7-py3-none-any.whl (155 kB) Collecting colorama Using cached colorama-0.4.6-py2.py3-none-any.whl (25 kB) Building wheels for collected packages: diffusers Building wheel for diffusers (pyproject.toml): started Building wheel for diffusers (pyproject.toml): finished with status 'done' Created wheel for diffusers: filename=diffusers-0.13.0.dev0-py3-none-any.whl size=609369 sha256=0eaa51417914331b22790480e28176deb913315309c2dc63e5326f804e06451a Stored in directory: C:\Users\\AppData\Local\Temp\pip-ephem-wheel-cache-_rkhje6s\wheels\fb\80\1f\0177782da1de60821df1a01a496cc1f08d81c52cb080bb055a Successfully built diffusers Installing collected packages: charset-normalizer, zipp, urllib3, typing-extensions, regex, pyyaml, Pillow, packaging, numpy, idna, filelock, colorama, certifi, tqdm, requests, importlib-metadata, huggingface-hub, diffusers Attempting uninstall: charset-normalizer Found existing installation: charset-normalizer 3.0.1 Uninstalling charset-normalizer-3.0.1: Successfully uninstalled charset-normalizer-3.0.1

stderr: Running command git clone --filter=blob:none --quiet https://github.com/huggingface/diffusers.git 'C:\Users\\AppData\Local\Temp\pip-install-x2rkzo2h\diffusers_2c28bcb4492a4992a78ace1dc1ecea1a' WARNING: Did not find branch or tag '8178c84', assuming revision or ref. Running command git checkout -q 8178c84 ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\Users\\miniconda3\envs\ST\Lib\site-packages\~.arset_normalizer\md.cp310-win_amd64.pyd' Consider using the --user option or check the permissions.

Seantourage commented 1 year ago

Worked once but similar issue:

stderr: Running command git clone --filter=blob:none --quiet https://github.com/huggingface/diffusers.git 'C:\Users\user\AppData\Local\Temp\pip-install-_pu7tcqt\diffusers_4dce1ff7420e4649a0c546e65b7fa336' WARNING: Did not find branch or tag '8178c84', assuming revision or ref. Running command git checkout -q 8178c84 ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\\ProgramData\\miniconda3\\envs\\ST\\Lib\\site-packages\\~-arset_normalizer\\md.cp310-win_amd64.pyd' Consider using the--useroption or check the permissions.

Dhrog commented 1 year ago

I have the same problem (windows). It seems to be caused by a wrong quotation mark. Replacing ' with " can execute the command, as the temp folder now can be found.

Brishen commented 1 year ago

Try removing the --force-reinstall option too

kuroiokami commented 1 year ago

What ended up being the solution?

SailingB0aty commented 11 months ago

Same issue