camenduru / stable-diffusion-webui-colab

stable diffusion webui colab
The Unlicense
15.46k stars 2.61k forks source link

[ERROR]: when start 'Failed to build pycairo' #407

Closed muuua1004 closed 1 year ago

muuua1004 commented 1 year ago

What happened?

before yesterday it seems not have error like this, though it still started webui successfully, but its still an ERROR, so posted here if it can be solved.

Building wheel for pycairo (pyproject.toml): finished with status 'error' Successfully built svglib Failed to build pycairo stderr: error: subprocess-exited-with-error × Building wheel for pycairo (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pycairo ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects Warning: Failed to install svglib, some preprocessors may not work. Installing sd-webui-controlnet requirement: fvcore

Colab cell output

Python 3.10.11 (main, Apr  5 2023, 14:15:10) [GCC 9.4.0]
Commit hash: a9fed7c364061ae6efb37f797b6b522cb3cf7aa2
Installing gfpgan
Installing clip
Installing open_clip
Installing requirements for CodeFormer
Installing requirements for Web UI
Installing Deforum requirement: av
Installing Deforum requirement: pims

Installing pycloudflared

Installing rembg
Installing onnxruntime for REMBG extension
Installing pymatting for REMBG extension

Installing requirements for CivitAI Browser

Installing sd-webui-controlnet requirement: mediapipe
Installing sd-webui-controlnet requirement: svglib
Couldn't install sd-webui-controlnet requirement: svglib.
Command: "/usr/bin/python3" -m pip install svglib --prefer-binary
Error code: 1
stdout: Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Collecting svglib
  Downloading svglib-1.5.1.tar.gz (913 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 913.9/913.9 kB 44.8 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting reportlab
  Downloading reportlab-4.0.0-py3-none-any.whl (1.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.9/1.9 MB 8.5 MB/s eta 0:00:00
Requirement already satisfied: lxml in /usr/local/lib/python3.10/dist-packages (from svglib) (4.9.2)
Requirement already satisfied: tinycss2>=0.6.0 in /usr/local/lib/python3.10/dist-packages (from svglib) (1.2.1)
Collecting cssselect2>=0.2.0
  Downloading cssselect2-0.7.0-py3-none-any.whl (15 kB)
Requirement already satisfied: webencodings in /usr/local/lib/python3.10/dist-packages (from cssselect2>=0.2.0->svglib) (0.5.1)
Collecting freetype-py<2.4,>=2.3.0
  Downloading freetype_py-2.3.0-py3-none-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (978 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 978.9/978.9 kB 66.0 MB/s eta 0:00:00
Collecting rlPyCairo<1,>=0.2.0
  Downloading rlPyCairo-0.2.0-py3-none-any.whl (10 kB)
Requirement already satisfied: pillow>=9.0.0 in /usr/local/lib/python3.10/dist-packages (from reportlab->svglib) (9.4.0)
Collecting pycairo>=1.20.0
  Downloading pycairo-1.23.0.tar.gz (344 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 344.6/344.6 kB 43.7 MB/s eta 0:00:00
  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'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: svglib, pycairo
  Building wheel for svglib (setup.py): started
  Building wheel for svglib (setup.py): finished with status 'done'
  Created wheel for svglib: filename=svglib-1.5.1-py3-none-any.whl size=30919 sha256=93a4d15ce4eeba2526555e2078d32aacbf843cdf9cf1eafafc896978389090f9
  Stored in directory: /root/.cache/pip/wheels/56/9f/90/f37f4b9dbf82987a24ae14f15586e96715cb669a4710b3b85d
  Building wheel for pycairo (pyproject.toml): started
  Building wheel for pycairo (pyproject.toml): finished with status 'error'
Successfully built svglib
Failed to build pycairo

stderr:   error: subprocess-exited-with-error

  × Building wheel for pycairo (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pycairo
ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects

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

Launching Web UI with arguments: --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --clip-models-path /content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/models/CLIP --ckpt-dir /content/fused-models --lora-dir /content/fused-lora --multiple
2023-05-05 07:34:30.643936: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT

Which colab and model(s) were you using when the error occurred?

https://colab.research.google.com/github/camenduru/stable-diffusion-webui-colab/blob/drive/run.ipynb

Which Public WebUI Colab URL were you using when the error occurred?

gradio.live

If you used HiRes mode when the error occurred, please provide the Hires info

No response

zmcmcc commented 1 year ago

Same error here.

camenduru commented 1 year ago

@muuua1004 @zmcmcc @Rush-gif thanks for the info ❤ please try again

Rush-gif commented 1 year ago

@camenduru what should I try again bro

925-Studio commented 1 year ago

@muuua1004 @zmcmcc @Rush-gif thanks for the info ❤ please try again

I've tried again and again, even started from fresh, still got the same error.

camenduru commented 1 year ago

Hi @925-Studio 👋 is this line in your code !apt -y install -qq aria2 libcairo2-dev pkg-config python3-dev

timreibe commented 1 year ago

I had the same error in a GitHub Action and solved it by adding a Python Setup step:

...
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v4
        with:
          python-version: '3.9'
...

Maybe this helps someone!

925-Studio commented 1 year ago

Hi @925-Studio 👋 is this line in your code !apt -y install -qq aria2 libcairo2-dev pkg-config python3-dev

Thanks for quick reply but those commands doesn't exit in my code. BTW, I'm running A1111 on my local machine.

zmcmcc commented 1 year ago

Hi @925-Studio 👋 is this line in your code !apt -y install -qq aria2 libcairo2-dev pkg-config python3-dev

Thanks for quick reply but those commands doesn't exit in my code. BTW, I'm running A1111 on my local machine.

I don't quite know the difference between A111 and this colab version but @camenduru basically just modified one line in his colab code(about line 15 or so),from maybe: !apt -y install -qq aria2 , to: !apt -y install -qq aria2 libcairo2-dev pkg-config python3-dev, and for me the problem is solved.

etherealxx commented 1 year ago

those commands doesn't exit in my code. BTW, I'm running A1111 on my local machine.

I don't quite know the difference between A111 and this colab version

camenduru uses his own fork of a1111's webui for stability, which is the March 14 and March 29 commit of a1111's.

muuua1004 commented 1 year ago

you need to run the “one time install and update” once first。

在 2023. 5. 9.,18:53,925 Studio @.***> 写道:

 @muuua1004 @zmcmcc @Rush-gif thanks for the info ❤ please try again

I've tried again and again, even started from fresh, still got the same error.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.