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

Runtime Error when trying to install Requirements

Open Kyuuto312 opened this issue 1 year ago • 2 comments

Been getting this error message today. Not sure why this is, since I've had no issue running this for the past few days.

/storage/stable-diffusion/stable-diffusion-webui
Requirement already satisfied: pip in /usr/local/lib/python3.10/dist-packages (23.0.1)
Collecting pip
  Downloading pip-24.1-py3-none-any.whl (1.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 70.0 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 23.0.1
    Uninstalling pip-23.0.1:
      Successfully uninstalled pip-23.0.1
Successfully installed pip-24.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Requirement already satisfied: wheel in /usr/local/lib/python3.10/dist-packages (0.35.1)
Collecting wheel
  Downloading wheel-0.43.0-py3-none-any.whl.metadata (2.2 kB)
Requirement already satisfied: setuptools in /usr/local/lib/python3.10/dist-packages (67.6.0)
Collecting setuptools
  Downloading setuptools-70.1.0-py3-none-any.whl.metadata (6.0 kB)
Downloading wheel-0.43.0-py3-none-any.whl (65 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 65.8/65.8 kB 12.7 MB/s eta 0:00:00
Downloading setuptools-70.1.0-py3-none-any.whl (882 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 882.6/882.6 kB 82.2 MB/s eta 0:00:00
Installing collected packages: wheel, setuptools
  Attempting uninstall: wheel
    Found existing installation: wheel 0.35.1
    Uninstalling wheel-0.35.1:
      Successfully uninstalled wheel-0.35.1
  Attempting uninstall: setuptools
    Found existing installation: setuptools 67.6.0
    Uninstalling setuptools-67.6.0:
      Successfully uninstalled setuptools-67.6.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
gradient-utils 0.5.0 requires wheel<0.36.0,>=0.35.1, but you have wheel 0.43.0 which is incompatible.
Successfully installed setuptools-70.1.0 wheel-0.43.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
Found existing installation: torch 1.12.1+cu116
Uninstalling torch-1.12.1+cu116:
  Successfully uninstalled torch-1.12.1+cu116
Found existing installation: torchvision 0.13.1+cu116
Uninstalling torchvision-0.13.1+cu116:
  Successfully uninstalled torchvision-0.13.1+cu116
Found existing installation: torchaudio 0.12.1+cu116
Uninstalling torchaudio-0.12.1+cu116:
  Successfully uninstalled torchaudio-0.12.1+cu116
Found existing installation: protobuf 3.19.6
Uninstalling protobuf-3.19.6:
  Successfully uninstalled protobuf-3.19.6
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
Python 3.10.10 (main, Feb  8 2023, 14:50:01) [GCC 9.4.0]
Version: v1.4.1
Commit hash: f865d3e11647dfd6c7b2cdf90dde24680e58acd8
Installing torch and torchvision
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cu118
Collecting torch==2.0.1
  Downloading https://download.pytorch.org/whl/cu118/torch-2.0.1%2Bcu118-cp310-cp310-linux_x86_64.whl (2267.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.3/2.3 GB 1.5 MB/s eta 0:00:00
Collecting torchvision==0.15.2
  Downloading https://download.pytorch.org/whl/cu118/torchvision-0.15.2%2Bcu118-cp310-cp310-linux_x86_64.whl (6.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.1/6.1 MB 100.3 MB/s eta 0:00:00
Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1) (3.9.0)
Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1) (4.5.0)
Collecting sympy (from torch==2.0.1)
  Downloading sympy-1.12.1-py3-none-any.whl.metadata (12 kB)
Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1) (3.0)
Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch==2.0.1) (3.1.2)
Collecting triton==2.0.0 (from torch==2.0.1)
  Downloading https://download.pytorch.org/whl/triton-2.0.0-1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (63.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.3/63.3 MB 45.5 MB/s eta 0:00:00
Requirement already satisfied: numpy in /usr/local/lib/python3.10/dist-packages (from torchvision==0.15.2) (1.23.4)
Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from torchvision==0.15.2) (2.28.2)
Requirement already satisfied: pillow!=8.3.*,>=5.3.0 in /usr/local/lib/python3.10/dist-packages (from torchvision==0.15.2) (9.2.0)
Collecting cmake (from triton==2.0.0->torch==2.0.1)
  Downloading cmake-3.29.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.1 kB)
Collecting lit (from triton==2.0.0->torch==2.0.1)
  Downloading lit-18.1.7-py3-none-any.whl.metadata (2.5 kB)
Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch==2.0.1) (2.1.2)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->torchvision==0.15.2) (3.1.0)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3/dist-packages (from requests->torchvision==0.15.2) (2.8)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->torchvision==0.15.2) (1.26.15)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests->torchvision==0.15.2) (2019.11.28)
Collecting mpmath<1.4.0,>=1.1.0 (from sympy->torch==2.0.1)
  Downloading https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl (536 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 kB 66.7 MB/s eta 0:00:00
Downloading sympy-1.12.1-py3-none-any.whl (5.7 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.7/5.7 MB 102.6 MB/s eta 0:00:00
Downloading cmake-3.29.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (26.7 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 26.7/26.7 MB 76.3 MB/s eta 0:00:00
Downloading lit-18.1.7-py3-none-any.whl (96 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 96.4/96.4 kB 19.4 MB/s eta 0:00:00
Installing collected packages: mpmath, lit, sympy, cmake, triton, torch, torchvision
Successfully installed cmake-3.29.6 lit-18.1.7 mpmath-1.3.0 sympy-1.12.1 torch-2.0.1+cu118 torchvision-0.15.2+cu118 triton-2.0.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable.It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
Installing gfpgan
Installing clip
Installing open_clip
Installing requirements for CodeFormer
Installing requirements
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In [2], line 30
     28 # Import launch.py which will automatically run the install script but not launch the WebUI.
     29 import launch
---> 30 launch.prepare_environment()
     32 # Install things for this notebook
     33 get_ipython().system('pip install requests gdown bs4 markdownify')

File /storage/stable-diffusion/stable-diffusion-webui/modules/launch_utils.py:309, in prepare_environment()
    307 if not os.path.isfile(requirements_file):
    308     requirements_file = os.path.join(script_path, requirements_file)
--> 309 run_pip(f"install -r \"{requirements_file}\"", "requirements")
    311 run_extensions_installers(settings_file=args.ui_settings_file)
    313 if args.update_check:

File /storage/stable-diffusion/stable-diffusion-webui/modules/launch_utils.py:130, in run_pip(command, desc, live)
    127     return
    129 index_url_line = f' --index-url {index_url}' if index_url != '' else ''
--> 130 return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)

File /storage/stable-diffusion/stable-diffusion-webui/modules/launch_utils.py:107, in run(command, desc, errdesc, custom_env, live)
    105     if result.stderr:
    106         error_bits.append(f"stderr: {result.stderr}")
--> 107     raise RuntimeError("\n".join(error_bits))
    109 return (result.stdout or "")

RuntimeError: Couldn't install requirements.
Command: "/usr/local/bin/python3" -m pip install -r "requirements_versions.txt" --prefer-binary
Error code: 1
stdout: Collecting GitPython==3.1.30 (from -r requirements_versions.txt (line 1))
  Downloading GitPython-3.1.30-py3-none-any.whl.metadata (1.3 kB)
Collecting Pillow==9.5.0 (from -r requirements_versions.txt (line 2))
  Downloading Pillow-9.5.0-cp310-cp310-manylinux_2_28_x86_64.whl.metadata (9.5 kB)
Collecting accelerate==0.18.0 (from -r requirements_versions.txt (line 3))
  Downloading accelerate-0.18.0-py3-none-any.whl.metadata (16 kB)
Requirement already satisfied: basicsr==1.4.2 in /usr/local/lib/python3.10/dist-packages (from -r requirements_versions.txt (line 4)) (1.4.2)
Collecting blendmodes==2022 (from -r requirements_versions.txt (line 5))
  Downloading blendmodes-2022-py3-none-any.whl.metadata (12 kB)
Collecting clean-fid==0.1.35 (from -r requirements_versions.txt (line 6))
  Downloading clean_fid-0.1.35-py3-none-any.whl.metadata (36 kB)
Collecting einops==0.4.1 (from -r requirements_versions.txt (line 7))
  Downloading einops-0.4.1-py3-none-any.whl.metadata (10 kB)
Collecting fastapi==0.94.0 (from -r requirements_versions.txt (line 8))
  Downloading fastapi-0.94.0-py3-none-any.whl.metadata (25 kB)
Collecting gfpgan==1.3.8 (from -r requirements_versions.txt (line 9))
  Downloading gfpgan-1.3.8-py3-none-any.whl.metadata (12 kB)
Collecting gradio==3.32.0 (from -r requirements_versions.txt (line 10))
  Downloading gradio-3.32.0-py3-none-any.whl.metadata (14 kB)
Collecting httpcore<=0.15 (from -r requirements_versions.txt (line 11))
  Downloading httpcore-0.15.0-py3-none-any.whl.metadata (15 kB)
Collecting inflection==0.5.1 (from -r requirements_versions.txt (line 12))
  Downloading inflection-0.5.1-py2.py3-none-any.whl.metadata (1.7 kB)
Collecting jsonmerge==1.8.0 (from -r requirements_versions.txt (line 13))
  Downloading jsonmerge-1.8.0.tar.gz (26 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting kornia==0.6.7 (from -r requirements_versions.txt (line 14))
  Downloading kornia-0.6.7-py2.py3-none-any.whl.metadata (12 kB)
Collecting lark==1.1.2 (from -r requirements_versions.txt (line 15))
  Downloading lark-1.1.2-py2.py3-none-any.whl.metadata (1.7 kB)
Collecting numpy==1.23.5 (from -r requirements_versions.txt (line 16))
  Downloading numpy-1.23.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.3 kB)
Collecting omegaconf==2.2.3 (from -r requirements_versions.txt (line 17))
  Downloading omegaconf-2.2.3-py3-none-any.whl.metadata (3.9 kB)
Collecting piexif==1.1.3 (from -r requirements_versions.txt (line 18))
  Downloading piexif-1.1.3-py2.py3-none-any.whl.metadata (3.7 kB)
Collecting psutil~=5.9.5 (from -r requirements_versions.txt (line 19))
  Downloading psutil-5.9.8-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (21 kB)
Collecting pytorch_lightning==1.9.4 (from -r requirements_versions.txt (line 20))
  Downloading pytorch_lightning-1.9.4-py3-none-any.whl.metadata (22 kB)
Collecting realesrgan==0.3.0 (from -r requirements_versions.txt (line 21))
  Downloading realesrgan-0.3.0-py3-none-any.whl.metadata (17 kB)
Collecting resize-right==0.0.2 (from -r requirements_versions.txt (line 22))
  Downloading resize_right-0.0.2-py3-none-any.whl.metadata (551 bytes)
Collecting safetensors==0.3.1 (from -r requirements_versions.txt (line 23))
  Downloading safetensors-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.5 kB)
Collecting scikit-image==0.20.0 (from -r requirements_versions.txt (line 24))
  Downloading scikit_image-0.20.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (16 kB)
Collecting timm==0.6.7 (from -r requirements_versions.txt (line 25))
  Downloading timm-0.6.7-py3-none-any.whl.metadata (33 kB)
Collecting tomesd==0.1.2 (from -r requirements_versions.txt (line 26))
  Downloading tomesd-0.1.2-py3-none-any.whl.metadata (9.1 kB)
Requirement already satisfied: torch in /usr/local/lib/python3.10/dist-packages (from -r requirements_versions.txt (line 27)) (2.0.1+cu118)
Collecting torchdiffeq==0.2.3 (from -r requirements_versions.txt (line 28))
  Downloading torchdiffeq-0.2.3-py3-none-any.whl.metadata (488 bytes)
Collecting torchsde==0.2.5 (from -r requirements_versions.txt (line 29))
  Downloading torchsde-0.2.5-py3-none-any.whl.metadata (748 bytes)

stderr: WARNING: Ignoring version 0.2.5 of torchsde since it has invalid metadata:
Requested torchsde==0.2.5 from https://files.pythonhosted.org/packages/73/8d/efd3e7b31ea854d0bd6886aa3cf44914adce113a6d460850af41ac1dd4dd/torchsde-0.2.5-py3-none-any.whl (from -r requirements_versions.txt (line 29)) has invalid metadata: .* suffix can only be used with `==` or `!=` operators
    numpy (>=1.19.*) ; python_version >= "3.7"
           ~~~~~~~^
Please use pip<24.1 if you need to use this version.
ERROR: Could not find a version that satisfies the requirement torchsde==0.2.5 (from versions: 0.2.5, 0.2.6)
ERROR: No matching distribution found for torchsde==0.2.5

Kyuuto312 avatar Jun 21 '24 13:06 Kyuuto312

I tried downgrading my pip by using

pip install pip==24.0

which seems to be the latest version before the update to pip 24.1 (which seems to be causing these issues since the update was earlier today)

But after trying that I can no longer run the WebUI, it causes the following error

/storage/stable-diffusion/stable-diffusion-webui
Traceback (most recent call last):
  File "/storage/stable-diffusion/stable-diffusion-webui/webui.py", line 28, in <module>
    import pytorch_lightning   # noqa: F401 # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them
  File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/__init__.py", line 35, in <module>
    from pytorch_lightning.callbacks import Callback  # noqa: E402
  File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/__init__.py", line 14, in <module>
    from pytorch_lightning.callbacks.batch_size_finder import BatchSizeFinder
  File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/batch_size_finder.py", line 24, in <module>
    from pytorch_lightning.callbacks.callback import Callback
  File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/callback.py", line 25, in <module>
    from pytorch_lightning.utilities.types import STEP_OUTPUT
  File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/types.py", line 27, in <module>
    from torchmetrics import Metric
  File "/usr/local/lib/python3.10/dist-packages/torchmetrics/__init__.py", line 26, in <module>
    from torchmetrics import functional  # noqa: E402
  File "/usr/local/lib/python3.10/dist-packages/torchmetrics/functional/__init__.py", line 122, in <module>
    from torchmetrics.functional.text._deprecated import _bleu_score as bleu_score
  File "/usr/local/lib/python3.10/dist-packages/torchmetrics/functional/text/__init__.py", line 50, in <module>
    from torchmetrics.functional.text.bert import bert_score
  File "/usr/local/lib/python3.10/dist-packages/torchmetrics/functional/text/bert.py", line 40, in <module>
    from transformers import AutoModel, AutoTokenizer
  File "/usr/local/lib/python3.10/dist-packages/transformers/__init__.py", line 30, in <module>
    from . import dependency_versions_check
  File "/usr/local/lib/python3.10/dist-packages/transformers/dependency_versions_check.py", line 17, in <module>
    from .utils.versions import require_version, require_version_core
  File "/usr/local/lib/python3.10/dist-packages/transformers/utils/__init__.py", line 34, in <module>
    from .generic import (
  File "/usr/local/lib/python3.10/dist-packages/transformers/utils/generic.py", line 33, in <module>
    import tensorflow as tf
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/__init__.py", line 37, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/__init__.py", line 37, in <module>
    from tensorflow.python.eager import context
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/python/eager/context.py", line 29, in <module>
    from tensorflow.core.framework import function_pb2
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/core/framework/function_pb2.py", line 16, in <module>
    from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attr__value__pb2
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/core/framework/attr_value_pb2.py", line 16, in <module>
    from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__pb2
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/core/framework/tensor_pb2.py", line 16, in <module>
    from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resource__handle__pb2
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/core/framework/resource_handle_pb2.py", line 16, in <module>
    from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensor__shape__pb2
  File "/usr/local/lib/python3.10/dist-packages/tensorflow/core/framework/tensor_shape_pb2.py", line 36, in <module>
    _descriptor.FieldDescriptor(
  File "/usr/local/lib/python3.10/dist-packages/google/protobuf/descriptor.py", line 553, in __new__
    _message.Message._CheckCalledFromGeneratedFile()
TypeError: Descriptors cannot be created directly.
If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
If you cannot immediately regenerate your protos, some other possible workarounds are:
 1. Downgrade the protobuf package to 3.20.x or lower.
 2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates

Kyuuto312 avatar Jun 21 '24 13:06 Kyuuto312

Check the upstream project (WebUI) to see if anyone else is having this issue

Cyberes avatar Jun 21 '24 21:06 Cyberes