{"id":1408,"date":"2016-09-27T02:33:08","date_gmt":"2016-09-26T17:33:08","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=1408"},"modified":"2016-09-27T02:33:08","modified_gmt":"2016-09-26T17:33:08","slug":"restore-the-state-do-not-see-the-pip-command-in-ubuntu","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2016\/09\/27\/restore-the-state-do-not-see-the-pip-command-in-ubuntu\/","title":{"rendered":"ubuntu\u3067pip\u304c\u898b\u5f53\u305f\u3089\u306a\u3044\u72b6\u614b\u3092\u5fa9\u65e7"},"content":{"rendered":"<p>\u9e7f\u5150\u5cf6\u3089\u3050\u306e\u30aa\u30d5\u4f1a\u3067 <span class=\"citation\">@seopon\u3055\u3093\u304b\u3089pip\u3067<\/span><em>janome<\/em>\u5165\u308c\u3066\u307f\u307e\u3057\u3087\u3046\u3063\u3066\u6642\u306b\uff0c\u4ee5\u524d<em>sudo hogehoge<\/em>\u3057\u3066\u304b\u3089pip\u4f7f\u3048\u306a\u304f\u306a\u3063\u3061\u3083\u3063\u3066\u65b9\u304c\uff0e \u898b\u3066\u307f\u308b\u3068pkg\u306f\u5165\u3063\u3066\u3044\u308b\u3051\u3069pip\u30b3\u30de\u30f3\u30c9\u81ea\u4f53\u304c\u3044\u306a\u304f\u306a\u3063\u3066\u308b\u611f\u3058\u307f\u305f\u3044\u3067\u3057\u305f\uff0e\u6050\u3089\u304f\u30aa\u30da\u30df\u30b9\u3067\u6d88\u3057\u305f\u304b\u30d1\u30b9\u306e\u306a\u3044\u3068\u3053\u308d\u306b\u79fb\u52d5\u3057\u3061\u3083\u3063\u305f? (\u4ee5\u4e0b\u306f\u591a\u5206\u3053\u3093\u306a\u3060\u3063\u305f\u3068\u3044\u3046\u306e\u3092\u518d\u73fe\uff0e)<\/p>\n<pre><code>$ pip\r\n\u30d7\u30ed\u30b0\u30e9\u30e0 &#39;pip&#39; \u306f\u307e\u3060\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002 \u6b21\u306e\u3088\u3046\u306b\u5165\u529b\u3059\u308b\u3053\u3068\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059:\r\nsudo apt install python-pip\r\n$ sudo apt install python-pip\r\n\u30d1\u30c3\u30b1\u30fc\u30b8\u30ea\u30b9\u30c8\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059... \u5b8c\u4e86\r\n\u4f9d\u5b58\u95a2\u4fc2\u30c4\u30ea\u30fc\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\r\n\u72b6\u614b\u60c5\u5831\u3092\u8aad\u307f\u53d6\u3063\u3066\u3044\u307e\u3059... \u5b8c\u4e86\r\npython-pip \u306f\u3059\u3067\u306b\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3 (8.1.1-2ubuntu0.2) \u3067\u3059\u3002\r\n\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9: 0 \u500b\u3001\u65b0\u898f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb: 0 \u500b\u3001\u524a\u9664: 0 \u500b\u3001\u4fdd\u7559: 0 \u500b\u3002\r\n$ which pip\r\n$ dpkg -L python-pip | grep \\\/pip$\r\n\/usr\/bin\/pip\r\n\/usr\/lib\/python2.7\/dist-packages\/pip\r\n$ ls -l \/usr\/bin\/pip\r\nls: &#39;\/usr\/bin\/pip&#39; \u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093: \u305d\u306e\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u3042\u308a\u307e\u305b\u3093<\/code><\/pre>\n<p>pkg\u3092reinstall\u3057\u3066\u89e3\u6c7a\u3057\u307e\u3057\u305f\uff0e<\/p>\n<pre><code>$ sudo apt install --reinstall python-pip\r\n\u30d1\u30c3\u30b1\u30fc\u30b8\u30ea\u30b9\u30c8\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059... \u5b8c\u4e86\r\n\u4f9d\u5b58\u95a2\u4fc2\u30c4\u30ea\u30fc\u3092\u4f5c\u6210\u3057\u3066\u3044\u307e\u3059\r\n\u72b6\u614b\u60c5\u5831\u3092\u8aad\u307f\u53d6\u3063\u3066\u3044\u307e\u3059... \u5b8c\u4e86\r\n\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9: 0 \u500b\u3001\u65b0\u898f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb: 0 \u500b\u3001\u518d\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb: 1 \u500b\u3001\u524a\u9664: 0 \u500b\u3001\u4fdd\u7559: 0 \u500b\u3002\r\n144 kB \u306e\u30a2\u30fc\u30ab\u30a4\u30d6\u3092\u53d6\u5f97\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\r\n\u3053\u306e\u64cd\u4f5c\u5f8c\u306b\u8ffd\u52a0\u3067 0 B \u306e\u30c7\u30a3\u30b9\u30af\u5bb9\u91cf\u304c\u6d88\u8cbb\u3055\u308c\u307e\u3059\u3002\r\n\u53d6\u5f97:1 http:\/\/jp.archive.ubuntu.com\/ubuntu xenial-updates\/universe amd64 python-pip all 8.1.1-2ubuntu0.2 [144 kB]\r\n144 kB \u3092 0\u79d2 \u3067\u53d6\u5f97\u3057\u307e\u3057\u305f (571 kB\/s)\r\n(\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059 ... \u73fe\u5728 902816 \u500b\u306e\u30d5\u30a1\u30a4\u30eb\u3068\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u307e\u3059\u3002)\r\n...\/python-pip_8.1.1-2ubuntu0.2_all.deb \u3092\u5c55\u958b\u3059\u308b\u6e96\u5099\u3092\u3057\u3066\u3044\u307e\u3059 ...\r\npython-pip (8.1.1-2ubuntu0.2) \u3067 (8.1.1-2ubuntu0.2 \u306b) \u4e0a\u66f8\u304d\u5c55\u958b\u3057\u3066\u3044\u307e\u3059 ...\r\nman-db (2.7.5-1) \u306e\u30c8\u30ea\u30ac\u3092\u51e6\u7406\u3057\u3066\u3044\u307e\u3059 ...\r\npython-pip (8.1.1-2ubuntu0.2) \u3092\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059 ...\r\nmk@x201s:~$ !ls\r\nls -l \/usr\/bin\/pip\r\n-rwxr-xr-x 1 root root 292  8\u6708 12 06:59 \/usr\/bin\/pip\r\n$ which pip\r\n\/usr\/bin\/pip\r\n$ pip -V\r\npip 8.1.2 from \/usr\/local\/lib\/python2.7\/dist-packages (python 2.7)<\/code><\/pre>\n<p>\u3068\u308a\u3042\u3048\u305a\uff0e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9e7f\u5150\u5cf6\u3089\u3050\u306e\u30aa\u30d5\u4f1a\u3067 @seopon\u3055\u3093\u304b\u3089pip\u3067janome\u5165\u308c\u3066\u307f\u307e\u3057\u3087\u3046\u3063\u3066\u6642\u306b\uff0c\u4ee5\u524dsudo hogehoge\u3057\u3066\u304b\u3089pip\u4f7f\u3048\u306a\u304f\u306a\u3063\u3061\u3083\u3063\u3066\u65b9\u304c\uff0e \u898b\u3066\u307f\u308b\u3068pkg\u306f\u5165\u3063\u3066\u3044\u308b\u3051\u3069pip\u30b3\u30de\u30f3\u30c9\u81ea\u4f53\u304c\u3044\u306a\u304f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[6,63],"tags":[275,288],"class_list":["post-1408","post","type-post","status-publish","format-standard","hentry","category-linux","category-ubuntu","tag-linux","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/1408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=1408"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/1408\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=1408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=1408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=1408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}