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 1 year has passed since last update.

Arduino IDEのエラー ModuleNotFoundError: No module named 'serial' の個人的備忘録

Posted at

原因

Arduino IDEはpythonを使っている

普通に"pip install pyserial"してもpython3(anaconda)にインストールされる
Arduino IDEがanacondaのpythonとOSに元々入ってるpython3とpython2のどれを使っているかは知らないが
3つそのどれかにpyserialがないため(←今回はOS純正のpython3だった)

python2にpipがあるか確認

python2 -m pip --version

無い時

python2

でpython2.xのマイナーバージョン確認

sudo curl -kL https://bootstrap.pypa.io/pip/2.7/get-pip.py | python2.x

※ x は上記のマイナーバージョンの数字

python2にpipがインストールできたか確認

python2 -m pip --version

pyserialインストール

python2 -m pip install pyserial

OS純正python3にpyserialが入っているか確認

python3 -m pip list

## 無い時

python3 -m pip install pyserial
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?