0
0

More than 1 year has passed since last update.

Arduino IDE で ESP32 を利用しようとしてpython-serialがなくて動かない件(ubuntu20.04LTE)

Last updated at Posted at 2022-02-14

Arduino IDE で ESP32 のモジュールを利用しようしてpythonのimport serial が通らなくて困った件があり、解消しましたので、記載します。

Arduino IDE での ESP32 モジュールの利用では、pythonを利用して、
更にimport serialしていますが、動きませんでした。
遅ればせながらの次のことでした。
pythonコマンドは、ubuntu20.04では、python2.7にリンクされています。
しかしながら、python2.7は、2020年1月1日でサポートを終了しており、
必要とされるpython2.7でのpip、およびpipを利用したpyserialのインストールはできなくなっています。

ご自身のほかの環境として、特段python2を利用する必要がないならば、
pythonコマンドが、python2にリンクされていることを修正するために

sudo apt install python-is-python3

を入れてしまえばpythonコマンドでpython3にリンクされて、
これで、動くようになるということです。

Special Thanks to
 https://chromebook.nomad-life.net/1923577/%E3%80%90chromebook_linux%E3%80%91arduino-ide%E3%81%A7esp32%E3%82%92%E4%BD%BF%E3%81%86
https://stackoverflow.com/questions/60762378/exec-python-executable-file-not-found-in-path

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