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

  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)
    1. 原因:python版本过低,使用3.10
  2. ubuntu安装python3.10:
    sudo add-apt-repository ppa:deadsnakes/ppa
    sudo apt update
    sudo apt install python3.10
    python3.10 --version
    
  3. 重新安装venv:
    1. python3.10 -m venv venv
      1. 报错:Error: Command '['stable-diffusion-webui/venv/bin/python3.10', '-m', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
    2. 从新安装venv:
      1. sudo apt-get install python3.10-venv python3.10-dev
        python3.10 -m ensurepip --default-pip
        rm -rf venv  # 删除现有虚拟环境
        python3 -m venv venv
        
        
        
        

你可能感兴趣的:(stable,diffusion,stable,diffusion,python,开发语言)