'New color terminal prograss bar in pip
Solution 1:[1]
pip itself is using the rich package! In particular, their progress bar docs show this example:
from rich.progress import track
for n in track(range(n), description="Processing..."):
do_work(n)
Solution 2:[2]
The following simple code uses pip own progress bar controls.
import time
from pip._internal.cli.progress_bars import get_download_progress_renderer
if __name__ == "__main__":
chunks = []
b = get_download_progress_renderer(bar_type="on",size=100)
for i in range(100):
chunks.append(range(i))
for bb in b(chunks):
time.sleep(.1)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Lucas Saldyt |
| Solution 2 | Hezi Shahmoon |


