Jupyter Notebook is very powerful and convenient, but the latest version will happen the error messages when we want to output the pdf file. So I tried some ways to solve this problem, although the results were not really perfect. (When you output the pdf file, the frame will be too small and some codes will be cut by the frame.) Anyway, you just need to use the function of second part in the nbextensions that you can avoid this problem. I will talk about this function later.
- Install the MacTex. File name:
mactex-20180417.pkgThis is quite big (3GB). After installed, it require 5GB stroage. From here: http://tug.org/mactex/mactex-download.html
- Also install the pandoc. File name:
BTW I saw this method, but I didnt try it yet. From here:https://www.youtube.com/watch?v=bNB3-NcSzIY
It can extend the Jupyter useful widgets.
conda install -c conda-forge jupyter_contrib_nbextensions
- [Chinese] https://zhuanlan.zhihu.com/p/52890101
- Good and useful article in Chinese https://liyang85.com/use-jupyter-notebook-on-macos#MacTeX
- [English] https://towardsdatascience.com/jupyter-notebook-extensions-517fa69d2231
- Introduce Vedic:https://www.youtube.com/watch?v=h9DEfxZSz2M
I recommend this function,
Autopep8), that it can make your code more beautiful automatically. Moreover, it can also help you to solve the problem which the words (i.e. the code) exceed the frame.
Meet the problem of
[autopep8] Error loading library for python: ModuleNotFoundErrorNo module named ‘autopep8’ Check that the appropriate library/module is correctly installed (read autopep8’s documentation for details)
pip install autopep8 --user
If you want to open the interface, you can use the two ways below.
- you can click Edit > nbextensions config
Here is what I install the widgets.