{"id":1578,"date":"2019-04-21T21:48:40","date_gmt":"2019-04-21T12:48:40","guid":{"rendered":"https:\/\/yuis-programming.com\/?p=1578"},"modified":"2021-07-22T10:01:31","modified_gmt":"2021-07-22T01:01:31","slug":"pip%e3%83%91%e3%83%83%e3%82%b1%e3%83%bc%e3%82%b8%e3%81%ab%e6%9c%80%e6%96%b0%e3%83%90%e3%83%bc%e3%82%b8%e3%83%a7%e3%83%b3%e3%81%8c%e5%ad%98%e5%9c%a8%e3%81%99%e3%82%8b%e3%81%8b%e3%81%a9%e3%81%86","status":"publish","type":"post","link":"https:\/\/yuis-programming.com\/?p=1578","title":{"rendered":"pip\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5b58\u5728\u3059\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u66f8\u3044\u305f"},"content":{"rendered":"<p>pip\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5b58\u5728\u3059\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<br \/>\n<img src=\"https:\/\/yuis.xsrv.jp\/images\/ss\/ShareX_ScreenShot_3318e464-8185-4724-8010-dc756529e848.png\" alt=\"https:\/\/yuis.xsrv.jp\/images\/ss\/ShareX_ScreenShot_3318e464-8185-4724-8010-dc756529e848.png\"><br \/>\n<img src=\"https:\/\/yuis.xsrv.jp\/images\/ss\/ShareX_ScreenShot_0dc6fe54-8864-4b52-b1a7-b525e7add7d5.png\" alt=\"https:\/\/yuis.xsrv.jp\/images\/ss\/ShareX_ScreenShot_0dc6fe54-8864-4b52-b1a7-b525e7add7d5.png\"><\/p>\n<p>Bash\u3067\u52d5\u304d\u307e\u3059\u3002<\/p>\n<pre><code>pip-latestis(){\n\n    : e.g. pip-latestis \"pip\"\n    : e.g. pip-latestis \"youtube-dl\"\n\ncurrentVer=\"$(pip list | grep \"${1}\" | awk '{print $2}' | chomp )\"\nupgradableVer=\"$(yolk -V \"${1}\" | awk '{print $2}' | chomp)\"\n[[ \"${currentVer}\" != \"${upgradableVer}\" ]] &amp;&amp; \\\n    { next=\"sudo pip install --upgrade \\\"${1}\\\"\" ; \\\n    printf \"\\n\\n${yel}W: The ${1} package ${1} has a new version.${end}: ${grn}${currentVer} \/ ${upgradableVer}${end}\\n\\\n    \\tTo upgrade ${1}, ${cyn}${next}${end} or ${cyn}next${end} \\n\\n\" ; } || \\\n        printf \"\\n\\n${grn}The package has no new version. You are on latest.${end}\\n\\n\"\n\n}\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>pip\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5b58\u5728\u3059\u308b\u304b\u3069\u3046\u304b\u78ba\u8a8d\u3059\u308b\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002 Bash\u3067\u52d5\u304d\u307e\u3059\u3002 pi [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[1],"tags":[],"acf":[],"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8Rxwo-ps","_links":{"self":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/1578"}],"collection":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1578"}],"version-history":[{"count":2,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/1578\/revisions"}],"predecessor-version":[{"id":2858,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=\/wp\/v2\/posts\/1578\/revisions\/2858"}],"wp:attachment":[{"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1578"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1578"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yuis-programming.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1578"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}