{"id":2061,"date":"2023-04-01T21:33:23","date_gmt":"2023-04-01T13:33:23","guid":{"rendered":"https:\/\/www.appblog.cn\/?p=2061"},"modified":"2023-04-07T06:04:40","modified_gmt":"2023-04-06T22:04:40","slug":"coexistence-of-python-27-and-python-3-under-windows","status":"publish","type":"post","link":"https:\/\/www.appblog.cn\/index.php\/2023\/04\/01\/coexistence-of-python-27-and-python-3-under-windows\/","title":{"rendered":"Windows\u4e0bPython2.7\u548cPython3\u5171\u5b58"},"content":{"rendered":"<p>Python 2.7 \u5b89\u88c5\u76ee\u5f55\uff1aC:\\Program Files\\Python27<br \/>\nPython 3.6 \u5b89\u88c5\u76ee\u5f55\uff1aC:\\Program Files\\Python36<\/p>\n<h2>\u91cd\u547d\u540dpython.exe<\/h2>\n<p><!-- more --><\/p>\n<p><code>C:\\Program Files\\Python36\\python.exe<\/code> \u91cd\u547d\u540d\u4e3a <code>C:\\Program Files\\Python36\\python3.exe<\/code><br \/>\n<code>C:\\Program Files\\Python36\\pythonw.exe<\/code> \u91cd\u547d\u540d\u4e3a <code>C:\\Program Files\\Python36\\pythonw3.exe<\/code><\/p>\n<h2>\u5b89\u88c5easy_install\u53capip<\/h2>\n<p>\u4e0b\u8f7d\u5730\u5740\uff1a<a target=\"_blank\" rel=\"noopener\" href=\"https:\/\/pypi.python.org\/pypi\/setuptools\">https:\/\/pypi.python.org\/pypi\/setuptools<\/a><\/p>\n<pre><code class=\"language-shell\">> cd C:\\Users\\yezhou\\Desktop\\setuptools-39.0.1\n> python setup.py install\n> cd C:\\Program Files\\Python27\\Scripts\n> easy_install pip\n\n> cd C:\\Users\\yezhou\\Desktop\\setuptools-39.0.1\n> python3 setup.py install\n> cd C:\\Program Files\\Python36\\Scripts\n> easy_install pip<\/code><\/pre>\n<blockquote>\n<p>\u6ce8\uff1a\u4f7f\u7528\u7ba1\u7406\u5458\u6743\u9650<\/p>\n<\/blockquote>\n<p>\u5220\u9664\uff1a<\/p>\n<ul>\n<li>C:\\Program Files\\Python27\\Scripts\\pip3.6.exe<\/li>\n<li>C:\\Program Files\\Python27\\Scripts\\pip3.6-script.py<\/li>\n<li>C:\\Program Files\\Python27\\Scripts\\pip3.exe<\/li>\n<li>C:\\Program Files\\Python27\\Scripts\\pip3-script.py<\/li>\n<\/ul>\n<h2>\u73af\u5883\u53d8\u91cf<\/h2>\n<ul>\n<li>C:\\Program Files\\Python27\\Scripts<\/li>\n<li>C:\\Program Files\\Python27<\/li>\n<li>C:\\Program Files\\Python36\\Scripts<\/li>\n<li>C:\\Program Files\\Python36<\/li>\n<\/ul>\n<blockquote>\n<p>\u6ce8\u610f\u987a\u5e8f<\/p>\n<\/blockquote>\n<h2>\u7248\u672c\u6d4b\u8bd5<\/h2>\n<pre><code class=\"language-shell\">> python -V\nPython 2.7.14\n\n> python3 -V\nPython 3.6.5\n\n> pip -V\npip 10.0.0b2 from C:\\Program Files\\Python27\\lib\\site-packages\\pip-10.0.0b2-py2.7.egg\\pip (python 2.7)\n> pip3 -V\npip 10.0.0b2 from c:\\program files\\python36\\lib\\site-packages\\pip-10.0.0b2-py3.6.egg\\pip (python 3.6)<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Python 2.7 \u5b89\u88c5\u76ee\u5f55\uff1aC:\\Program Files\\Python27 Python 3.6 \u5b89\u88c5 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[79],"tags":[],"class_list":["post-2061","post","type-post","status-publish","format-standard","hentry","category-python"],"_links":{"self":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/2061","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/comments?post=2061"}],"version-history":[{"count":0,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/posts\/2061\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/media?parent=2061"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/categories?post=2061"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appblog.cn\/index.php\/wp-json\/wp\/v2\/tags?post=2061"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}