SD auto 1111 No module named 'tqdm.auto'

Only way I can think of is to install another version of tqdm into a different directory and change the import statements in temporal net accordingly.

It is definitely a “dirty” method. The best way is to check which module uses the older version of tqdm and open a ticket in the corresponding git repo. But now, for the hacky people out there. Here’s how you can achieve this on Windows:

  1. Setting up Directories:
    First, create two directories where you’d like to install the different versions of tqdm. You can use the Command Prompt for this:
mkdir C:\path\to\Automatic\venv\tqdm_version1
mkdir C:\path\to\Automatic\venv\tqdm_version2

Replace C:\path\to\ with your preferred directory path.

  1. Installing Different Versions:
    To install different versions of tqdm into these directories, you can use pip with the --target option:
pip install tqdm==<Version1> --target=C:\path\to\Automatic\venv\tqdm_version1
pip install tqdm==<Version2> --target=C:\path\to\Automatic\venv\tqdm_version2

Replace <Version1> and <Version2> with the actual version numbers you’d like to install.

  1. Using the Required Version in Your Code:
    Instead of manipulating sys.path, you can directly import the required version of tqdm using its absolute path. Here’s how you can do it:
from C:\path\to\Automatic\venv\tqdm_version1\tqdm import tqdm

Make sure to use double backslashes (\\) in the path since a single backslash is an escape character in Python strings.

That’s it! By directly importing from the absolute path, you can ensure that you’re using the exact version of tqdm that you want, without any ambiguity.


Hope this helps!
If anyone has a more elegant solution or feedback, I’d love to hear it.

1 Like