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:
- Setting up Directories:
First, create two directories where you’d like to install the different versions oftqdm
. 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.
- Installing Different Versions:
To install different versions oftqdm
into these directories, you can usepip
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.
- Using the Required Version in Your Code:
Instead of manipulatingsys.path
, you can directly import the required version oftqdm
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.