toshiaki1729 / dataset-tag-editor-standalone

WebUI to edit dataset captions for txt2img models
MIT License
135 stars 15 forks source link

Launch Error after install - ModuleNotFoundError: No module named 'gradio' #4

Closed Vigilence closed 1 year ago

Vigilence commented 1 year ago

I clone the directory.

git clone https://github.com/toshiaki1729/dataset-tag-editor-standalone/

I launch cmd from dataset-tag-editor-standalone folder.

E:\Automatic1111\Dataset Tag Editor Standalone\dataset-tag-editor-standalone>install.bat
 Volume in drive E is Multimedia
 Volume Serial Number is AFA5-A7D9

 Directory of E:\Automatic1111\Dataset Tag Editor Standalone\dataset-tag-editor-standalone\venv\Scripts

05/01/2023  08:35 PM           266,664 python.exe
               1 File(s)        266,664 bytes
               0 Dir(s)  254,675,197,952 bytes free
'"E:\Automatic1111\Dataset Tag Editor Standalone\dataset-tag-editor-standalone\venv\Scripts\activate.bat"' is not recognized as an internal or external command,
operable program or batch file.
Requirement already satisfied: gradio==3.22.1 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 1)) (3.22.1)
Requirement already satisfied: transformers>=4.27.4 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 2)) (4.28.1)
Requirement already satisfied: requests in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 3)) (2.28.1)
Requirement already satisfied: pillow in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 4)) (9.3.0)
Requirement already satisfied: numpy in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 5)) (1.24.1)
Requirement already satisfied: torch>=1.10.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 6)) (2.0.0+cu118)
Requirement already satisfied: torchvision in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 7)) (0.15.1+cu118)
Requirement already satisfied: aiohttp in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (3.8.4)
Requirement already satisfied: httpx in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (0.23.3)
Requirement already satisfied: pandas in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (1.5.3)
Requirement already satisfied: markupsafe in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (2.1.2)
Requirement already satisfied: pydantic in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (1.10.2)
Requirement already satisfied: huggingface-hub>=0.13.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (0.13.2)
Requirement already satisfied: websockets>=10.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (10.4)
Requirement already satisfied: fsspec in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (2023.3.0)
Requirement already satisfied: aiofiles in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (23.1.0)
Requirement already satisfied: altair>=4.2.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (4.2.2)
Requirement already satisfied: jinja2 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (3.1.2)
Requirement already satisfied: orjson in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (3.8.7)
Requirement already satisfied: mdit-py-plugins<=0.3.3 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (0.3.3)
Requirement already satisfied: pyyaml in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (6.0)
Requirement already satisfied: typing-extensions in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (4.4.0)
Requirement already satisfied: python-multipart in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (0.0.6)
Requirement already satisfied: markdown-it-py[linkify]>=2.0.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (2.2.0)
Requirement already satisfied: fastapi in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (0.90.1)
Requirement already satisfied: matplotlib in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (3.7.1)
Requirement already satisfied: pydub in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (0.25.1)
Requirement already satisfied: uvicorn in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (0.21.1)
Requirement already satisfied: ffmpy in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from gradio==3.22.1->-r requirements.txt (line 1)) (0.3.0)
Requirement already satisfied: tqdm>=4.27 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from transformers>=4.27.4->-r requirements.txt (line 2)) (4.64.1)
Requirement already satisfied: packaging>=20.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from transformers>=4.27.4->-r requirements.txt (line 2)) (23.0)
Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from transformers>=4.27.4->-r requirements.txt (line 2)) (0.13.2)
Requirement already satisfied: filelock in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from transformers>=4.27.4->-r requirements.txt (line 2)) (3.9.0)
Requirement already satisfied: regex!=2019.12.17 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from transformers>=4.27.4->-r requirements.txt (line 2)) (2022.10.31)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from requests->-r requirements.txt (line 3)) (1.26.13)
Requirement already satisfied: charset-normalizer<3,>=2 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from requests->-r requirements.txt (line 3)) (2.1.1)
Requirement already satisfied: idna<4,>=2.5 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from requests->-r requirements.txt (line 3)) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from requests->-r requirements.txt (line 3)) (2022.12.7)
Requirement already satisfied: networkx in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from torch>=1.10.0->-r requirements.txt (line 6)) (3.0)
Requirement already satisfied: sympy in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from torch>=1.10.0->-r requirements.txt (line 6)) (1.11.1)
Requirement already satisfied: jsonschema>=3.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from altair>=4.2.0->gradio==3.22.1->-r requirements.txt (line 1)) (4.17.3)
Requirement already satisfied: toolz in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from altair>=4.2.0->gradio==3.22.1->-r requirements.txt (line 1)) (0.12.0)
Requirement already satisfied: entrypoints in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from altair>=4.2.0->gradio==3.22.1->-r requirements.txt (line 1)) (0.4)
Requirement already satisfied: mdurl~=0.1 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from markdown-it-py[linkify]>=2.0.0->gradio==3.22.1->-r requirements.txt (line 1)) (0.1.2)
Requirement already satisfied: linkify-it-py<3,>=1 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from markdown-it-py[linkify]>=2.0.0->gradio==3.22.1->-r requirements.txt (line 1)) (2.0.0)
Requirement already satisfied: python-dateutil>=2.8.1 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from pandas->gradio==3.22.1->-r requirements.txt (line 1)) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from pandas->gradio==3.22.1->-r requirements.txt (line 1)) (2022.7.1)
Requirement already satisfied: colorama in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from tqdm>=4.27->transformers>=4.27.4->-r requirements.txt (line 2)) (0.4.6)
Requirement already satisfied: aiosignal>=1.1.2 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from aiohttp->gradio==3.22.1->-r requirements.txt (line 1)) (1.3.1)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from aiohttp->gradio==3.22.1->-r requirements.txt (line 1)) (6.0.4)
Requirement already satisfied: attrs>=17.3.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from aiohttp->gradio==3.22.1->-r requirements.txt (line 1)) (22.2.0)
Requirement already satisfied: yarl<2.0,>=1.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from aiohttp->gradio==3.22.1->-r requirements.txt (line 1)) (1.8.2)
Requirement already satisfied: frozenlist>=1.1.1 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from aiohttp->gradio==3.22.1->-r requirements.txt (line 1)) (1.3.3)
Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from aiohttp->gradio==3.22.1->-r requirements.txt (line 1)) (4.0.2)
Requirement already satisfied: starlette<0.24.0,>=0.22.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from fastapi->gradio==3.22.1->-r requirements.txt (line 1)) (0.23.1)
Requirement already satisfied: sniffio in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from httpx->gradio==3.22.1->-r requirements.txt (line 1)) (1.3.0)
Requirement already satisfied: httpcore<0.17.0,>=0.15.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from httpx->gradio==3.22.1->-r requirements.txt (line 1)) (0.15.0)
Requirement already satisfied: rfc3986[idna2008]<2,>=1.3 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from httpx->gradio==3.22.1->-r requirements.txt (line 1)) (1.5.0)
Requirement already satisfied: contourpy>=1.0.1 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from matplotlib->gradio==3.22.1->-r requirements.txt (line 1)) (1.0.7)
Requirement already satisfied: cycler>=0.10 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from matplotlib->gradio==3.22.1->-r requirements.txt (line 1)) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from matplotlib->gradio==3.22.1->-r requirements.txt (line 1)) (4.39.2)
Requirement already satisfied: pyparsing>=2.3.1 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from matplotlib->gradio==3.22.1->-r requirements.txt (line 1)) (3.0.9)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from matplotlib->gradio==3.22.1->-r requirements.txt (line 1)) (1.4.4)
Requirement already satisfied: mpmath>=0.19 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from sympy->torch>=1.10.0->-r requirements.txt (line 6)) (1.2.1)
Requirement already satisfied: h11>=0.8 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from uvicorn->gradio==3.22.1->-r requirements.txt (line 1)) (0.12.0)
Requirement already satisfied: click>=7.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from uvicorn->gradio==3.22.1->-r requirements.txt (line 1)) (8.1.3)
Requirement already satisfied: anyio==3.* in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from httpcore<0.17.0,>=0.15.0->httpx->gradio==3.22.1->-r requirements.txt (line 1)) (3.6.2)
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from jsonschema>=3.0->altair>=4.2.0->gradio==3.22.1->-r requirements.txt (line 1)) (0.19.3)
Requirement already satisfied: uc-micro-py in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from linkify-it-py<3,>=1->markdown-it-py[linkify]>=2.0.0->gradio==3.22.1->-r requirements.txt (line 1)) (1.0.1)
Requirement already satisfied: six>=1.5 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from python-dateutil>=2.8.1->pandas->gradio==3.22.1->-r requirements.txt (line 1)) (1.16.0)

[notice] A new release of pip is available: 23.0.1 -> 23.1.2
[notice] To update, run: python.exe -m pip install --upgrade pip

E:\Automatic1111\Dataset Tag Editor Standalone\dataset-tag-editor-standalone>

I then launch the launch_user.bat

E:\Automatic1111\Dataset Tag Editor Standalone\dataset-tag-editor-standalone>launch_user.bat
 Volume in drive E is Multimedia
 Volume Serial Number is AFA5-A7D9

 Directory of E:\Automatic1111\Dataset Tag Editor Standalone\dataset-tag-editor-standalone\venv\Scripts

05/01/2023  08:35 PM           266,664 python.exe
               1 File(s)        266,664 bytes
               0 Dir(s)  254,675,197,952 bytes free
venv "E:\Automatic1111\Dataset Tag Editor Standalone\dataset-tag-editor-standalone\venv\Scripts\Python.exe"
Traceback (most recent call last):
  File "E:\Automatic1111\Dataset Tag Editor Standalone\dataset-tag-editor-standalone\scripts\launch.py", line 12, in <module>
    import gradio as gr
ModuleNotFoundError: No module named 'gradio'
Press any key to continue . . .

According to the readout, gradio is already installed. So not sure what the issue could be.

Requirement already satisfied: gradio==3.22.1 in c:\users\vigilence\appdata\local\programs\python\python310\lib\site-packages (from -r requirements.txt (line 1)) (3.22.1)

toshiaki1729 commented 1 year ago

maybe relevant issue: #3

Can you fix by re-creating venv without --system-site-packages option? It increases storage size though. You will need PyTorch (and directml-pytorch if needed) installed in the venv.

Vigilence commented 1 year ago

I checked the directory in question:

E:\Automatic1111\Dataset Tag Editor Standalone\dataset-tag-editor-standalone\venv\Scripts\activate.bat

and noticed that many of the referenced files are missing. I deleted the main folder and recloned the github. After this the installation and launch worked perfectly!