'alive_progress bar not working on PyCharm

I am trying to use the alive_progress alive_bar on PyCharm but it only appears in the console once the whole process has finished. Instead, I want it to display and progress as the for loop operates.

Toy example:

from alive_progress import alive_bar
import time

bar_l = 100
with alive_bar(bar_l) as bar:
    for i in range(bar_l):
        time.sleep(0.001)
        bar()

Has anyone else encountered this problem?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source