book-networks-public
book-networks-public copied to clipboard
[ch_intro] Not compatible with Google Colab
The Chapter 1 code is not compatible with Google Colab as it request access to latex to render some of the network plots.
Thanks to a reader for reporting this issue.
This fixes to this include installing the latex subsystem
!sudo apt-get install texlive-latex-recommended
!sudo apt-get install dvipng texlive-latex-extra texlive-fonts-recommended
!sudo apt-get install cm-super
ensuring cm-super is installed as the font used by matplotlib
another option is to switch of tex from matplotlib rendering
from matplotlib import rc
rc('text', usetex=False)
Idea: We may want to add the ability to specify a colab builder as an output in sphinx-tojupyter such as
````{colab}
```{code-cell}
from matplotlib import rc
rc('text', usetex=False)
```
````
that would include