はじめに
Raspberry Piのpytohn開発環境を整えたい。
今回は Jupyter Notebook と Spyder の導入法について。
Jupyter Notebookの導入
参考サイト:Python開発環境「Jupyter Notebook」をラズパイで動作させる
何も問題が起きなかったため、今回は引用のみ。
- 起動方法
$ jupyter notebook
Spyderの導入
参考サイト:Raspberry PiでPythonの統合開発環境(IDE)を構築する方法
いつも通りパッケージの更新をしてから
$ sudo apt install spyder3
$ spyder3
で起動する。
あれ。開かない。
ImportError: cannot import name 'create_prompt_application' from 'prompt_toolkit.shortcuts' (/usr/local/lib/python3.7/dist-packages/prompt_toolkit/shortcuts/__init__.py)
と出てきた。
調べたところ、
$ pip3 install 'prompt-toolkit==1.0.15'
を行い、再び起動させたところ開けた。
バージョンの相性の問題だったのかな。もしくはそもそも入ってなかったか。
まとめ
Jupyter notebook と spyder のインストールをしてみた。
使うかどうかはわからないけど、とりあえず。
berry conda も試してみたいなぁ。
ただ、大学で使ってるラズパイだからむやみやたらに色々できない。。