brkirch / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
195 stars 10 forks source link

[Bug]: ERROR: python3-venv is not installed, aborting... #2

Closed hoonlight closed 1 year ago

hoonlight commented 1 year ago

Is there an existing issue for this?

What happened?

I ran webui.sh on M1pro, macos 13.3 And I get the following error message:

ERROR: python3-venv is not installed, aborting...

automatic1111's webui worked normally with this webui-user.sh file(https://github.com/AUTOMATIC1111/stable-diffusion-webui/files/10554540/webui-user.sh.zip)https://github.com/AUTOMATIC1111/stable-diffusion-webui/discussions/7453#discussion-4812369). What could be the problem?

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

What should have happened?

webui should run normally.

Commit where the problem happens

4b15929

What platforms do you use to access the UI ?

No response

What browsers do you use to access the UI ?

No response

Command Line Arguments

No

List of extensions

No

Console logs

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on hoon user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
ERROR: python3-venv is not installed, aborting...
################################################################

Additional information

No response

hoonlight commented 1 year ago
python3 --version
Python 3.10.10

I completely deleted and reinstalled python, but it made no difference.

python_cmd="python/3.10.10/bin/python3.10"

If I delete this part, the venv directory is created, but soon the following error is displayed.

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on hoon user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Python 3.10.10 (main, Feb 16 2023, 02:49:39) [Clang 14.0.0 (clang-1400.0.29.202)]
Commit hash: 4b1592926dd9863086480f9317d5c7fe88526e1a
Installing torch and torchvision
Collecting torch==2.0.0
  Using cached torch-2.0.0-cp310-none-macosx_11_0_arm64.whl (55.8 MB)
Collecting torchvision==0.15.1
  Using cached torchvision-0.15.1-cp310-cp310-macosx_11_0_arm64.whl (1.4 MB)
Collecting filelock
  Using cached filelock-3.10.7-py3-none-any.whl (10 kB)
Collecting sympy
  Using cached sympy-1.11.1-py3-none-any.whl (6.5 MB)
Collecting networkx
  Using cached networkx-3.0-py3-none-any.whl (2.0 MB)
Collecting jinja2
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting typing-extensions
  Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Collecting numpy
  Using cached numpy-1.24.2-cp310-cp310-macosx_11_0_arm64.whl (13.9 MB)
Collecting requests
  Using cached requests-2.28.2-py3-none-any.whl (62 kB)
Collecting pillow!=8.3.*,>=5.3.0
  Using cached Pillow-9.4.0-cp310-cp310-macosx_11_0_arm64.whl (3.0 MB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.1.2-cp310-cp310-macosx_10_9_universal2.whl (17 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.1.0-cp310-cp310-macosx_11_0_arm64.whl (123 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.15-py2.py3-none-any.whl (140 kB)
Collecting mpmath>=0.19
  Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)
Installing collected packages: mpmath, urllib3, typing-extensions, sympy, pillow, numpy, networkx, MarkupSafe, idna, filelock, charset-normalizer, certifi, requests, jinja2, torch, torchvision
Successfully installed MarkupSafe-2.1.2 certifi-2022.12.7 charset-normalizer-3.1.0 filelock-3.10.7 idna-3.4 jinja2-3.1.2 mpmath-1.3.0 networkx-3.0 numpy-1.24.2 pillow-9.4.0 requests-2.28.2 sympy-1.11.1 torch-2.0.0 torchvision-0.15.1 typing-extensions-4.5.0 urllib3-1.26.15

[notice] A new release of pip is available: 23.0 -> 23.0.1
[notice] To update, run: pip install --upgrade pip
Launching Web UI with arguments: --api --cloudflared --allow-code --upcast-sampling --opt-sub-quad-attention --use-cpu interrogate
Traceback (most recent call last):
  File "/Users/hoon/Documents/stable-diffusion-webui/launch.py", line 381, in <module>
    start()
  File "/Users/hoon/Documents/stable-diffusion-webui/launch.py", line 372, in start
    import webui
  File "/Users/hoon/Documents/stable-diffusion-webui/webui.py", line 7, in <module>
    from fastapi import FastAPI
ModuleNotFoundError: No module named 'fastapi'
hoon@MacBook stable-diffusion-webui % 
brkirch commented 1 year ago

Are you trying to use the repository directly? This repository is intended to be loaded by the installer from here rather than directly.

The installer creates the venv and adds a standalone copy of python (originally created by portable-python) and a standalone copy of git (taken from homebrew and manually configured with install_name_tool to use relative paths). Also it adds a modified default configuration and some models required to get Stable Diffusion working.

In other words, you don't need to worry about the venv, the python install, installing command line tools for git or anything else. Run the installer, drop your Stable Diffusion models in models/Stable-diffusion, open Launch Web UI from the created folder after the installer quits and it should work.

hoonlight commented 1 year ago

thank you. I was stupid It works very well now. I'll test it out and leave feedback.