{"id":1001987,"date":"2024-12-27T10:04:52","date_gmt":"2024-12-27T02:04:52","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1001987.html"},"modified":"2024-12-27T10:04:55","modified_gmt":"2024-12-27T02:04:55","slug":"%e5%a6%82%e4%bd%95%e5%88%a0%e9%99%a4python3-6-1","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1001987.html","title":{"rendered":"\u5982\u4f55\u5220\u9664python3.6.1"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25075933\/f5b31beb-992f-48e3-8865-00829ddda2b3.webp\" alt=\"\u5982\u4f55\u5220\u9664python3.6.1\" \/><\/p>\n<p><p> <strong>\u8981\u5220\u9664Python 3.6.1\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u5378\u8f7d\u3001\u624b\u52a8\u5220\u9664\u6587\u4ef6\u3001\u6e05\u7406\u73af\u5883\u53d8\u91cf\u3002<\/strong>\u4e0b\u9762\uff0c\u6211\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5b8c\u6210\u8fd9\u4e9b\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u5378\u8f7d<\/h3>\n<\/p>\n<p><p>\u5728\u5927\u591a\u6570\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0cPython\u901a\u5e38\u662f\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u8fdb\u884c\u5b89\u88c5\u7684\uff0c\u56e0\u6b64\uff0c\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u5378\u8f7d\u662f\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h4>1. Windows\u7cfb\u7edf<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662fWindows\u7cfb\u7edf\uff0cPython\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u201c\u6dfb\u52a0\u6216\u5220\u9664\u7a0b\u5e8f\u201d\u6765\u5378\u8f7d\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00\u201c\u63a7\u5236\u9762\u677f\u201d\u3002<\/li>\n<li>\u9009\u62e9\u201c\u7a0b\u5e8f\u548c\u529f\u80fd\u201d\u3002<\/li>\n<li>\u5728\u5217\u8868\u4e2d\u627e\u5230\u201cPython 3.6.1\u201d\u3002<\/li>\n<li>\u53f3\u952e\u70b9\u51fb\u9009\u62e9\u201c\u5378\u8f7d\u201d\uff0c\u5e76\u6309\u7167\u63d0\u793a\u5b8c\u6210\u5378\u8f7d\u8fc7\u7a0b\u3002<\/li>\n<\/ol>\n<p><h4>2. MacOS\u7cfb\u7edf<\/h4>\n<\/p>\n<p><p>\u5728MacOS\u4e0a\uff0c\u5982\u679c\u4f60\u4f7f\u7528Homebrew\u5b89\u88c5\u4e86Python\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5378\u8f7d\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">brew uninstall python@3.6<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. Linux\u7cfb\u7edf<\/h4>\n<\/p>\n<p><p>\u5728Linux\u7cfb\u7edf\u4e0a\uff0cPython\u901a\u5e38\u662f\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u5b89\u88c5\u7684\u3002\u4ee5Ubuntu\u4e3a\u4f8b\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5378\u8f7d\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt-get remove python3.6<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u624b\u52a8\u5220\u9664\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\uff0cPython\u53ef\u80fd\u662f\u901a\u8fc7\u5176\u4ed6\u65b9\u5f0f\u5b89\u88c5\u7684\uff0c\u6216\u8005\u5305\u7ba1\u7406\u5668\u672a\u80fd\u5b8c\u5168\u5378\u8f7d\u6240\u6709\u6587\u4ef6\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u624b\u52a8\u5220\u9664\u6b8b\u7559\u6587\u4ef6\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u67e5\u627ePython\u5b89\u88c5\u76ee\u5f55<\/strong>\uff1a\u901a\u5e38\uff0cPython\u5b89\u88c5\u5728<code>\/usr\/local\/bin<\/code>\u6216<code>\/usr\/bin<\/code>\u76ee\u5f55\u4e0b\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u627ePython\u8def\u5f84\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">which python3.6<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5220\u9664Python\u6587\u4ef6<\/strong>\uff1a\u627e\u5230Python\u5b89\u88c5\u76ee\u5f55\u540e\uff0c\u624b\u52a8\u5220\u9664\u76f8\u5173\u6587\u4ef6\u548c\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo rm -rf \/usr\/local\/bin\/python3.6<\/p>\n<p>sudo rm -rf \/usr\/local\/lib\/python3.6<\/p>\n<p>sudo rm -rf \/usr\/local\/include\/python3.6<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u4e09\u3001\u6e05\u7406\u73af\u5883\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>\u5728\u5378\u8f7dPython\u540e\uff0c\u786e\u4fdd\u6e05\u7406\u73af\u5883\u53d8\u91cf\uff0c\u907f\u514d\u56e0\u4e3a\u8def\u5f84\u95ee\u9898\u5bfc\u81f4\u7684\u547d\u4ee4\u51b2\u7a81\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u68c0\u67e5\u5e76\u7f16\u8f91\u73af\u5883\u53d8\u91cf<\/strong>\uff1a\u5728Windows\u4e0a\uff0c\u53ef\u4ee5\u901a\u8fc7\u7cfb\u7edf\u5c5e\u6027\u4e2d\u7684\u201c\u73af\u5883\u53d8\u91cf\u201d\u9009\u9879\u8fdb\u884c\u68c0\u67e5\u548c\u7f16\u8f91\u3002\u5728Linux\u548cMacOS\u4e0a\uff0c\u53ef\u4ee5\u7f16\u8f91<code>.bashrc<\/code>\u3001<code>.bash_profile<\/code>\u6216<code>.zshrc<\/code>\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5220\u9664Python\u8def\u5f84<\/strong>\uff1a\u786e\u4fdd\u4ece<code>PATH<\/code>\u53d8\u91cf\u4e2d\u5220\u9664\u4efb\u4f55\u4e0ePython 3.6\u76f8\u5173\u7684\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><p> \u5728Linux\u548cMacOS\u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u91cd\u65b0\u52a0\u8f7d\u914d\u7f6e\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source ~\/.bashrc<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u56db\u3001\u68c0\u67e5\u5e76\u6e05\u7406\u6b8b\u7559\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u68c0\u67e5\u662f\u5426\u6709\u4efb\u4f55\u6b8b\u7559\u7684\u914d\u7f6e\u6587\u4ef6\u6216\u5e93\u6587\u4ef6\u9700\u8981\u6e05\u7406\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u67e5\u627e\u6b8b\u7559\u6587\u4ef6<\/strong>\uff1a\u4f7f\u7528<code>find<\/code>\u547d\u4ee4\u67e5\u627e\u53ef\u80fd\u7684\u6b8b\u7559\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">find \/ -name &quot;python3.6*&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5220\u9664\u6b8b\u7559\u6587\u4ef6<\/strong>\uff1a\u6839\u636e\u9700\u8981\u5220\u9664\u4efb\u4f55\u4e0d\u518d\u4f7f\u7528\u7684\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u5b8c\u6210\u8fd9\u4e9b\u6b65\u9aa4\u540e\uff0cPython 3.6.1\u5e94\u8be5\u5df2\u88ab\u5b8c\u5168\u5378\u8f7d\u3002\u5982\u679c\u4f60\u9700\u8981\u5b89\u88c5\u5176\u4ed6\u7248\u672c\u7684Python\uff0c\u53ef\u4ee5\u6839\u636e\u9700\u8981\u91cd\u65b0\u5b89\u88c5\u3002\u786e\u4fdd\u5728\u5b89\u88c5\u65b0\u7248\u672c\u4e4b\u524d\uff0c\u6240\u6709\u76f8\u5173\u7684\u65e7\u7248\u914d\u7f6e\u548c\u6587\u4ef6\u5df2\u88ab\u6e05\u7406\uff0c\u4ee5\u907f\u514d\u6f5c\u5728\u7684\u51b2\u7a81\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u786e\u8ba4\u6211\u7684\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86Python 3.6.1\uff1f<\/strong><br \/>\u8981\u786e\u8ba4\u7cfb\u7edf\u4e2d\u662f\u5426\u5b89\u88c5\u4e86Python 3.6.1\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u6216\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python3 --version<\/code>\u6216<code>python --version<\/code>\uff0c\u5982\u679c\u663e\u793a\u7684\u7248\u672c\u53f7\u4e3a3.6.1\uff0c\u5219\u8868\u793a\u5df2\u5b89\u88c5\u8be5\u7248\u672c\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528<code>where python3<\/code>\uff08\u5728Windows\u4e0a\uff09\u6216<code>which python3<\/code>\uff08\u5728Linux\u548cMac\u4e0a\uff09\u6765\u67e5\u627ePython\u7684\u5b89\u88c5\u8def\u5f84\u3002<\/p>\n<p><strong>\u5220\u9664Python 3.6.1\u4f1a\u5f71\u54cd\u5176\u4ed6\u7a0b\u5e8f\u5417\uff1f<\/strong><br \/>\u5728\u5220\u9664Python 3.6.1\u4e4b\u524d\uff0c\u9700\u8981\u8003\u8651\u5230\u67d0\u4e9b\u4f9d\u8d56\u4e8e\u8be5\u7248\u672c\u7684\u7a0b\u5e8f\u6216\u5e93\u3002\u82e5\u6709\u5176\u4ed6\u5e94\u7528\u4f9d\u8d56\u4e8ePython 3.6.1\uff0c\u5220\u9664\u540e\u53ef\u80fd\u4f1a\u5bfc\u81f4\u8fd9\u4e9b\u5e94\u7528\u65e0\u6cd5\u6b63\u5e38\u8fd0\u884c\u3002\u5efa\u8bae\u68c0\u67e5\u5e76\u786e\u8ba4\u6ca1\u6709\u4f9d\u8d56\u5173\u7cfb\u540e\u518d\u8fdb\u884c\u5220\u9664\u3002<\/p>\n<p><strong>\u5982\u4f55\u5b89\u5168\u5730\u5220\u9664Python 3.6.1\uff1f<\/strong><br \/>\u5b89\u5168\u5220\u9664Python 3.6.1\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u64cd\u4f5c\u7cfb\u7edf\u3002\u5728Windows\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u201c\u63a7\u5236\u9762\u677f\u201d\u4e2d\u7684\u201c\u7a0b\u5e8f\u548c\u529f\u80fd\u201d\u627e\u5230Python 3.6.1\u5e76\u9009\u62e9\u5378\u8f7d\u3002\u5728Linux\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5305\u7ba1\u7406\u5668\uff0c\u6bd4\u5982\u5728Ubuntu\u4e2d\u8fd0\u884c<code>sudo apt-get remove python3.6<\/code>\u3002\u786e\u4fdd\u5728\u5220\u9664\u4e4b\u524d\u5907\u4efd\u91cd\u8981\u7684\u9879\u76ee\u548c\u6587\u4ef6\uff0c\u4ee5\u514d\u9020\u6210\u6570\u636e\u4e22\u5931\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5220\u9664Python 3.6.1\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u901a\u8fc7\u5305\u7ba1\u7406\u5668\u5378\u8f7d\u3001\u624b\u52a8\u5220\u9664\u6587\u4ef6\u3001\u6e05\u7406\u73af\u5883\u53d8\u91cf\u3002\u4e0b\u9762\uff0c\u6211\u5c06\u8be6\u7ec6 [&hellip;]","protected":false},"author":3,"featured_media":1001996,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1001987"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1001987"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1001987\/revisions"}],"predecessor-version":[{"id":1001999,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1001987\/revisions\/1001999"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1001996"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1001987"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1001987"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1001987"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}