Jupyter lab widgets not exporting to HTML - widget

I have a problem with widgets' visualization and export in Jupyter lab. Basically, some widgets (e.g. the text) show their output in the log rather than in the console (see the image below).
Moreover, when I try to export them in HTML they don't appear at all (see the second image below).
I'm using the following versions:
Python: 3.7.7;
Jupyter Lab: 1.2.6;
Jupyter Notebook: 6.0.3;
Jupyter core: 4.6.3;
Ipywidgets: 7.5.1;
Lab-manager: 1.1.
Thanks in advance for your help.

Do this through VoilĂ 
pip install voila
or
conda install voila -c conda-forge
And then:
voila path/to/your/notebook.ipynb
For more information and example:
And VoilĂ !
Creating an Interactive Dashboard from Jupyter Notebook with Voila

Related

Converting ipynb to html from Colab not work properly

I am using Colab to write a notebook using plotly. Within the notebook everything is fine and I can see the pie, but after converting the notebook into a html I don't see it.
this is the code:
import matplotlib.pyplot as plt
import plotly.express as px
Labels=['No', 'Ex-fumatore', 'Fumatore']
values=[1838, 1293, 574]
fig=px.pie(values = values,names = Labels,hole=.5,title = "Tipologie fumatori In Percentuale")
fig.show()
!jupyter nbconvert --to html /content/pie.ipynb
can somebody help me?
Thanks
There could be various reasons why converting an ipynb file to HTML from Colab is not working properly. Here are some possible solutions you could try:
1. Make sure that you have installed the required libraries in Colab that are needed for conversion. To install nbconvert, run the following command in a new cell:
!pip install nbconvert
2. If the nbconvert library is already installed, try uninstalling and reinstalling it to ensure that you have the latest version. You can uninstall it by running the following command:
!pip uninstall nbconvert
And then reinstall it by running:
!pip install nbconvert
3. Check that your notebook is properly saved and there are no unsaved changes. If there are unsaved changes, try saving the notebook and then converting it again.
4. Check the output of the conversion process for any error messages or warnings. These can help you identify the source of the problem.
5. Try converting the notebook to HTML using a different method. For example, you could download the notebook file to your local machine and then use a local installation of Jupyter Notebook to convert it to HTML.

Voila - Extra padding for cells with no output

I am working on a Jupyter Notebook to build a pdf page using the Voila package (I use Voila to make the render, and then print the page as a PDF) and I have noticed that cells without an output still put padding into the Voila render. I am unsure how to fix this and it is wreaking havoc on my formatting. Please see example below.
Jupyter Code
Voila Output
I am running Voila 0.3.6 and Jupyter 1.0.0 and pandas 1.5.1.
I found a similar question posted to the Voila issues board in 2019, but it should be resolved so I am unsure how to proceed.
EDIT: I used pip install [insert software here] --upgrade --user to install updates and now have Voila 0.4.0 and notebook 6.5.2.
EDIT: This issue appears to be an updating problem and I have posted it on the Jupyter Community Forum as well.

How to install HTML package for python3.7

I want to install HTML package for python3.7 but It's is giving error while installing
I tried command pip install html but getting errors in console
ModuleNotFoundError: No module named 'html.parser'; 'html' is not a package
Command "python setup.py egg_info" failed with error code 1 in C:\Users\username\AppData\Local\Temp\pip-install-apo0cgnw\html\
I am getting the same error: archlinux running a virtualenv. I'm looking around it appears to be a problem with a file in there called 'six.py'. Not sure what the problem is but it appears the project has been orphaned because it was consistently updated until 2011. (Also not sure what all of this code is doing in there, similar libraries like 'vapory' are much smaller. - less bloat, less stuff to go wrong) I would suggest either trying it on Python2.x (since it appears that's where it was developed), contacting the developer, or using a different package.
1) download the .tar.gz file OR .zip file according to your OS from this
link .
2) After downloading , install that downloaded package by the following code : pip install ./downloads/SomeProject-1.0.4.tar.gz
And then again follow the below step
You can import the html package as shown below. pip install is not required, as html comes with the Standard library, post Python v3.x,
>>> from html import HTML
>>> h = HTML()
>>> h.p('Hello, world!')
>>> print h # or print(h) in python 3+
<p>Hello, world!</p>
See the html 1.16 project description for more detail .

Using Tcl with Jupyter notebook

I downloaded Anaconda, and have been using Jupyter notebook. Now I would like to use it with Tcl. I followed the instructions at https://github.com/rpep/tcl_kernel, (which is to pip3 install tcl_kernel).
It has installed in AppData\Local\Programs\Python\Python36-32.
However, Tcl does not appear as an option for a new notebook.
Can anyone advise?
Thankyou.
Installing Tcl on Jupyter Notebook: intel offers a package to be used on Jupyter Notebook, where you can develop your projects and view the result of the codes.
To perform the installation (linux), type the following command in the terminal:
conda install -c intel tcl
pip3 install tcl_kernel
python3 -m tcl_kernel.install
conda update conda
Link of the pages so that you can search for the equivalent packages on Win / Mac:
https://anaconda.org/intel/tcl
https://github.com/rpep/tcl_kernel
Ready! When accessing Jupyter Notebook, select the Tcl option in the 'New' section.
There are versions for various Operating Systems. I chose Linux because it is the only one on computers here at home.
I don't see that kernel listed under 'new' -- but if I open another notebook and try the 'kernel' menu, there is a 'change kernel' item that does the job.

How to get caffe notebook example

I see many blogs relate caffe something about notebook example? I only find "example " dir in the caffe source code on github, how to get the "notebook example" dir?
By notebook they mean to say ipython notebook. Details of ipython notebook can be found here.
The file format of ipython notebook is .ipynb. The files with this extension can be found in the examples folder.
If the ipython notebook is successfully installed, you can try running the 01-learning-lenet.ipynb example by typing : ipython notebook ./examples/01-learning-lenet.ipynb from the caffe folder.