iTranslated by AI
[Paperspace] Workaround for 'Cannot uninstall PyYAML' Error During Automatic1111 Setup
Prerequisites
I am using webui2.ipynb from this template collection.
Thanks to the author, setting up the environment on Paperspace has become very easy.
I am grateful every time I start it up.
This method is just a quick fix.
I expect it will be resolved once a new commit is released.
Until the latest commit is out, you can use this method as a temporary workaround.
Displayed Error
As of July 2023, you might see an error like the following:
stderr: ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Conclusion
Add the following:
!sudo -H pip3 install PyYAML --ignore-installed
It should look like this:
#(3) Start WebUI
!apt update
!apt -y install python3.10
!apt -y install libpython3.10-dev
!apt -y install build-essential
!curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10
!sudo -H pip3 install PyYAML --ignore-installed # This part
!python3.10 -m pip install torch==2.0.0+cu118 torchvision==0.15.1+cu118 torchaudio==2.0.1+cu118 torchtext==0.15.1 torchdata==0.6.0 --extra-index-url https://download.pytorch.org/whl/cu118 -U
!python3.10 -m pip install xformers==0.0.18 triton==2.0.0 -U
!python3.10 -m pip install matplotlib -U
!python3.10 -m pip install ipython -U
from IPython import get_ipython
get_ipython().run_line_magic('matplotlib', 'inline')
%cd /notebooks/stable-diffusion-webui
!python3.10 launch.py --xformers --enable-insecure-extension-access --share --gradio-queue
For those who haven't registered on Paperspace yet
If you register for Paperspace through this link, you will receive $10 in credit.
Recommended Books for Image Generation
[2023 Latest] Over 1000 types of prompts included! A collection of spells that can be used in NovelAI or locally: Introducing tips, techniques, and recommended tools (Introductory book for AI artists) Kindle Edition
Collaborating with AI to Become a Master Artist: Understanding Stable Diffusion through Research Papers
Pioneering Technology: How to Use AUTOMATIC1111 / Stable Diffusion Web UI
Discussion