gcpに画像のテキストを表を作成して、ファイル(csv)を保存するアプリを作成する。

1.gcpにプロジェクトを登録

 2.App Engin 作成
  

xserver にlinux brew をインストール
python3.8.4をインストール
opencv-python を pip でインストール
python3 起動後

> import cv2  
しかし
> mportError: libgthread-2.0.so.0: cannot open shared object file: No such file or directory

以下のインストール
brew install libgtk2.0-dev
brew install glib
brew install atk
brew install pango
brew install gdk-pixbuf
brew install gdk+

再度 python3 起動
> import cv2
しかし
>ImportError: libSM.so.6: cannot open shared object file: No such file or directory

以下のインストール
brew install libSM

再々度 python3 起動
> import cv2
>
無事起動 

raspberrypi4 技適取得済みを購入した。

Raspbian Buster Liteをヘッドレスセットアップ

以下を参考にRaspbian Buster Liteをヘッドレスセットアップ
https://desertbot.io/blog/headless-raspberry-pi-4-ssh-wifi-setup 

必要なモジュールをインストール

pip のインストール
sudo apt install python3-dev
sudo apt intasll python3-pip 

jupyter notebook インストール
sudo pip3 install jupyter
jupyter notebook --generate-config
mkdir ~/notebooks

vi .jupyter/jupyter_notebook_config.py
> c.NotebookApp.ip = '*'
> c.NotebookApp.notebook_dir = '/home/pi/notebooks'
> c.NotebookApp.port = 8888
> c.NotebookApp.open_browser = False

jupyter の自動起動
vi /etc/systemd/system/jupyter.service

>>>>>
[Unit]
Description=Jupyter notebook

[Service]
PIDFile=/run/jupyter.pid
ExecStart=/usr/local/bin/jupyter-notebook --config=/home/pi/.jupyter/jupyter_notebook_config.py
User=pi
Group=pi
WorkingDirectory=/home/pi/notebooks
Type=simple
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target
>>>>>

jupyter notebook password
Enter password: ****
Verify password: ****

sudo systemctl enable jyupyter

tensorflow インストール
sudo apt install libatlas-base-dev
pip3 install tensorflow

karas インストール
pip3 install keras

opencv インストール
sudo apt install libhd5-dev libhd5-serial-dev libhdf5-103
sudo apt install libqtgui4 libqtwebkit4 libqt4-test python3-pyqt5
sudo apt install libatlas-base-dev
sudo apt install libjasper-dev

sudo pip3 --default-timeout=1000 install opencv-python

matplotlib インストール
pip3 install matplotlib

pandas インストール
pip3 install pandas

PIL インストール
pip3 install pillow

scikit-learn インストール
pip3 install scilkit-learn

mecab インストール
sudo apt install mecab
sudo apt install mecab-ipadic
pip3 install mecab-python3

git インストール
sudo apt install git 

git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git
cd mecab-ipadic-neologd
./bin/install-mecab-ipadic-neologd -n -p /var/lib/mecab/dic/mecab-ipadic-neologd

py-videocore6 インストール
pip3 install --user cython
pip3 install --user git+http://github.com/Idein/py-videocore6.git

git clone https://github.com/Idein/py-videocore6.git
cd py-videocore6/
python3 setup.py build_ext --inplace
pip3 install --user nose
nosetests -V -s
 

↑このページのトップヘ