{"id":1629,"date":"2020-09-11T10:21:20","date_gmt":"2020-09-11T02:21:20","guid":{"rendered":"http:\/\/iqotom.com\/?p=1629"},"modified":"2020-09-11T10:21:23","modified_gmt":"2020-09-11T02:21:23","slug":"%e8%a7%a3%e5%86%b3-vs-code-modulenotfounderror-no-module-named-pip","status":"publish","type":"post","link":"http:\/\/iqotom.com\/?p=1629","title":{"rendered":"\u89e3\u51b3 VS Code ModuleNotFoundError: No module named &#8216;pip&#8217;"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>\u5728\u66f4\u65b0pip\u65f6\u51fa\u73b0\u9519\u8bef\uff0c\u65e5\u5fd7\u5982\u4e0b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python\">PS E:\\VS Code\\python> pip install --upgrade pip\nWARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError(\"HTTPSConnectionPCollecting pip\n  Using cached pip-20.2.3-py2.py3-none-any.whl (1.5 MB)\nInstalling collected packages: pip\n  Attempting uninstall: pip\n    Found existing installation: pip 20.1.1\nERROR: Could not install packages due to an EnvironmentError: [WinError 5] \u62d2\u7edd\u8bbf\u95ee\u3002: 'd:\\\\program files\\\\python38\\\\scripts\\\\pip.exe'\nConsider using the `--user` option or check the permissions.\nPS E:\\VS Code\\python> pip\nTraceback (most recent call last):\n  File \"d:\\program files\\python38\\lib\\runpy.py\", line 194, in _run_module_as_main\n    return _run_code(code, main_globals, None,\n  File \"d:\\program files\\python38\\lib\\runpy.py\", line 87, in _run_code\n  File \"D:\\Program Files\\Python38\\Scripts\\pip.exe\\__main__.py\", line 4, in &lt;module>\nPS E:\\VS Code\\python> pip\nTraceback (most recent call last):\n  File \"d:\\program files\\python38\\lib\\runpy.py\", line 194, in _run_module_as_main\n    return _run_code(code, main_globals, None,\n  File \"d:\\program files\\python38\\lib\\runpy.py\", line 87, in _run_code\n    exec(code, run_globals)\nModuleNotFoundError: No module named 'pip'<\/code><\/pre>\n\n\n\n<p>\u51fa\u73b0\u8fd9\u4e2a\u95ee\u9898\u540e\u5bfc\u81f4pip\u627e\u4e0d\u5230\u4e86<\/p>\n\n\n\n<p><strong>\u53ef\u4ee5\u8fd9\u6837\u89e3\u51b3<\/strong><\/p>\n\n\n\n<p>1\u3001\u6267\u884c<code>python -m ensurepip<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python\">PS E:\\VS Code\\python> python -m ensurepip\nLooking in links: c:\\Users\\16838\\AppData\\Local\\Temp\\tmplkytwhki\nRequirement already satisfied: setuptools in d:\\program files\\python38\\lib\\site-packages (47.1.0)\nProcessing c:\\users\\16838\\appdata\\local\\temp\\tmplkytwhki\\pip-20.1.1-py2.py3-none-any.whl\nInstalling collected packages: pip\nSuccessfully installed pip-20.1.1<\/code><\/pre>\n\n\n\n<p>2\u3001\u6267\u884c<code>python -m pip install --upgrade pip<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python\">PS E:\\VS Code\\python> python -m pip install --upgrade pip\nCollecting pip\n  Using cached pip-20.2.3-py2.py3-none-any.whl (1.5 MB)\nInstalling collected packages: pip\n  Attempting uninstall: pip\n    Found existing installation: pip 20.1.1\n    Uninstalling pip-20.1.1:\n      Successfully uninstalled pip-20.1.1\nSuccessfully installed pip-20.2.3<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"836\" height=\"375\" src=\"http:\/\/iqotom.com\/wp-content\/uploads\/2020\/09\/vs_code_01.png\" alt=\"\" class=\"wp-image-1630\" srcset=\"http:\/\/iqotom.com\/wp-content\/uploads\/2020\/09\/vs_code_01.png?v=1599790487 836w, http:\/\/iqotom.com\/wp-content\/uploads\/2020\/09\/vs_code_01-300x135.png?v=1599790487 300w, http:\/\/iqotom.com\/wp-content\/uploads\/2020\/09\/vs_code_01-768x344.png?v=1599790487 768w, http:\/\/iqotom.com\/wp-content\/uploads\/2020\/09\/vs_code_01-660x296.png?v=1599790487 660w\" sizes=\"(max-width: 836px) 100vw, 836px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u89e3\u51b3 VS Code ModuleNotFoundError: No module named &#8216;pip&#8217;<\/p>\n","protected":false},"author":1,"featured_media":1631,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[81],"tags":[118],"_links":{"self":[{"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/posts\/1629"}],"collection":[{"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/iqotom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1629"}],"version-history":[{"count":2,"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/posts\/1629\/revisions"}],"predecessor-version":[{"id":1633,"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/posts\/1629\/revisions\/1633"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/iqotom.com\/index.php?rest_route=\/wp\/v2\/media\/1631"}],"wp:attachment":[{"href":"http:\/\/iqotom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/iqotom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1629"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/iqotom.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}