ML computers jupyter notebooks

From Interaction Station Wiki
Jump to navigation Jump to search

Installation with pip3

  • We will install jupyter notebooks with pip3 (not with anaconda)
pip3 install --upgrade pip
pip3 install jupyter
  • Problem: no permissions
  • Solution: Do not solve it with sudo! Instead change the permissions of all the directories that are needed:
sudo chmod -R a+w /usr/local/bin/jupyter
sudo chmod -R a+w /usr/local/bin/jupyter-kernel
sudo chmod -R a+w /usr/local/bin/jupyter-console
  • And try again:
pip3 install jupyter
  • Problem: Error -> ERROR: jsonschema 3.1.1 has requirement six>=1.11.0, but you'll have six 1.10.0
  • Solution:
pip3 install --upgrade jsonschema==2.5.0
pip3 install jupyter

Usage

  • To run the notebook
jupyter notebook 
  • Already in the notebook.
  • common problem: change pip to pip3 in case pip install libraries for the python 2 installation and you are working with notebook that uses python3


  • First, we need to know that they are 2 modes in the Jypyter Notebook App: command mode and edit mode.
  • Shortcuts in the both modes:
  • Shift + Enter run the current cell, select below
  • Ctrl + Enter run selected cells
  • Alt + Enter run the current cell, insert below
  • Ctrl + S save and checkpoint