当前位置:AIGC资讯 > AIGC > 正文

stable diffusion 运行时报错: returned non-zero exit status 1.

运行sh run.sh安装stable diffusion时报错:ImportError: cannot import name 'builder' from 'google.protobuf.internal' (stable-diffusion-webui/venv/lib/python3.8/site-packages/google/protobuf/internal/__init__.py) 原因:python版本过低,使用3.10 ubuntu安装python3.10:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.10
python3.10 --version
重新安装venv: python3.10 -m venv venv 报错:Error: Command '['stable-diffusion-webui/venv/bin/python3.10', '-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1. 从新安装venv:
sudo apt-get install python3.10-venv python3.10-dev
python3.10 -m ensurepip --default-pip
rm -rf venv  # 删除现有虚拟环境
python3 -m venv venv



更新时间 2023-11-27