{"id":663,"date":"2022-10-22T06:56:09","date_gmt":"2022-10-21T21:56:09","guid":{"rendered":"https:\/\/ryo-fujinone.net\/blog\/?p=663"},"modified":"2022-10-22T06:56:09","modified_gmt":"2022-10-21T21:56:09","slug":"post-663","status":"publish","type":"post","link":"https:\/\/ryo-fujinone.net\/blog\/archives\/663","title":{"rendered":"\u30b7\u30f3\u30fb\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u3067Python\u306e\u4eee\u60f3\u74b0\u5883\u3092\u4f5c\u6210\u3057\u3066pip\u3092\u4f7f\u3046"},"content":{"rendered":"\n<p>\u5f53\u30b5\u30a4\u30c8\u304c\u5229\u7528\u3057\u3066\u3044\u308b\u30b7\u30f3\u30fb\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u306f2022\u5e7410\u6708\u6642\u70b9\u3067 Python 2.7.5\u30013.4.10\u30013.6.8 \u304c\u4f7f\u7528\u53ef\u80fd\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u6545\u306b\u6a29\u9650\u306e\u554f\u984c\u304b\u3089\u305d\u306e\u307e\u307e\u3067\u306fpip\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002pip3\u30b3\u30de\u30f3\u30c9\u306f\u3042\u308a\u307e\u3059\u304c\u3001\u6b8b\u5ff5\u306a\u304c\u3089install\u7b49\u3067\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u7d50\u679c\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>PermissionError: &#91;Errno 13] \u8a31\u53ef\u304c\u3042\u308a\u307e\u305b\u3093: '\/etc'<\/code><\/pre>\n\n\n\n<p>--user\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4ed8\u3051\u3066\u3082\u7d50\u679c\u306f\u5909\u308f\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u3001Python\u306e\u4eee\u60f3\u74b0\u5883\u3092\u4f5c\u6210\u3057\u3001<a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/pypa\/get-pip\" data-type=\"URL\" data-id=\"https:\/\/github.com\/pypa\/get-pip\" target=\"_blank\">get-pip.py<\/a>\u3067pip\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002Anaconda\u3084Miniconda\u3067\u3082\u826f\u3044\u3068\u306f\u601d\u3044\u307e\u3059\u304c\u3001\u4eca\u56de\u306f\u76ee\u7684\u304cpip\u3092\u4f7f\u7528\u53ef\u80fd\u306a\u72b6\u614b\u306b\u3059\u308b\u3053\u3068\u306e\u307f\u306a\u306e\u3067\u305d\u308c\u3089\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u306f\u3057\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<a href=\"https:\/\/ryo-fujinone.net\/blog\/go\/a-927\" class=\"a-banner\" rel=\"nofollow noopener\" target=\"_blank\">\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"728\" height=\"90\" alt=\"\" src=\"https:\/\/ryo-fujinone.net\/blog\/go\/a-1641\" class=\"pc\">\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"350\" height=\"160\" alt=\"\" src=\"https:\/\/ryo-fujinone.net\/blog\/go\/a-1639\" class=\"sp\">\n<\/a>\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"1\" height=\"1\" src=\"https:\/\/ryo-fujinone.net\/blog\/go\/a-1783\" alt=\"\">\n\n\n\n<p>\u307e\u305aSSH\u3067\u63a5\u7d9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br>SSH\u3067\u306e\u63a5\u7d9a\u306b\u95a2\u3057\u3066\u306f\u30de\u30cb\u30e5\u30a2\u30eb\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"blogcard\"><a href=\"https:\/\/www.shin-server.jp\/support\/manual\/man_server_ssh.php\" target=\"_blank\" rel=\"noopener noreferrer\" data-blogcard=\"1\"><\/a><\/div>\n\n\n\n<p>2022\u5e7410\u6708\u6642\u70b9\u3067\u3001\u30b7\u30f3\u30fb\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u3067\u306ePython\u306e\u30b3\u30de\u30f3\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>python \u3067 2.7.5<\/li>\n\n\n\n<li>python3 \u3067 3.6.8<\/li>\n\n\n\n<li>python3.4 \u3067 3.4.10<\/li>\n\n\n\n<li>python3.6 \u3067 3.6.8<\/li>\n<\/ul>\n\n\n\n<p>\u4eca\u56de\u306fpython3\u306e\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u30663.6.8\u306e\u4eee\u60f3\u74b0\u5883\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>SSH\u3067\u63a5\u7d9a\u3057\u305f\u3089\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066Python\u306e\u4eee\u60f3\u74b0\u5883\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>python3 -m venv --without-pip myvenv<\/code><\/pre>\n\n\n\n<p>\u30b7\u30f3\u30fb\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u306e\u5834\u5408\u3001--without-pip \u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u7121\u3044\u3068\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u306e\u3067\u3053\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u306f\u5fc5\u305a\u5165\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002myvenv\u306e\u90e8\u5206\u306f\u4eee\u60f3\u74b0\u5883\u306e\u540d\u524d\u3067\u3059\u3002\u597d\u304d\u306a\u540d\u524d\u3067\u69cb\u3044\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u4eee\u60f3\u74b0\u5883\u304c\u4f5c\u6210\u51fa\u6765\u305f\u3089\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u6709\u52b9\u306b\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>source myvenv\/bin\/activate<\/code><\/pre>\n\n\n\n<p>\u6b21\u306bget-pip.py\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\/\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/bootstrap.pypa.io\/pip\/3.6\/get-pip.py\npython get-pip.py<\/code><\/pre>\n\n\n\n<p>\u203b\u4eee\u60f3\u74b0\u5883\u304c\u6709\u52b9\u306a\u72b6\u614b\u306a\u306e\u3067\u3001python\u30b3\u30de\u30f3\u30c9\u3067\u306f2.7.5\u3067\u306f\u306a\u304f3.6.8\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3067\u4eee\u60f3\u74b0\u5883\u3067pip\u304c\u4f7f\u7528\u51fa\u6765\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002install\u7b49\u3067PermissionError\u304c\u51fa\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u307e\u305f\u3001deactivate\u3067\u4e00\u5ea6\u4eee\u60f3\u74b0\u5883\u3092\u629c\u3051\u3066\u304b\u3089\u518d\u5ea6\u4eee\u60f3\u74b0\u5883\u3092\u6709\u52b9\u306b\u3059\u308b\u3068\u3001\u4eee\u60f3\u74b0\u5883\u5185\u3067\u306fpip\u3068pip3\u306e\u30b3\u30de\u30f3\u30c9\u306f\u540c\u3058\u7269\u3092\u6307\u3059\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>get-pip.py\u306f\u4f55\u304b\u7406\u7531\u304c\u7121\u3044\u9650\u308a\u4e0a\u8a18URL\u306e\u7269\u3092\u4f7f\u7528\u3057\u3066\u304f\u3060\u3055\u3044\u3002URL\u306b3.6\u304c\u5165\u3063\u3066\u3044\u306a\u3044\u7269\u306f\u8981\u4ef6\u304cPython3.7\u4ee5\u4e0a\u3068\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u30013.6.8\u3067\u5b9f\u884c\u3057\u3066\u3082pip\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u51fa\u6765\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u4ed6\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u5411\u3051\u306e\u7269\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u4ee5\u4e0b\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002<br><a rel=\"noreferrer noopener\" href=\"https:\/\/bootstrap.pypa.io\/pip\/\" target=\"_blank\">https:\/\/bootstrap.pypa.io\/pip\/<\/a><\/p>\n\n\n\n<p>get-pip.py\u306f\u4ed6\u306e\u4eee\u60f3\u74b0\u5883\u3082\u7528\u610f\u3059\u308b\u5834\u5408\u306f\u6b8b\u3057\u3066\u304a\u304f\u3068\u826f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<br>\u3082\u3046\u4f7f\u7528\u3057\u306a\u3044\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u524a\u9664\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rm get-pip.py<\/code><\/pre>\n\n\n\n<p>\u4f59\u8ac7\u3067\u3059\u304c\u3001\u30b7\u30f3\u30fb\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u306b\u3066cron\u3084CGI\u3067\u4eee\u60f3\u74b0\u5883\u306ePython\u3092\u6271\u3046\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d1\u30b9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/home\/\u30b5\u30fc\u30d0\u30fcID\/\u4eee\u60f3\u74b0\u5883\u540d\/bin\/python<\/code><\/pre>\n\n\n\n<a href=\"https:\/\/ryo-fujinone.net\/blog\/go\/a-927\" class=\"a-banner\" rel=\"nofollow noopener\" target=\"_blank\">\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"728\" height=\"90\" alt=\"\" src=\"https:\/\/ryo-fujinone.net\/blog\/go\/a-1641\" class=\"pc\">\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"350\" height=\"160\" alt=\"\" src=\"https:\/\/ryo-fujinone.net\/blog\/go\/a-1639\" class=\"sp\">\n<\/a>\n<img loading=\"lazy\" decoding=\"async\" border=\"0\" width=\"1\" height=\"1\" src=\"https:\/\/ryo-fujinone.net\/blog\/go\/a-1783\" alt=\"\">\n","protected":false},"excerpt":{"rendered":"<p>\u5f53\u30b5\u30a4\u30c8\u304c\u5229\u7528\u3057\u3066\u3044\u308b\u30b7\u30f3\u30fb\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u306f2022\u5e7410\u6708\u6642\u70b9\u3067 Python 2.7.5\u30013.4.10\u30013.6.8 \u304c\u4f7f\u7528\u53ef\u80fd\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3001\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u6545\u306b\u6a29\u9650\u306e\u554f\u984c\u304b\u3089\u305d\u306e\u307e\u307e\u3067\u306fpip\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":726,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,11],"tags":[],"class_list":["post-663","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-rental-server"],"_links":{"self":[{"href":"https:\/\/ryo-fujinone.net\/blog\/wp-json\/wp\/v2\/posts\/663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ryo-fujinone.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ryo-fujinone.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ryo-fujinone.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ryo-fujinone.net\/blog\/wp-json\/wp\/v2\/comments?post=663"}],"version-history":[{"count":55,"href":"https:\/\/ryo-fujinone.net\/blog\/wp-json\/wp\/v2\/posts\/663\/revisions"}],"predecessor-version":[{"id":1784,"href":"https:\/\/ryo-fujinone.net\/blog\/wp-json\/wp\/v2\/posts\/663\/revisions\/1784"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ryo-fujinone.net\/blog\/wp-json\/wp\/v2\/media\/726"}],"wp:attachment":[{"href":"https:\/\/ryo-fujinone.net\/blog\/wp-json\/wp\/v2\/media?parent=663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ryo-fujinone.net\/blog\/wp-json\/wp\/v2\/categories?post=663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ryo-fujinone.net\/blog\/wp-json\/wp\/v2\/tags?post=663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}