
pythonを本格的に勉強してみようと、ブックオフで本を売った資金を元手に、日経ソフトウェアを購入。
今回はpygame編
インストールしてみる
ソリューションのpython環境を右クリックして、すべてのpython環境を表示
matplotlib
のときと同様に
それならば、python環境を右クリックして、pygame
と検索窓に入力。すべてのpython環境を表示の下のほうに出てくる、
「pygameのインストール」を選択

できた!!。

続けて、Pygame Zeroをインストール。「次のコマンドを実行 pip install pgzero」

完了!!

早速書いてみる
import pgzrunと記述するとエラー…
opencvの時と同様。Visual Studioを再起動するとエラーが消え、サジェスト機能も効き始めます。
でもVisual Studioを再起動すると消えたので、再起動するといいみたいです。
コードを書いていくと、マスクの位置がずれるなど四苦八苦しながら実行。スペルミスがありつつもなんとかできました。

できた!!
まとめ
OpenCVですら、Visual Studio 2019では簡単にインストールできました。
Pythonはいろいろライブラリがそろっていて面白いですね。