{"id":130,"date":"2019-09-20T19:40:29","date_gmt":"2019-09-20T10:40:29","guid":{"rendered":"https:\/\/tech.infinitespace.org\/?p=130"},"modified":"2019-09-22T01:36:28","modified_gmt":"2019-09-21T16:36:28","slug":"python%e3%81%ae%e7%92%b0%e5%a2%83%e3%81%8c%e5%a3%8a%e3%82%8c%e3%81%9f%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/tech.infinitespace.org\/?p=130","title":{"rendered":"Python\u306e\u74b0\u5883\u304c\u58ca\u308c\u305f\uff1f"},"content":{"rendered":"<p>\u5148\u65e5\u3001\u3068\u3042\u308b\u30b5\u30fc\u30d0\u3067\u5b9f\u884c\u3057\u3066\u3044\u305fPython\u306e\u74b0\u5883\u304c\u306a\u305c\u3060\u304b\u304a\u304b\u3057\u304f\u306a\u3063\u3066\u3001\u3042\u308b\u65e5\u3092\u5883\u306bPython\u3092\u4e00\u90e8\u306b\u4f7f\u3063\u3066\u52d5\u3044\u3066\u3044\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u6b63\u5e38\u52d5\u4f5c\u3057\u306a\u304f\u306a\u3063\u305f\u3093\u3067\u3059\u3088\u3002\u304a\u304b\u3057\u3044\u306a\u3068\u601d\u3063\u3066\u3001\u540c\u69d8\u306bPython\u3067\u52d5\u3044\u3066\u3044\u308baws cli\u306e\u30b3\u30de\u30f3\u30c9\u3092\u53e9\u3044\u3066\u307f\u308b\u3068\u3001\u5358\u306b\u5b9f\u884c\u3057\u305f\u3060\u3051\u306a\u306e\u306bStack\u5410\u3044\u3066\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3057\u307e\u3046\u72b6\u6cc1\u3002<\/p>\n<p>\u4f55\u304b\u3067Python\u306e\u74b0\u5883\u304c\u58ca\u308c\u305f\u304b\u3068\u8003\u3048\u3066apt\u3067\u4fee\u5fa9\u3057\u3088\u3046\u3068\u8003\u3048\u3066\u3001\u6539\u3081\u3066apt\u3067Python\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3088\u3046\u3068\u3057\u3066\u3082\u3001\u3053\u3093\u3069\u306fapt\u306e\u4e2d\u306e\u51e6\u7406\u3067Python\u304c\u52d5\u304f\u3068\u3053\u308d\u3067\u30a8\u30e9\u30fc\u306b\u306a\u308aapt\u3082\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u306a\u3044\u3002\u3053\u308c\u4ee5\u4e0a\u74b0\u5883\u3092\u5909\u66f4\u3059\u308b\u3088\u3046\u306a\u4f5c\u696d\u3092\u3059\u308b\u3068\u3001\u4fee\u5fa9\u3067\u304d\u306a\u3044\u72b6\u6cc1\u306b\u9665\u308a\u304b\u306d\u306a\u3044\u306e\u3068\u3001\u5e78\u3044Python\u304c\u7d61\u3093\u3067\u3044\u306a\u3044\u30b3\u30de\u30f3\u30c9\u95a2\u4fc2\u306f\u7279\u306b\u554f\u984c\u304c\u8d77\u304d\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u8a72\u5f53\u3059\u308b\u51e6\u7406\u306f\u5225\u306e\u30b5\u30fc\u30d0\u306b\u79fb\u52d5\u3055\u305b\u305f\u308a\u3057\u3066\u5f53\u9762\u306e\u554f\u984c\u306f\u56de\u907f\u3002<\/p>\n<p>\u3068\u306f\u884c\u3063\u3066\u3082\u58ca\u308c\u305f\u307e\u307e\u3060\u3068\u8272\u3005\u554f\u984c\u304c\u8d77\u3053\u308a\u304b\u306d\u306a\u3044\u306e\u3067\u89e3\u6c7a\u306e\u70ba\u306e\u8abf\u67fb\u306f\u7d99\u7d9a\u3002<\/p>\n<p>\u3057\u3070\u3089\u304f\u3057\u3066\u3001\u6539\u3081\u3066\u4fee\u5fa9\u3057\u3088\u3046\u3068apt\u3092\u5b9f\u884c\u3057\u3066\u307f\u305f\u308a\u3001\u5358\u306bPython\u3092\u8d77\u52d5\u3057\u3066\u307f\u305f\u308a\u3057\u3066\u51fa\u3066\u304f\u308b\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u691c\u7d22\u306b\u304b\u3051\u3066\u8abf\u3079\u3066\u307f\u308b\u3068\u3001\u51fa\u3066\u304f\u308b\u8a18\u4e8b\u306e1\u3064\u306b\u5149\u660e\u304c\u3002\u305d\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306f<\/p>\n<pre class=\"code\" data-lang=\"\" data-unlink=\"\">EOFError: marshal data too short<\/pre>\n<p>\u3068\u3044\u3046\u3082\u306e\u3067\u3001\u305d\u306e<a href=\"https:\/\/pc.atsuhiro-me.net\/entry\/2017\/10\/19\/125527\">\u8a18\u4e8b<\/a>\u306e\u4e2d\u306b\u306f\u300c.pyc\u30d5\u30a1\u30a4\u30eb\u304c\u539f\u56e0\u3067\u3001\u524a\u9664\u3059\u308c\u3070\u89e3\u6d88\u3067\u304d\u308b\u300d\u65e8\u304c\u66f8\u304b\u308c\u3066\u3044\u307e\u3057\u305f\u3002\u300c\u305d\u3046\u304b\u5b9f\u884c\u6642\u306e\u4e2d\u9593\u30ad\u30e3\u30c3\u30b7\u30e5\u30d5\u30a1\u30a4\u30eb\u304b\uff01\u300d\u3068\u8a00\u3046\u4e8b\u3067\u30a8\u30e9\u30fc\u306b\u306a\u308b\u72b6\u6cc1\u3092\uff08\u4f55\u3068\u306a\u304f\uff09\u7406\u89e3\u3002<\/p>\n<p>\u3068\u3044\u3046\u306e\u3082\u4e0a\u8a18\u306e\u74b0\u5883\u304c\u304a\u304b\u3057\u304f\u306a\u3063\u305f\u30b5\u30fc\u30d0\u3067\u3001\u4e01\u5ea6\u30a8\u30e9\u30fc\u304c\u51fa\u59cb\u3081\u305f\u306e\u3068\u540c\u3058\u30bf\u30a4\u30df\u30f3\u30b0\u306b\u4e00\u56de\u30c7\u30a3\u30b9\u30af\u30d5\u30eb\u306e\u969c\u5bb3\u3092\u3084\u3089\u304b\u3057\u3066\u3044\u3066\u3001\u305d\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067Python\u95a2\u9023\u306e\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u305f\u3089\u30ad\u30e3\u30c3\u30b7\u30e5\u3082\u58ca\u308c\u3066\u3044\u3066\u3082\u304a\u304b\u3057\u304f\u306f\u306a\u3044\u3002\u305f\u3060\u3001\u3053\u306e\u60c5\u5831\u3092\u898b\u308b\u307e\u3067\u306f\u3001\u30c7\u30a3\u30b9\u30af\u30d5\u30eb\u306b\u306a\u3063\u305f\u3068\u3057\u3066\u3082\u9006\u306b\u305d\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u74b0\u5883\u3092\u5909\u66f4\u3059\u308b\u3088\u3046\u306aapt update\/upgrade\u306f\u5b9f\u884c\u3057\u3066\u3044\u306a\u3044\u3057\u3001\u305d\u308c\u306b\u6e96\u305a\u308b\u3088\u3046\u306a\u4f5c\u696d\u306a\u3069\u3082\u3057\u3066\u3044\u306a\u3044\u306e\u3067Python\u306e\u5b9f\u884c\u74b0\u5883\u304c\u304a\u304b\u3057\u304f\u306a\u308b\u306a\u3093\u3066\u3053\u3068\u306f\u901a\u5e38\u306f\u8003\u3048\u3089\u308c\u306a\u3044\u3068\u8abf\u67fb\u306e\u7dda\u304b\u3089\u5c11\u3057\u8a71\u3057\u3066\u304a\u3044\u305f\u3093\u3067\u3059\u3088\u3002\u5b9f\u884c\u6642\u306e\u4e2d\u9593\u30ad\u30e3\u30c3\u30b7\u30e5\u3067\u3042\u308c\u3070\u5b9f\u884c\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u306b\u3088\u3063\u3066\u306f\u66f4\u65b0\u3055\u308c\u308b\u3053\u3068\u3082\u3042\u308b\u3060\u308d\u3046\u3057\u3001\u66f4\u65b0\u306e\u30bf\u30a4\u30df\u30f3\u30b0\u3067\u30c7\u30a3\u30b9\u30af\u30d5\u30eb\u306b\u306a\u3063\u305f\u3089\u5909\u306a\u72b6\u614b\u306e\u30ad\u30e3\u30c3\u30b7\u30e5\u30d5\u30a1\u30a4\u30eb\u306a\u3063\u3066\u3057\u307e\u3046\u4e8b\u3082\u3042\u308a\u305d\u3046\u3002<\/p>\n<p>\u65e9\u901f.pyc\u30d5\u30a3\u3042\u308b\u3092\u524a\u9664\u3059\u308b\u6e96\u5099\u306b\u3002\u78ba\u8a8d\u3057\u305f\u3068\u3053\u308d\u3001\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u306f\u3068\u308a\u3042\u3048\u305a\u524a\u9664\u3057\u3066\u3082\u554f\u984c\u306a\u3044\u3089\u3057\u304f\u3001\u4eee\u306b\u554f\u984c\u306e\u306a\u3044.pyc\u3092\u6d88\u3057\u305f\u3068\u3053\u308d\u3067\u305d\u306e\u5f8c\u5b9f\u884c\u3055\u308c\u308b\u3068\u304d\u306b\u518d\u5ea6\u4f5c\u3089\u308c\u305d\u3046\u306a\u306e\u3067\u526f\u4f5c\u7528\u3082\u30ad\u30e3\u30c3\u30b7\u30e5\u304c\u6d88\u3048\u305f\u3053\u3068\u3067\u82e5\u5e72\u5b9f\u884c\u306b\u6642\u9593\u304c\u304b\u304b\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u7a0b\u5ea6\u3002\u305d\u3046\u3044\u3046\u308f\u3051\u3067\u3001\u65e9\u901f\u30b5\u30fc\u30d0\u5168\u4f53\u3067.pyc\u30d5\u30a1\u30a4\u30eb\u3092\u63a2\u3057\u3066\u524a\u9664\uff01<\/p>\n<pre>sudo find \/ -name *.pyc | sudo xargs -I {} rm {}<\/pre>\n<p>\u3067\u3001\u6539\u3081\u3066Python\u3092\u7a7a\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068\u3001\u5148\u306b\u51fa\u3066\u3044\u305f\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u306f\u51fa\u306a\u304f\u306a\u308a\u3001\u5225\u306e\u30a8\u30e9\u30fc\u304c\u30fb\u30fb\u30fb\u3002\u3068\u884c\u3063\u3066\u3082\u898b\u6163\u308c\u305f\u30a8\u30e9\u30fc\u3067\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u8db3\u308a\u306a\u3044\u3068\u3044\u3046\u3084\u3064\u3067\u3053\u308c\u306f\u591a\u5206apt\u3092-f\u3064\u3051\u3066\u5b9f\u884c\u3059\u308c\u3070\u5927\u4e08\u592b\uff01\uff1f\u306a\u7b48\u3002<\/p>\n<pre>sudo apt-get -f upgrade<\/pre>\n<p>\u3064\u3044\u3067\u306bupgrade\u3082\u3057\u3061\u3083\u3046\u52e2\u3044\u3067\u5b9f\u884c\u3059\u308b\u3068.pyc\u30d5\u30a1\u30a4\u30eb\u3092\u6d88\u3059\u524d\u306f\u9014\u4e2d\u3067\u30a8\u30e9\u30fc\u304c\u3067\u3066\u5b9f\u884c\u3067\u304d\u306a\u304b\u3063\u305f\u51e6\u7406\u304c\u6b62\u307e\u308b\u4e8b\u7121\u304f\u51e6\u7406\u5b8c\u4e86\u3002<\/p>\n<p>\u304a\u305d\u308b\u304a\u305d\u308b\u4eca\u5ea6\u306faws cli(aws\u30b3\u30de\u30f3\u30c9)\u3092\u7a7a\u5b9f\u884c\u3057\u3066\u307f\u308b\u3068\u3001\u4f55\u306e\u30a8\u30e9\u30fc\u3082\u3067\u305a\u60c5\u5831\u304c\u8868\u793a\u3055\u308c\u3066\u6b63\u5e38\u7d42\u4e86\u3002\u6b62\u3081\u3066\u3044\u305fPython\u3092\u5229\u7528\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3082\u554f\u984c\u3067\u306a\u3044\u3057\u3001aws cli\u3082\u4f7f\u3048\u308b\uff01\u3068\u3044\u3046\u3053\u3068\u3067\u56de\u5fa9\u3001\u4e00\u4ef6\u843d\u7740\uff01<\/p>\n<p>\u3044\u3084\u3041\uff5e\u3001\u30ad\u30e3\u30c3\u30b7\u30e5\u3063\u3066\u6016\u3044\u3067\u3059\u306d\uff57<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5148\u65e5\u3001\u3068\u3042\u308b\u30b5\u30fc\u30d0\u3067\u5b9f\u884c\u3057\u3066\u3044\u305fPython\u306e\u74b0\u5883\u304c\u306a\u305c\u3060\u304b\u304a\u304b\u3057\u304f\u306a\u3063\u3066\u3001\u3042\u308b\u65e5\u3092\u5883\u306bPython\u3092\u4e00\u90e8\u306b\u4f7f\u3063\u3066\u52d5\u3044\u3066\u3044\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u304c\u6b63\u5e38\u52d5\u4f5c\u3057\u306a\u304f\u306a\u3063\u305f\u3093\u3067\u3059\u3088\u3002\u304a\u304b\u3057\u3044\u306a\u3068\u601d\u3063\u3066\u3001\u540c\u69d8\u306bPython\u3067\u52d5\u3044\u3066\u3044\u308baw &hellip; <a href=\"https:\/\/tech.infinitespace.org\/?p=130\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-130","post","type-post","status-publish","format-standard","hentry","category-4"],"_links":{"self":[{"href":"https:\/\/tech.infinitespace.org\/index.php?rest_route=\/wp\/v2\/posts\/130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tech.infinitespace.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.infinitespace.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.infinitespace.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.infinitespace.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=130"}],"version-history":[{"count":2,"href":"https:\/\/tech.infinitespace.org\/index.php?rest_route=\/wp\/v2\/posts\/130\/revisions"}],"predecessor-version":[{"id":132,"href":"https:\/\/tech.infinitespace.org\/index.php?rest_route=\/wp\/v2\/posts\/130\/revisions\/132"}],"wp:attachment":[{"href":"https:\/\/tech.infinitespace.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.infinitespace.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.infinitespace.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}