{"id":6171,"date":"2022-03-20T08:52:11","date_gmt":"2022-03-19T23:52:11","guid":{"rendered":"https:\/\/www.sambuichi.jp\/?p=6171"},"modified":"2022-03-20T09:13:07","modified_gmt":"2022-03-20T00:13:07","slug":"after-update-the-python3-version-to-3-10-s3cmd-doesnt-work","status":"publish","type":"post","link":"https:\/\/www.sambuichi.jp\/?p=6171","title":{"rendered":"After update the python3 version to 3.10, s3cmd doesn&#8217;t work."},"content":{"rendered":"<p>Views: 46<\/p><p>M1 Mac(macOS Monterey version 12.3)\u3067AWS(Amazon Web Service)\u306eS3(Simple Storage Service)\u3092\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3059\u308bs3cmd\u304c\u3000Python3\u30923.10\u306b\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305f\u3089\u3001\u6b21\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u3067\u30a8\u30e9\u30fc\u3068\u306a\u3063\u305f\u3002<\/p>\n<p>\/usr\/local\/bin\/s3cmd: \/usr\/local\/Cellar\/s3cmd\/2.0.1\/libexec\/bin\/s3cmd: \/usr\/bin\/python: bad interpreter: No such file or directory<\/p>\n<h3>brew\u3067s3cmd\u3092\u66f4\u65b0\u30b9\u30c8\u30fc\u30eb\u3057\u89e3\u6c7a<\/h3>\n<p>\u8272\u3005\u8a66\u3057\u305f\u304c\u3001brew(brew install s3cmd)\u3067\u89e3\u6c7a\u3057\u305f\u3002<br \/>\n<a href=\"https:\/\/formulae.brew.sh\/formula\/s3cmd\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-20-at-8.19.43-1024x987.png\" alt=\"\" width=\"1024\" height=\"987\" class=\"alignnone size-large wp-image-6172\" srcset=\"https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-20-at-8.19.43-1024x987.png 1024w, https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-20-at-8.19.43-300x289.png 300w, https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-20-at-8.19.43-768x740.png 768w, https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-20-at-8.19.43-1536x1480.png 1536w, https:\/\/www.sambuichi.jp\/wp-content\/uploads\/2022\/03\/Screen-Shot-2022-03-20-at-8.19.43.png 1826w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<pre class=\"lang:default decode:true \" >$ brew install s3cmd\r\ns3cmd 2.0.1 is already installed but outdated (so it will be upgraded).\r\n...\r\n\r\n==&gt; Checking for dependents of upgraded formulae...\r\n==&gt; No broken dependents to reinstall!\r\n$\r\n$ s3cmd --version\r\ns3cmd version 2.2.0\r\n$\r\n$ s3cmd ls s3:\/\/xxxx.jp\r\n                          DIR  s3:\/\/xxxx.jp\/yyyy\/\r\n                          DIR  s3:\/\/xxxx.jp\/zzzz\/<\/pre>\n<p>\u6700\u521d\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u306e\u304c10\u5e74\u304f\u3089\u3044\u6614\u306a\u306e\u3067\u3001\u305d\u306e\u3068\u304d\u306bbrew\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u305f\u3089\u3057\u3044\u3002<br \/>\n\u99c4\u76ee\u3060\u3063\u305f\u624b\u9806\u3092\u4ee5\u964d\u306b\u8a18\u8f09\u3059\u308b\u3002<\/p>\n<h3>pip3 install aws\u306f\u99c4\u76ee<\/h3>\n<pre class=\"height-set:true width-set:true lang:default decode:true \" >$ python3 --version\r\nPython 3.10.1\r\n\r\n$ pip3 --version\r\npip 22.0.4 from \/Library\/Frameworks\/Python.framework\/Versions\/3.10\/lib\/python3.10\/site-packages\/pip (python 3.10)\r\n\r\n$ pip3 install aws\r\nCollecting aws\r\n  Downloading aws-0.2.5.tar.gz (5.6 kB)\r\n  Preparing metadata (setup.py) ... done\r\n...\r\n\r\n$ which python\r\n\/usr\/local\/bin\/python\r\n\r\n$ python --version\r\nIllegal instruction: 4\r\n\r\n$ pip3 install s3cmd\r\nCollecting s3cmd\r\n  Downloading s3cmd-2.2.0-py2.py3-none-any.whl (153 kB)\r\n     \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 153.9\/153.9 KB 3.8 MB\/s eta 0:00:00\r\n<\/pre>\n<h3>\/usr\/local\/bin\/s3cmd\u306e#!\/bin\/bash\u3092\u5909\u66f4\u3057\u3066\u3082\u99c4\u76ee<\/h3>\n<pre class=\"height-set:true width-set:true lang:default decode:true \" >$ cat \/usr\/local\/bin\/s3cmd\r\n#!\/bin\/bash\r\nPYTHONPATH=\"\/usr\/local\/Cellar\/s3cmd\/2.0.1\/libexec\/lib\/python2.7\/site-packages:\/usr\/local\/Cellar\/s3cmd\/2.0.1\/libexec\/vendor\/lib\/python2.7\/site-packages\" exec \"\/usr\/local\/Cellar\/s3cmd\/2.0.1\/libexec\/bin\/s3cmd\" \"$@\"\r\nNobu-MacBook:~ pontsoleil$ cat \/usr\/local\/Cellar\/s3cmd\/2.0.1\/libexec\/bin\/s3cmd\r\n#!\/usr\/bin\/python\r\n# -*- coding: utf-8 -*-\r\n\r\n## --------------------------------------------------------------------\r\n## s3cmd - S3 client\r\n##\r\n## Authors   : Michal Ludvig and contributors\r\n## Copyright : TGRMN Software - http:\/\/www.tgrmn.com - and contributors\r\n## Website   : http:\/\/s3tools.org\r\n## License   : GPL Version 2\r\n## --------------------------------------------------------------------\r\n## This program is free software; you can redistribute it and\/or modify\r\n## it under the terms of the GNU General Public License as published by\r\n## the Free Software Foundation; either version 2 of the License, or\r\n## (at your option) any later version.\r\n## This program is distributed in the hope that it will be useful,\r\n## but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r\n## GNU General Public License for more details.\r\n## --------------------------------------------------------------------\r\n<\/pre>\n<h3>s3cmd-2.0.2.tar.gz\u304b\u3089\u306e\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3082\u99c4\u76ee<\/h3>\n<pre class=\"lang:default decode:true \" >$ wget https:\/\/sourceforge.net\/projects\/s3tools\/files\/s3cmd\/2.0.2\/s3cmd-2.0.2.tar.gz\r\n-bash: wget: command not found\r\n\r\n$ brew install wget\r\nRunning `brew update --preinstall`...\r\n==&gt; Auto-updated Homebrew!\r\nUpdated 2 taps (homebrew\/core and homebrew\/services).<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Views: 46M1 Mac(macOS Monterey version 12.3)\u3067AWS(Amazon Web Service)\u306eS3(Simple Storage Service)\u3092\u30b3\u30de\u30f3\u30c9\u3067\u5b9f\u884c\u3059\u308bs3cmd [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":6172,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[20,50,11],"tags":[],"_links":{"self":[{"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/posts\/6171"}],"collection":[{"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6171"}],"version-history":[{"count":9,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/posts\/6171\/revisions"}],"predecessor-version":[{"id":6182,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/posts\/6171\/revisions\/6182"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=\/wp\/v2\/media\/6172"}],"wp:attachment":[{"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6171"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6171"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sambuichi.jp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6171"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}