stdout progress bars don't work in Pycharm
Solution 1
CrazyCoder's comment is the right way to go.
I just formalize his comment as an answer here.
Step1: Go to Run
---> Edit Configurations
Step2: Check the option: Emulate terminal in output console
Voilà
Solution 2
The only way I managed to get progress bars (I'm using tqdm 4.19.5 for a progress bar, PyCharm Community 2017.3.2 and Anaconda/Python 3.6.3) to work correctly was to uncheck the "Show command line afterwards" option:
The solution posted by Tay2510 (checking the "Emulate terminal in output console" option) didn't work for me.
One downside of my solution is that you lose console access after your script is done running.
Dims
Software developer & Machine Learning engineer C/C++/Java/C#/Python/Mathematica/MATLAB/Kotlin/R/PHP/JavaScript/SQL/HTML/ LinkedIn: http://www.linkedin.com/in/dimskraft Telegram: https://t.me/dims12 I prefer fishing rod over fish.
Updated on June 06, 2022Comments
-
Dims about 2 years
Many programs display progress bars by prnting to stdout and then returning to beginnign of line and pronting again. This way they achieve realtime progress bar appearence.
Unfortunately, in many cases this functionality does not work in PyCharm's console.
This is an example on how it shows keras train progress bar:
i.e. each progress bar change goes to separate line.
Is it possible to fix this?