print statement of ipywidgets not work in JupyterLab
See original GitHub issuePhenomenon:
print
statement not work in JupyterLab(can not see any output), but work in Jupyter Notebook
Environment:
- Ubuntu 16.04
- Chrome v66
- JupyterLab 0.32.1
- Python 3.6.5
Code:
from IPython.display import display
from ipywidgets import widgets
button = widgets.Button(description="Click Me!")
display(button)
def on_button_clicked(b):
print("Button clicked.")
button.on_click(on_button_clicked)
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
why cannot I print in jupyter lab using ipywidgets class?
If I run this code from Jupyter Notebook, everything works fine, the msg is printed after the btn cell output. If I do...
Read more >Installation — Jupyter Widgets 7.6.5 documentation
Answer: A text representation of the widget is printed if the widget control is not available. It may mean the widget JavaScript is...
Read more >3.3. Mastering widgets in the Jupyter Notebook
The ebook and printed book are available for purchase at Packt Publishing. ... This is useful with long-lasting computations that should not run...
Read more >How to use ipywidgets to make your Jupyter notebook ...
Jupyter widgets can make notebooks be more interactive and make data exploration much easier, especially for end users who are not coders.
Read more >Ipywidgets with matplotlib - Kapernikov
The say_my_name function below prints the text 'my name is {name}'. ... Sometimes, not all arguments need to be linked to the widget....
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
You’ll need to use the output capturing mechanism in ipywidgets:
https://github.com/jupyterlab/jupyterlab/issues/3151#issuecomment-339476572 and https://github.com/jupyterlab/jupyterlab/issues/1254 give some more context on this.