tqdm (a Python Package) Not Working Correctly in WSL #445

Open
opened 2026-01-30 21:52:36 +00:00 by claunia · 0 comments
Owner

Originally created by @JeremyCCHsu on GitHub (Nov 9, 2018).

Originally assigned to: @zadjii-msft on GitHub.

tqdm is a popular progress bar package in Python, but in my WSL, it behaves incorrectly as the following picture:
img
The length of the whole frame grows and results in mis-alignment.

Expected behavior is like this:
img
The length of the frame has a fixed length; only the progress bar grows visually.

Code to reproduce the results:

pip install tqdm
python
from time import sleep
from tqdm import tqdm

for _ in tqdm(range(10000)):
    sleep(0.1)

Environment

  • OS: Microsoft Windows [Version 10.0.17134.345]
  • WSL:
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic
  • Python 3.7.1
Originally created by @JeremyCCHsu on GitHub (Nov 9, 2018). Originally assigned to: @zadjii-msft on GitHub. `tqdm` is a popular progress bar package in Python, but in my WSL, it behaves incorrectly as the following picture: ![img](https://0z0g0w.dm.files.1drv.com/y4mQZXEdOOxm35-Mvgdx6ZfJxDv7BFs-T8KW0jBsxGarxDzt1qf_spWu4zKAFrqiKM0Et37cdks5qKGhajudfE9x5u9Jm4sDOBJqc1XQklf4ealCr_oAEbNrK4tj6Ovwikvk6LWQlwsJrl9_ZvSYElftAACdFo56MmzTcUAprEASkdjDRcRqSPDYtmw66qnChWGLtfuQJIZL6cxq29UEKu3WA/tqdm-incorrect.png?psid=1) The length of the whole frame grows and results in mis-alignment. Expected behavior is like this: ![img](https://0j0g0w.dm.files.1drv.com/y4mBilq45pmDhdxRiVHhSGk2W--1SnR9-w_IHjFzuUtIuYkWh_uAS-_xkYdnCb3Dt9_yEmzW71G0KrFjpDBGvDeEfQzMBBQ9KJumHjgH9y4ZFEhbMHIXMZ9bpsTznPD0sNkIQRMz1sJdoMU7IauYHw_qU92M96thx0JoZQg1R50LVUuApRXJu5Vx_jSKgxaLc_2vbVIWdKkyOPxhKMMLnJgDA/tqdm-correct.png?psid=1) The length of the frame has a fixed length; only the progress bar _grows_ visually. Code to reproduce the results: ```bash pip install tqdm python ``` ```python from time import sleep from tqdm import tqdm for _ in tqdm(range(10000)): sleep(0.1) ``` # Environment - OS: Microsoft Windows [Version 10.0.17134.345] - WSL: ```bash $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.1 LTS Release: 18.04 Codename: bionic ``` - Python 3.7.1
claunia added the Product-ConhostNeeds-Repro labels 2026-01-30 21:52:36 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#445