No output in Google colab terminal commands
See original GitHub issueThanks for this utility.
Something I noticed when trying to test something that used it, is that when terminal-like commands that use alive_progress are run in Google Colab cells (by prefixing with !
), alive_progress does not provide any output at all, even on completion.
Here is a reproducible example: https://colab.research.google.com/drive/1swUZNMAIY_XVGhJbpB9zLxvjH7391CM8?usp=sharing
It just seemed odd, as generally these calls work normally for a whole range of things, including tqdm bars, so I thought I’d raise the Issue. But I guess it’s probably some complex thing about how one or other is implemented, so don’t worry if nothing can be done about it.
Thanks
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to suppress output in Google Colaboratory cell which ...
Simply append to the command an output redirection: Redirect output AND errors, add &> /dev/ ...
Read more >Run a Full TTY Terminal in Google Colab (without Colab Pro)
Run a Full TTY Terminal in Google Colab (without Colab Pro) ... It's already possible to run terminal commands in a Colab notebook...
Read more >01.05-IPython-And-Shell-Commands.ipynb - Google Colab
A full intro to using the shell/terminal/command-line is well beyond the scope of this chapter, but for the uninitiated we will offer a...
Read more >Local runtimes - Google Colab
Colaboratory lets you connect to a local runtime using Jupyter. This allows you to execute code on your local hardware and have access...
Read more >4.5. Using Google Colaboratory Notebooks
Google Colab is a free Jupyter Notebook environment hosted by Google. ... it is telling Colab that the line is a terminal command...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Wow man, you really did your homework! I’ve seen the links, and I see your point, it really is a bug in Python, and perhaps worth considering. I’m glad they’ll fix it in 3.11, but how unfortunate not back-port it!! 😞 Well, I’ll think about including it! 👍
Thanks, @theosanderson.
I’m not aware of how this google colab works, but it does seem like an ipython.
I’d say it does work the way you’ve called it, but colab is not correctly capturing the terminal output… Look what I got: It was curious how the lines were being skipped in a timely fashion as I’d expect, just without any output on the browser, but it surely was running in the back.
Anyway, I really don’t know how to help with this.
tqdm
has a whole different implementation for ipython, using graphical widgets, which can not really be compared. I think it is related to how colab creates new shell processes, and capture their stdout and stderr outputs…For me, the most important is that direct code like this works in real-time:
https://user-images.githubusercontent.com/6652853/165472062-67425e6f-a77b-4b77-a575-85edc530ad96.mov
I’m going to close this one, but feel free to reply if you need anything else! 👍