Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix Guide] ImportError: cannot import name 'packaging' from 'pkg_resources' #15903

Closed
w-e-w opened this issue May 28, 2024 · 0 comments
Closed

Comments

@w-e-w
Copy link
Collaborator

w-e-w commented May 28, 2024

Recent update to the setuptools=70.0.0 prevents some new installs of Web UI from launching

Error:

ImportError: cannot import name 'packaging' from 'pkg_resources' (venv\lib\site-packages\pkg_resources\__init__.py)

initial issue post

fix PR has already been proposed

but it might take some time for this fix to be pushed to master branch as AUTOMATIC1111 is currently not active

Simple Fix Guide

if your experiencing this issue you can perform a simple fix

  1. temporarily adding this line of text to stable-diffusion-webui/requirements_versions.txt and save the file
setuptools==69.5.1

the end result should look like this (ignore the comment after #)

  1. launch webui and it should be able to launch normally
  2. after this you should be able to remove the modification (ctrl + z to undo in most text editors) and it should continue to work (until you reinstall)

if the modification was not removed you might have trouble updating webui in the future


other the methods involving manually downgrading setuptools==69.5.1 will also work see

@w-e-w w-e-w pinned this issue May 28, 2024
Repository owner locked and limited conversation to collaborators May 28, 2024
@w-e-w w-e-w converted this issue into discussion #15905 May 28, 2024
@w-e-w w-e-w unpinned this issue Jun 15, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

1 participant