{"id":3827,"date":"2020-12-03T22:18:44","date_gmt":"2020-12-03T13:18:44","guid":{"rendered":"https:\/\/www.chihayafuru.jp\/tech\/?p=3827"},"modified":"2020-12-08T10:04:51","modified_gmt":"2020-12-08T01:04:51","slug":"arduino-no-module-named-serial","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/3827","title":{"rendered":"[Arduino] No module named serial"},"content":{"rendered":"<h3>1. \u75c7\u72b6<\/h3>\n<p>Arduino IDE\u306b\u304a\u3044\u3066\uff08\u30b5\u30f3\u30d7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u306e\uff09\u30b3\u30f3\u30d1\u30a4\u30eb\u304c\u5931\u6557\u3059\u308b\u3002<\/p>\n<h3>2. \u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8<\/h3>\n<pre class=\"lang:default highlight:0 decode:true \" >Traceback (most recent call last):\r\n  File \"\/Users\/Nobody\/Library\/Arduino15\/packages\/esp32\/tools\/esptool_py\/2.6.1\/esptool.py\", line 37, in &lt;module&gt;\r\n    import serial\r\nImportError: No module named serial\r\nexit status 1\r\n\u30dc\u30fc\u30c9M5Stack-Core-ESP32\u306b\u5bfe\u3059\u308b\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\r\n\r\n\r\n\u300c\u30d5\u30a1\u30a4\u30eb\u300d\u30e1\u30cb\u30e5\u30fc\u306e\u300c\u74b0\u5883\u8a2d\u5b9a\u300d\u304b\u3089\r\n\u300c\u3088\u308a\u8a73\u7d30\u306a\u60c5\u5831\u3092\u8868\u793a\u3059\u308b\uff1a\u30b3\u30f3\u30d1\u30a4\u30eb\u300d\u3092\u6709\u52b9\u306b\u3059\u308b\u3068\r\n\u3088\u308a\u8a73\u3057\u3044\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002\r\n\r\n\r\nArduino\uff1a1.8.13 (Mac OS X), \u30dc\u30fc\u30c9\uff1a\"M5Stack-Core-ESP32, QIO, 80MHz, Default, 921600, None\"<\/pre>\n<p><!--more--><\/p>\n<h3>3. \u74b0\u5883<\/h3>\n<ul>\n<li>Arduino IDE 1.8.13<\/li>\n<li>macOS Big Sur (11.0.1)<\/li>\n<li>Python 2.7.16<\/li>\n<li>Python 3.9.0<\/li>\n<\/ul>\n<h3>4. \u539f\u56e0<\/h3>\n<p>Python\u30e2\u30b8\u30e5\u30fc\u30eb <code>pyserial<\/code> \u304c\u898b\u3064\u304b\u3089\u306a\u3044\uff08\u672a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u3042\u308b\uff09\u3002<\/p>\n<h3>5. \u5bfe\u51e6\u65b9\u6cd5<\/h3>\n<p>easy_install\u3067pyserial\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/p>\n<pre class=\"lang:sh decode:true \" >$ sudo easy_install -U pyserial<\/pre>\n<ol>\n<li>Arduino IDE 1.8.13 \u306f, Python2.7 \u3067\u52d5\u4f5c\u3059\u308b\u305f\u3081\u3001pip3 (Python3) \u3067 pyserial \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3082 Arduino IDE \u306e\u5f79\u306b\u306f\u7acb\u305f\u306a\u3044\u3002<\/li>\n<li>pip (\u2260pip3) \u304c\u672a\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3060\u3063\u305f\u305f\u3081\u3001\u30ec\u30ac\u30b7\u30fc\u30fb\u30b3\u30de\u30f3\u30c9\u306e easy_install \u3067 pyserial \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3002<\/li>\n","protected":false},"excerpt":{"rendered":"<p>1. \u75c7\u72b6 Arduino IDE\u306b\u304a\u3044\u3066\uff08\u30b5\u30f3\u30d7\u30eb\u30b9\u30af\u30ea\u30d7\u30c8\u306e\uff09\u30b3\u30f3\u30d1\u30a4\u30eb\u304c\u5931\u6557\u3059\u308b\u3002 2. \u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8 Traceback (most recent call last): File &#8220;\/Users\/Nobod [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[107],"class_list":["post-3827","post","type-post","status-publish","format-standard","hentry","category-memo","tag-arduino"],"_links":{"self":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/3827","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/comments?post=3827"}],"version-history":[{"count":5,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/3827\/revisions"}],"predecessor-version":[{"id":3847,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/3827\/revisions\/3847"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=3827"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=3827"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=3827"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}