Post

Jupyterbook


Jupyter


Overall

Screenshot 2024-06-10 at 15.08.17

Jupyter Notebook

Record + Reuse

Screenshot 2024-06-10 at 14.53.06

Screenshot 2024-06-10 at 14.54.10

Jupyter Lab

Screenshot 2024-06-10 at 15.08.42

Screenshot 2024-06-10 at 14.54.31

Screenshot 2024-06-10 at 15.09.25

JupyterLite

jupyter.org/try-jupyter/lab

Screenshot 2024-06-10 at 17.07.32

Screenshot 2024-06-10 at 17.08.07

Screenshot 2024-06-10 at 17.08.52

GoogleColab

Screenshot 2024-06-10 at 17.10.04

Screenshot 2024-06-10 at 17.10.29


Install


install Jupyter in Win

run with admin access.

  1. got python install.
    1. python automatically comes with package PIP: allows easy installation of libraries.
1
$ python --version
  1. download Anaconda
  • In order to download and manage libraries, we’ll need to download a package manager.

    • a set of software tools that automate complex installation processes, include downloading, upgrading, configuring, and removing software.
    • most robust and common package manager for Windows is Anaconda, which we’ll be using in this guide.
  • Anaconda

    • free and open source package, an environment management system that makes installing software on Windows pain-free.
    • a Python data science distribution. And it comes loaded with lots of useful libraries for data mining, machine learning, and statistics programming work.
  1. create virtual environments.
  • Virtual environments

    • allow developers to have separate space for programming projects, ensuring that the dependencies of one project don’t inadvertently affect another projects.
    • can prevent a lot of compilation issues.
    • create a program environment for each programming project, as you can create as many as them as you like.
1
2
3
4
5
6
# use Anaconda's built in virtual environment capabilities using the command line.
# create a home directory for the files
dir PY3 # new folder
cd PY3
# create a virtual environment
conda create -n py3env python=3.7.2 anaconda
  1. download Git bash.

    • Git bash

    • works on top of the command prompt to make it easier to download libraries and easier to work with your command line as a whole.

  2. install the package

1
2
3
4
5
6
7
8
9
10
11
# activate the Virtual environment.
$ cd PY3
$ source activate py3env
(py3env) # now in Python 3 Virtual environment.

# install the package
pip install pillow
pip install pytesseract
pip install numpy
pip install matplotlib
pip install opencv-python

install on Mac

to run the files on local computer.

  1. download Homebrew (package management)
1
2
3
4
5
6
# Paste that in a macOS Terminal or Linux shell prompt:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

# check install:
$ brew doctor
# you system is ready to brew.
  1. download python3
    1. homebrew will install pip setup tools and wheel (all libraries and package for python)
    2. pip: assisrs Homebrew and python package management.
1
2
3
4
5
6
7
8
$ brew install python3
Warning: python 3.7.7 is already installed and up-to-date

$ brew update
Already up-to-date.

$ brew upgrade python3
Warning: python3 3.7.7 already installed
  1. create virtual environment
    • creates a new directory inside of Py3 home folder
      • houses a few files that allow our Virtual Environment to run correctly,
      • isolating the project files so that they don’t mix with this system files on our computer.
      • The most important of these is the live subdirectory, which starts out empty but will at the end of this lesson hold the data for all the libraries we install in this environment.
1
2
3
4
5
6
7
8
9
10
11
12
13
$ cd ./Documents/code
$ mkdir python3

# create virtual environment named py3env
$ python3.7 -m venv py3env

# activate it
$ source py3env/bin/activate
(py3env) J:python3 luo$  #success

# after got jupyter installed
(py3env) J:python3 luo$ Jupyter notebook
# good to go
  1. install the package
1
2
3
4
5
6
$ pip install pillow
$ brew install tesseract
$ pip install pytesseract
$ pip install numpy
$ pip install matplotlib
$ pip install opencv-python
  1. install the Jupyter Notebook
  • JupyterLab

    • conda: conda install -c conda-forge jupyterlab
    • pip: pip install jupyterlab
  • classic Jupyter Notebook

    • conda: conda install -c conda-forge notebook
    • pip: pip install notebook
  • Voilà

    • conda: conda install -c conda-forge voila
    • pip: pip install voila
  1. run

jupyter notebook


Kernel

Screenshot 2024-06-10 at 15.03.45

Screenshot 2024-06-10 at 15.06.58

.

This post is licensed under CC BY 4.0 by the author.

Comments powered by Disqus.