stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

Couldn't install open_clip

Open octavei opened this issue 1 year ago • 9 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

PS D:\stable-diffusion-webui> ./webui-user.bat
venv "D:\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 22bcc7be428c94e9408f589966c2040187245d81
Installing open_clip
Traceback (most recent call last):
  File "D:\stable-diffusion-webui\launch.py", line 355, in <module>
    prepare_environment()
  File "D:\stable-diffusion-webui\launch.py", line 269, in prepare_environment
    run_pip(f"install {openclip_package}", "open_clip")
  File "D:\stable-diffusion-webui\launch.py", line 129, 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 "D:\stable-diffusion-webui\launch.py", line 97, in run
    raise RuntimeError(message)
RuntimeError: Couldn't install open_clip.
Command: "D:\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b --prefer-binary
Error code: 1
stdout: Collecting git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b
  Cloning https://github.com/mlfoundations/open_clip.git (to revision bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b) to c:\users\86183\appdata\local\temp\pip-req-build-p3ejn932

stderr:   Running command git clone --filter=blob:none --quiet https://github.com/mlfoundations/open_clip.git 'C:\Users\86183\AppData\Local\Temp\pip-req-build-p3ejn932'
  fatal: unable to access 'https://github.com/mlfoundations/open_clip.git/': Failed to connect to github.com port 443 after 21033 ms: Couldn't connect to server
  fatal: could not fetch c7314f628364953cf84836c57d192ba6108bf224 from promisor remote
  warning: Clone succeeded, but checkout failed.
  You can inspect what was checked out with 'git status'
  and retry with 'git restore --source=HEAD :/'

  error: subprocess-exited-with-error

  git clone --filter=blob:none --quiet https://github.com/mlfoundations/open_clip.git 'C:\Users\86183\AppData\Local\Temp\pip-req-build-p3ejn932' did not run successfully.
  exit code: 128

  See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

git clone --filter=blob:none --quiet https://github.com/mlfoundations/open_clip.git 'C:\Users\86183\AppData\Local\Temp\pip-req-build-p3ejn932' did not run successfully.
exit code: 128

See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

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

Steps to reproduce the problem

windows 11 python3.10.6

 ./webui-user.bat

What should have happened?

no err

Commit where the problem happens

22bcc7be428c94e9408f589966c2040187245d81

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

./webui-user.bat


### List of extensions

No

### Console logs

```Shell
venv "D:\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Commit hash: 22bcc7be428c94e9408f589966c2040187245d81
Installing open_clip
Traceback (most recent call last):
  File "D:\stable-diffusion-webui\launch.py", line 355, in <module>
    prepare_environment()
  File "D:\stable-diffusion-webui\launch.py", line 269, in prepare_environment
    run_pip(f"install {openclip_package}", "open_clip")
  File "D:\stable-diffusion-webui\launch.py", line 129, 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 "D:\stable-diffusion-webui\launch.py", line 97, in run
    raise RuntimeError(message)
RuntimeError: Couldn't install open_clip.
Command: "D:\stable-diffusion-webui\venv\Scripts\python.exe" -m pip install git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b --prefer-binary
Error code: 1
stdout: Collecting git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b
  Cloning https://github.com/mlfoundations/open_clip.git (to revision bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b) to c:\users\86183\appdata\local\temp\pip-req-build-p3ejn932

stderr:   Running command git clone --filter=blob:none --quiet https://github.com/mlfoundations/open_clip.git 'C:\Users\86183\AppData\Local\Temp\pip-req-build-p3ejn932'
  fatal: unable to access 'https://github.com/mlfoundations/open_clip.git/': Failed to connect to github.com port 443 after 21033 ms: Couldn't connect to server
  fatal: could not fetch c7314f628364953cf84836c57d192ba6108bf224 from promisor remote
  warning: Clone succeeded, but checkout failed.
  You can inspect what was checked out with 'git status'
  and retry with 'git restore --source=HEAD :/'

  error: subprocess-exited-with-error

  git clone --filter=blob:none --quiet https://github.com/mlfoundations/open_clip.git 'C:\Users\86183\AppData\Local\Temp\pip-req-build-p3ejn932' did not run successfully.
  exit code: 128

  See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

git clone --filter=blob:none --quiet https://github.com/mlfoundations/open_clip.git 'C:\Users\86183\AppData\Local\Temp\pip-req-build-p3ejn932' did not run successfully.
exit code: 128

See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

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

Additional information

No response

octavei avatar Apr 04 '23 02:04 octavei

same error~!

vevi1982 avatar Apr 04 '23 09:04 vevi1982

I dont know if this works but I solved this by changing a VPN and running the 'git clone' command directly in powershell as administrator.

jyr99 avatar Apr 06 '23 07:04 jyr99

I dont know if this works but I solved this by changing a VPN and running the 'git clone' command directly in powershell as administrator.

how to do that? i use astril vpn and i tried a lot of countries

carlospum avatar Apr 06 '23 12:04 carlospum

已收到,谢谢!

jyr99 avatar Apr 06 '23 12:04 jyr99

Anyone solved this problem?

octavei avatar Apr 10 '23 02:04 octavei

i fixed it by changing vpn address and giving full asscess to temp folder in windows folder

cikeaini avatar Apr 15 '23 16:04 cikeaini

Quick Solution to fix the Open_Clip issue.

Navigate to the site-packages folder. "[PATH]\stable-diffusion-webui\venv\lib\site-packages"

Once there just run the command below. python3 -m pip install git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b --prefer-binary

Worked for me, seemed to be a quick way around than messing with a VPN address.

Ciel-01 avatar Apr 19 '23 20:04 Ciel-01

Switch Clash For win to TUN Mode(Install Service Mode at first) may fix it.

ThereAreBearsComing avatar May 15 '23 16:05 ThereAreBearsComing

已收到,谢谢!

jyr99 avatar May 15 '23 16:05 jyr99

Refer to Ciel-01's solution, i fix it with gitee mirror project for whose do not have vpn. python3 -m pip install git+https://gitee.com/kaka8899/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b --prefer-binary

AjaxJackjia avatar May 19 '23 15:05 AjaxJackjia

Failed to connect to github.com port 443 after 21033 ms: Couldn't connect to server

This is related to your network or proxy settings; we can't help much with that.

akx avatar May 28 '23 19:05 akx

I tried this in two different directories, and it worked for both at the first time.

Quick Solution to fix the Open_Clip issue.

Navigate to the site-packages folder. "[PATH]\stable-diffusion-webui\venv\lib\site-packages"

Once there just run the command below. python3 -m pip install git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b --prefer-binary

Worked for me, seemed to be a quick way around than messing with a VPN address.

However, at the second time, it didn't work.

I guess it was because GitHub forbids users who use VPN to access its website to clone a repository twice into the indentical folder.

tonyy01 avatar Jun 18 '23 02:06 tonyy01

已收到,谢谢!

jyr99 avatar Jun 18 '23 02:06 jyr99

I keep hearing "change temp folder access" WHICH TEMP FOLDER? How? What? WHY?

DKaikster avatar Oct 23 '23 15:10 DKaikster

已收到,谢谢!

jyr99 avatar Oct 23 '23 15:10 jyr99

Refer to Ciel-01's solution, i fix it with gitee mirror project for whose do not have vpn. python3 -m pip install git+https://gitee.com/kaka8899/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b --prefer-binary

thank you very much! But maybe you should navigate to the site-packages folder firstly. "[PATH]\stable-diffusion-webui\venv\lib\python3.10\site-packages"

"/home/aliy/software/04_sdwebui_linux/stable-diffusion-webui/venv/bin/python3" -m pip install git+https://gitee.com/kaka8899/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b --prefer-binary

AliyMl avatar Dec 24 '23 07:12 AliyMl

已收到,谢谢!

jyr99 avatar Dec 24 '23 07:12 jyr99