0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

M5StickVの環境作成

0
Last updated at Posted at 2020-11-23

Win10のWSLの環境で作成します

「ファームウエアビルド環境」と「学習データファイルの作成環境」の2つの環境を作成します
(同じ、WSLの環境では動作しなかったので、別のWSL環境を作成します)

WSLは通常同じディストリビューションは1つの環境しか作れませんが、2つ作成してそれぞれ別に環境作成します

WSLのインストール

Cドライブにインストールしたくないので、Microsoft Storeを使わず、下記のページを参考にUbuntu 18.04をダウンロード

Windows Subsystem for Linux (WSL) を好きな場所でインストールする

2つのWSL環境を作成

下記ページを参考にしました

【WSL 2】1つのディストロから複数のインスタンスを作成する方法

作成したUbuntu-18.04の環境をエクスポートして、インポートを2回行うことで、環境を2つ作成します。
最後に元の環境を削除します

wsl --export Ubuntu d:\Ubuntu-18.04.tar
ws --import M5StickV-FW D:\Ubuntu-18.04\M5StickV-FW D:\Ubuntu-18.04.tar
wsl --import M5StickV-LRN D:\Ubuntu-18.04\M5StickV-LRN D:\Ubuntu-18.04.tar
wsl --unregister Ubuntu-18.04

WSLの起動は、下記のコマンドです

wsl -d M5StickV-FW -u ユーザ名
wsl -d M5StickV-LRN -u ユーザ名

ファームウエアビルド環境作成

下記のページを参照
M5StickVのファームウェアビルド手順

WSL環境からWin環境へのファイルコピーは

/mnt/{ドライブ名}からアクセスできます。cドライブの場合は、/mnt/cです

学習データファイルの作成環境作成

下記のページを参照

メモ
・WSLのシャットダウンは「wsl --shutdown」(複数WSL起動していると全部シャットダウンされます)
・condaのインストール後「source ~/.bashrc」を行う
・学習前に「pip install 'h5py<3.0.0'」を行う

M5StickVやUnitVで使えるkmodelファイルをローカル環境で作成する。

このページも参照
#M5StickV でお顔認証する手順

Jupyter Notebookの環境作成

環境作成

mkdir ~/jupyter
cd jupyter
conda create -n "jupyter" python=3.7
conda activate jupyter

conda install jupyter
conda install tensorflow
conda install keras

conda install Pillow
conda install matplotlib
conda install scikit-learn
conda install pytz
conda install seaborn

Noteブックの起動

jupyter notebook --no-browser --port=8080 --ip=0.0.0.0
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?