{"id":2313,"date":"2022-06-09T17:02:06","date_gmt":"2022-06-09T14:02:06","guid":{"rendered":"https:\/\/artem.services\/?p=2311"},"modified":"2022-06-09T17:06:33","modified_gmt":"2022-06-09T14:06:33","slug":"2313","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=2313&lang=en","title":{"rendered":"\u00a0FIX ERROR \u2014 Python2: PIP fails after upgrade"},"content":{"rendered":"<p><span class=\"VIiyi\" lang=\"en\"><span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"ru\" data-phrase-index=\"0\" data-number-of-phrases=\"3\"><span class=\"Q4iAWc\">After upgrading PIP to CentOS 6, which still uses Python2.7, PIP for each command crashes with an error.<\/span><\/span><\/span><\/p>\n<p><span class=\"VIiyi\" lang=\"en\"><span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"ru\" data-phrase-index=\"2\" data-number-of-phrases=\"3\"><span class=\"Q4iAWc\">For example:<\/span><\/span><\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\npip install --upgrade pip\r\nCollecting pip\r\n  Downloading https:\/\/files.pythonhosted.org\/packages\/88\/d9\/761f0b1e0551a3559afe4d34bd9bf68fc8de3292363b3775dda39b62ce84\/pip-22.0.3.tar.gz (2.1MB)\r\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 2.1MB 544kB\/s\r\n    Complete output from command python setup.py egg_info:\r\n    Traceback (most recent call last):\r\n      File &quot;&lt;string&gt;&quot;, line 1, in &lt;module&gt;\r\n      File &quot;\/tmp\/pip-build-snCNSf\/pip\/setup.py&quot;, line 7\r\n        def read(rel_path: str) -&gt; str:\r\n                         ^\r\n    SyntaxError: invalid syntax\r\n\r\n    ----------------------------------------\r\nCommand &quot;python setup.py egg_info&quot; failed with error code 1 in \/tmp\/pip-build-snCNSf\/pip\/\r\nYou are using pip version 8.1.2, however version 22.0.3 is available.\r\nYou should consider upgrading via the &#039;pip install --upgrade pip&#039; command.\r\n<\/pre>\n<p>&nbsp;<\/p>\n<h3>Reason:<\/h3>\n<p>PIP versions above 20.3 <a href=\"https:\/\/pip.pypa.io\/en\/stable\/development\/release-process\/#python-2-support\" target=\"_blank\" rel=\"noopener\">do not support Python2.7<\/a><\/p>\n<h3><\/h3>\n<h3>Solution:<\/h3>\n<p><span class=\"VIiyi\" lang=\"en\"><span class=\"JLqJ4b ChMk0b\" data-language-for-alternatives=\"en\" data-language-to-translate-into=\"ru\" data-phrase-index=\"0\" data-number-of-phrases=\"1\"><span class=\"Q4iAWc\">Install latest supported version<\/span><\/span><\/span><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\npip install --upgrade pip==20.3\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After upgrading PIP to CentOS 6, which still uses Python2.7, PIP for each command crashes with an error. For example: &nbsp; Reason: PIP versions above 20.3 do not support Python2.7 Solution: Install latest supported version &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[357],"tags":[361,365,1433,1887],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/2313"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2313"}],"version-history":[{"count":3,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/2313\/revisions"}],"predecessor-version":[{"id":2316,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/2313\/revisions\/2316"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}