sd-webui-controlnet icon indicating copy to clipboard operation
sd-webui-controlnet copied to clipboard

[WinError 5] Access is denied

Open UnstableJail opened this issue 1 year ago • 2 comments

Hello everyone,

I have a small question: I downloaded the model from the Extension tab in A1111 and got this "access denied" error in cmd. Is that a problem and if so how could I fix it ?

Error: Installing collected packages: flatbuffers, pycparser, opencv-contrib-python, CFFI, sounddevice, mediapipe

stderr: ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'C:\Users\paulv\stable-diffusion-webui\venv\Lib\site-packages\cv2\cv2.pyd' Check the permissions.

[notice] A new release of pip is available: 23.0.1 -> 23.1.2 [notice] To update, run: C:\Users\paulv\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip

Warning: Failed to install mediapipe, some preprocessors may not work. Installing sd-webui-controlnet requirement: svglib Installing sd-webui-controlnet requirement: fvcore

UnstableJail avatar May 13 '23 22:05 UnstableJail

Same error here

javi22020 avatar May 14 '23 15:05 javi22020

same here, no idea how to fix it.

stderr: ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'F:\stable-diffusion-webui\venv\Lib\site-packages\cv2\cv2.pyd' Check the permissions.

[notice] A new release of pip available: 22.2.1 -> 23.1.2 [notice] To update, run: F:\stable-diffusion-webui\venv\Scripts\python.exe -m pip install --upgrade pip

Warning: Failed to install mediapipe, some preprocessors may not work.

jorvilla84 avatar May 15 '23 15:05 jorvilla84

The same Installing collected packages: flatbuffers, pycparser, opencv-contrib-python, CFFI, sounddevice, mediapipe

stderr: ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied

vanhapara avatar May 18 '23 12:05 vanhapara

I believe this is a duplicated issue of #1024. Running the commandline as Admin is likely to solve all access denied issue. If issue persists, you can always re-open this issue. Closing the issue for now.

huchenlei avatar May 18 '23 17:05 huchenlei

I believe this is a duplicated issue of #1024. Running the commandline as Admin is likely to solve all access denied issue. If issue persists, you can always re-open this issue. Closing the issue for now.

How do I run webui-user.bat as an administrator? When I try to run as administrator, the bat file opens and immediately closes.

aearone avatar May 23 '23 15:05 aearone

Run command line as admin first then navigate to sd folder and run user batVon meinem iPhone gesendetAm 23.05.2023 um 17:34 schrieb Nikolay L. @.***>:

I believe this is a duplicated issue of #1024. Running the commandline as Admin is likely to solve all access denied issue. If issue persists, you can always re-open this issue. Closing the issue for now.

How do I run webui-user.bat as an administrator? When I try to run as administrator, the bat file opens and immediately closes.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

vanhapara avatar May 23 '23 16:05 vanhapara

Run command line as admin first then navigate to sd folder and run user batVon meinem iPhone gesendetAm 23.05.2023 um 17:34 schrieb Nikolay L. @.>: I believe this is a duplicated issue of #1024. Running the commandline as Admin is likely to solve all access denied issue. If issue persists, you can always re-open this issue. Closing the issue for now. How do I run webui-user.bat as an administrator? When I try to run as administrator, the bat file opens and immediately closes. —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.>

Thank you so much! But unfortunately, running webui and installing controlnet through the command line as an administrator could not solve this problem, I still get the error Warning: Failed to install mediapipe, some preprocessors may not work.

I don't know what to do, nothing works.

Screenshot_15

aearone avatar May 26 '23 20:05 aearone

How do I run webui-user.bat as an administrator? When I try to run as administrator, the bat file opens and immediately closes.

the bat file opens and immediately closes occurs because at default, the cmd going to cd system32 then running the command from there.

try adding cd /d %~dp0 at the first line of webui-user.bat,

and if you want to automate the right click create webui-user.bat shortcut, open shortcut properties > advanced > check Run as administrator

citrusian avatar Jun 03 '23 18:06 citrusian

How do I run webui-user.bat as an administrator? When I try to run as administrator, the bat file opens and immediately closes.

the bat file opens and immediately closes occurs because at default, the cmd going to cd system32 then running the command from there.

try adding cd /d %~dp0 at the first line of webui-user.bat,

and if you want to automate the right click create webui-user.bat shortcut, open shortcut properties > advanced > check Run as administrator

Hi! Thanks for the reply! I almost immediately figured out how to run webui as administrator. I just opened webui through the command line as administrator, manually specifying the path to the file. As I wrote earlier, running webui as administrator and reinstalling controlnet still gave me an error, so I just manually installed mediapipe the same way and the error disappeared, everything works.

aearone avatar Jun 04 '23 03:06 aearone

I always start automatic11111 via the launcher shortcut. If I doubleclick webui-user.bat or run it as admin cmd opens and starts the process but when it is finished automatic1111 doesnt open in my browser... How can I fix it? If that doesn't work I just can not start automatic1111 as an adim. And I need to do that, because I get the same "access denied" error.

ELN23 avatar Jun 27 '23 00:06 ELN23

When it finishes it will show an url that you can paste to your browser. The default url is http://localhost:7860

huchenlei avatar Jun 27 '23 00:06 huchenlei

This error raised due this project attempt install python packages from code. Here is simple workaround for it:

  1. Goto to folder where "venv" folder resides. This folder contains python virtual environment.
  2. Run simple .cmd script or use command line for run commands below

call venv\Scripts\activate.bat pip install mediapipe pip install svglib pip install fvcore pip install "opencv-python>=4.8.0" deactivate

1st line - enter to virtual environment, last line - exit. "pip install" lines - install python packages. You can see actual package list in file "requirements.txt" in root of this project repository.

P.S. Other extensions often has same problem (and same cure) too.

Vadim2S avatar Nov 24 '23 16:11 Vadim2S

I solved this problem without running as admin. I just changed permissions of the problematic folder from READ to FULL CONTROL. It is in the folder's proprties, SECURITY tab.

EnergyMax1 avatar Feb 05 '24 19:02 EnergyMax1

close webui before installing

davoodice avatar Jul 11 '24 15:07 davoodice