{"id":1013047,"date":"2024-12-27T11:44:38","date_gmt":"2024-12-27T03:44:38","guid":{"rendered":""},"modified":"2024-12-27T11:44:40","modified_gmt":"2024-12-27T03:44:40","slug":"%e5%a6%82%e4%bd%95%e4%b8%8b%e8%bd%bd%e5%b9%b6%e5%ae%89%e8%a3%85python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1013047.html","title":{"rendered":"\u5982\u4f55\u4e0b\u8f7d\u5e76\u5b89\u88c5python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25090612\/6f87ba6c-1d49-4214-b727-11f2a63120a0.webp\" alt=\"\u5982\u4f55\u4e0b\u8f7d\u5e76\u5b89\u88c5python\" \/><\/p>\n<p><p> <strong>\u4e0b\u8f7d\u5e76\u5b89\u88c5Python\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\u3001\u9009\u62e9\u5408\u9002\u7684\u7248\u672c\u3001\u4e0b\u8f7d\u5b89\u88c5\u5305\u3001\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002<\/strong>\u5176\u4e2d\uff0c<strong>\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9<\/strong>\u662f\u5f00\u59cb\u6574\u4e2a\u5b89\u88c5\u8fc7\u7a0b\u7684\u7b2c\u4e00\u6b65\uff0c\u786e\u4fdd\u60a8\u4ece\u5b98\u65b9\u6e20\u9053\u4e0b\u8f7d\u8f6f\u4ef6\u4ee5\u907f\u514d\u5b89\u5168\u98ce\u9669\u3002\u4ee5\u4e0b\u5c06\u8be6\u7ec6\u63cf\u8ff0\u8fd9\u4e9b\u6b65\u9aa4\uff0c\u4ee5\u5e2e\u52a9\u60a8\u987a\u5229\u5b8c\u6210Python\u7684\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u8bbf\u95eePYTHON\u5b98\u65b9\u7f51\u7ad9<\/h3>\n<\/p>\n<p><p>\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\u662f\u4e0b\u8f7dPython\u7684\u9996\u8981\u6b65\u9aa4\u3002Python\u7684\u5b98\u65b9\u7f51\u7ad9\u662fPython.org\uff0c\u63d0\u4f9b\u4e86\u6700\u65b0\u7684Python\u7248\u672c\u548c\u65e7\u7248\u672c\uff0c\u9002\u7528\u4e8e\u5404\u79cd\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5305\u62ecWindows\u3001macOS\u548cLinux\u3002<\/p>\n<\/p>\n<p><p><strong>1. \u9009\u62e9\u5408\u9002\u7684Python\u7248\u672c<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python\u5b98\u65b9\u7f51\u7ad9\u7684\u4e0b\u8f7d\u9875\u9762\uff0c\u60a8\u4f1a\u770b\u5230\u591a\u4e2a\u7248\u672c\u53ef\u4f9b\u9009\u62e9\u3002\u901a\u5e38\uff0c\u5efa\u8bae\u4e0b\u8f7d\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\uff0c\u56e0\u4e3a\u5b83\u5305\u542b\u4e86\u6700\u65b0\u7684\u529f\u80fd\u548c\u5b89\u5168\u8865\u4e01\u3002\u7136\u800c\uff0c\u67d0\u4e9b\u9879\u76ee\u53ef\u80fd\u9700\u8981\u7279\u5b9a\u7684Python\u7248\u672c\uff0c\u56e0\u6b64\u5728\u4e0b\u8f7d\u4e4b\u524d\uff0c\u8bf7\u786e\u8ba4\u9879\u76ee\u7684\u7248\u672c\u8981\u6c42\u3002<\/p>\n<\/p>\n<p><p><strong>2. \u4e86\u89e3\u4e0d\u540c\u7248\u672c\u7684\u533a\u522b<\/strong><\/p>\n<\/p>\n<p><p>Python\u6709\u4e24\u4e2a\u4e3b\u8981\u7248\u672c\uff1aPython 2\u548cPython 3\u3002Python 2\u5df2\u4e0d\u518d\u66f4\u65b0\uff0cPython 3\u662f\u5f53\u524d\u7684\u63a8\u8350\u7248\u672c\u3002\u5927\u591a\u6570\u65b0\u9879\u76ee\u548c\u5e93\u90fd\u652f\u6301Python 3\uff0c\u56e0\u6b64\u5efa\u8bae\u9009\u62e9Python 3\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4e0b\u8f7d\u9002\u5408\u7684\u5b89\u88c5\u5305<\/h3>\n<\/p>\n<p><p>\u4e0b\u8f7d\u9002\u5408\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\u7684Python\u5b89\u88c5\u5305\u662f\u5b89\u88c5\u7684\u5173\u952e\u6b65\u9aa4\u3002\u6839\u636e\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0cPython\u63d0\u4f9b\u4e0d\u540c\u683c\u5f0f\u7684\u5b89\u88c5\u5305\u3002<\/p>\n<\/p>\n<p><p><strong>1. Windows\u7cfb\u7edf<\/strong><\/p>\n<\/p>\n<p><p>\u5bf9\u4e8eWindows\u7528\u6237\uff0cPython\u63d0\u4f9b\u4e86\u4e00\u4e2a\u53ef\u6267\u884c\u7684\u5b89\u88c5\u7a0b\u5e8f\uff08.exe\u6587\u4ef6\uff09\u3002\u5728\u4e0b\u8f7d\u9875\u9762\u4e2d\uff0c\u9009\u62e9\u201cWindows installer\u201d\u5e76\u4e0b\u8f7d\u3002\u6ce8\u610f\uff0cWindows\u63d0\u4f9b32\u4f4d\u548c64\u4f4d\u7248\u672c\uff0c\u60a8\u53ef\u4ee5\u6839\u636e\u60a8\u7684\u7cfb\u7edf\u67b6\u6784\u9009\u62e9\u5408\u9002\u7684\u7248\u672c\u3002<\/p>\n<\/p>\n<p><p><strong>2. macOS\u7cfb\u7edf<\/strong><\/p>\n<\/p>\n<p><p>macOS\u7528\u6237\u53ef\u4ee5\u4e0b\u8f7d.pkg\u6587\u4ef6\uff0c\u8fd9\u4e5f\u662f\u4e00\u4e2a\u56fe\u5f62\u5316\u7684\u5b89\u88c5\u7a0b\u5e8f\u3002\u5b98\u65b9\u7f51\u7ad9\u63d0\u4f9b\u4e86\u4e13\u95e8\u9488\u5bf9macOS\u7684\u5b89\u88c5\u5305\u3002<\/p>\n<\/p>\n<p><p><strong>3. Linux\u7cfb\u7edf<\/strong><\/p>\n<\/p>\n<p><p>\u5927\u591a\u6570Linux\u53d1\u884c\u7248\u5305\u62ecPython\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5305\u7ba1\u7406\u5668\uff08\u5982apt\u3001yum\u3001dnf\u7b49\uff09\u76f4\u63a5\u5b89\u88c5\u3002\u4e5f\u53ef\u4ee5\u4ece\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u6e90\u4ee3\u7801\u8fdb\u884c\u7f16\u8bd1\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f<\/h3>\n<\/p>\n<p><p>\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u662f\u5c06Python\u5b89\u88c5\u5230\u8ba1\u7b97\u673a\u4e0a\u7684\u8fc7\u7a0b\u3002\u5728\u6b64\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u9ed8\u8ba4\u8bbe\u7f6e\u6216\u81ea\u5b9a\u4e49\u5b89\u88c5\u8bbe\u7f6e\u3002<\/p>\n<\/p>\n<p><p><strong>1. Windows\u7684\u5b89\u88c5\u8fc7\u7a0b<\/strong><\/p>\n<\/p>\n<p><p>\u53cc\u51fb\u4e0b\u8f7d\u7684.exe\u6587\u4ef6\u4ee5\u542f\u52a8\u5b89\u88c5\u7a0b\u5e8f\u3002\u5728\u5b89\u88c5\u754c\u9762\u4e2d\uff0c\u786e\u4fdd\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u5c06\u81ea\u52a8\u5c06Python\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u4f7f\u5176\u5728\u547d\u4ee4\u884c\u4e2d\u53ef\u7528\u3002\u7136\u540e\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u201cInstall Now\u201d\u8fdb\u884c\u5feb\u901f\u5b89\u88c5\uff0c\u6216\u9009\u62e9\u201cCustomize installation\u201d\u4ee5\u81ea\u5b9a\u4e49\u5b89\u88c5\u4f4d\u7f6e\u548c\u7ec4\u4ef6\u3002<\/p>\n<\/p>\n<p><p><strong>2. macOS\u7684\u5b89\u88c5\u8fc7\u7a0b<\/strong><\/p>\n<\/p>\n<p><p>\u53cc\u51fb.pkg\u6587\u4ef6\u5e76\u6309\u7167\u5b89\u88c5\u5411\u5bfc\u5b8c\u6210\u5b89\u88c5\u3002\u5b89\u88c5\u8fc7\u7a0b\u76f8\u5bf9\u7b80\u5355\uff0c\u4e3b\u8981\u662f\u9009\u62e9\u5b89\u88c5\u4f4d\u7f6e\u548c\u63a5\u53d7\u8bb8\u53ef\u534f\u8bae\u3002<\/p>\n<\/p>\n<p><p><strong>3. Linux\u7684\u5b89\u88c5\u8fc7\u7a0b<\/strong><\/p>\n<\/p>\n<p><p>\u5728Linux\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u5305\u7ba1\u7406\u5668\u6765\u5b89\u88c5Python\u3002\u4ee5Debian\u548cUbuntu\u4e3a\u4f8b\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5Python\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt update<\/p>\n<p>sudo apt install python3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5bf9\u4e8eRed Hat\u548cCentOS\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo yum install python3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u4f7f\u5f97Python\u5728\u547d\u4ee4\u884c\u4e2d\u53ef\u7528\uff0c\u662f\u786e\u4fdd\u5b89\u88c5\u6210\u529f\u7684\u91cd\u8981\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><p><strong>1. Windows\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u914d\u7f6e<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u672a\u52fe\u9009\u201cAdd Python to PATH\u201d\uff0c\u60a8\u9700\u8981\u624b\u52a8\u6dfb\u52a0Python\u5230\u73af\u5883\u53d8\u91cf\u3002\u53f3\u952e\u70b9\u51fb\u201c\u6b64\u7535\u8111\u201d -&gt; \u201c\u5c5e\u6027\u201d -&gt; \u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d -&gt; \u201c\u73af\u5883\u53d8\u91cf\u201d\uff0c\u7136\u540e\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u4e2d\u627e\u5230\u201cPath\u201d\uff0c\u70b9\u51fb\u201c\u7f16\u8f91\u201d\uff0c\u5c06Python\u7684\u5b89\u88c5\u8def\u5f84\u6dfb\u52a0\u5230Path\u4e2d\u3002<\/p>\n<\/p>\n<p><p><strong>2. macOS\u548cLinux\u7684\u73af\u5883\u53d8\u91cf\u914d\u7f6e<\/strong><\/p>\n<\/p>\n<p><p>macOS\u548cLinux\u901a\u5e38\u4f1a\u81ea\u52a8\u5c06Python\u6dfb\u52a0\u5230\u73af\u5883\u53d8\u91cf\u4e2d\u3002\u5982\u679c\u6ca1\u6709\uff0c\u60a8\u53ef\u4ee5\u7f16\u8f91<code>.bashrc<\/code>\u6216<code>.zshrc<\/code>\u6587\u4ef6\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">export PATH=&quot;\/usr\/local\/bin\/python3:$PATH&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u9a8c\u8bc1\u5b89\u88c5<\/h3>\n<\/p>\n<p><p>\u9a8c\u8bc1\u5b89\u88c5\u786e\u4fddPython\u5df2\u6b63\u786e\u5b89\u88c5\uff0c\u5e76\u53ef\u4ee5\u6b63\u5e38\u8fd0\u884c\u3002\u6253\u5f00\u547d\u4ee4\u884c\uff08Windows\u7684\u547d\u4ee4\u63d0\u793a\u7b26\u3001macOS\u7684\u7ec8\u7aef\u3001Linux\u7684\u7ec8\u7aef\uff09\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6216<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u5b89\u88c5\u6210\u529f\uff0c\u60a8\u5c06\u770b\u5230\u5b89\u88c5\u7684Python\u7248\u672c\u53f7\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u5b89\u88c5\u5e38\u7528\u7684PYTHON\u5305\u7ba1\u7406\u5668<\/h3>\n<\/p>\n<p><p>Python\u7684\u5305\u7ba1\u7406\u5668pip\u662f\u5b89\u88c5\u548c\u7ba1\u7406Python\u5e93\u7684\u5de5\u5177\u3002\u901a\u5e38\uff0c\u5728\u5b89\u88c5Python\u65f6\uff0cpip\u4f1a\u81ea\u52a8\u5b89\u88c5\u3002\u5982\u679c\u6ca1\u6709\uff0c\u60a8\u53ef\u4ee5\u624b\u52a8\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><p><strong>1. \u4f7f\u7528pip\u5b89\u88c5Python\u5e93<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u4f7f\u7528pip\u5b89\u88c5Python\u5e93\u7684\u547d\u4ee4\u4e3a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install package_name<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u8981\u5b89\u88c5requests\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>2. \u5347\u7ea7pip<\/strong><\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u786e\u4fddpip\u7684\u529f\u80fd\u548c\u5b89\u5168\u6027\uff0c\u5efa\u8bae\u5b9a\u671f\u5347\u7ea7pip\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install --upgrade pip<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e03\u3001\u5b89\u88c5\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\uff0c\u60a8\u53ef\u4ee5\u5b89\u88c5\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\uff0c\u5982PyCharm\u3001VSCode\u6216Jupyter Notebook\u3002<\/p>\n<\/p>\n<p><p><strong>1. PyCharm<\/strong><\/p>\n<\/p>\n<p><p>PyCharm\u662fJetBr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ns\u516c\u53f8\u5f00\u53d1\u7684Python IDE\uff0c\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u4ee3\u7801\u5206\u6790\u5de5\u5177\u548c\u8c03\u8bd5\u529f\u80fd\u3002\u60a8\u53ef\u4ee5\u4ecePyCharm\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002<\/p>\n<\/p>\n<p><p><strong>2. VSCode<\/strong><\/p>\n<\/p>\n<p><p>Visual Studio Code\u662f\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u7684\u5f00\u6e90IDE\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u3002\u901a\u8fc7\u5b89\u88c5Python\u6269\u5c55\uff0c\u53ef\u4ee5\u8f7b\u677e\u4f7f\u7528VSCode\u8fdb\u884cPython\u5f00\u53d1\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001\u89e3\u51b3\u5b89\u88c5\u4e2d\u53ef\u80fd\u9047\u5230\u7684\u95ee\u9898<\/h3>\n<\/p>\n<p><p>\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n<\/p>\n<p><p><strong>1. Python\u672a\u6dfb\u52a0\u5230PATH<\/strong><\/p>\n<\/p>\n<p><p>\u786e\u4fdd\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u9009\u62e9\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u6216\u624b\u52a8\u5c06Python\u6dfb\u52a0\u5230\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<\/p>\n<p><p><strong>2. \u6743\u9650\u95ee\u9898<\/strong><\/p>\n<\/p>\n<p><p>\u5728Windows\u4e2d\uff0c\u53ef\u80fd\u9700\u8981\u4ee5\u7ba1\u7406\u5458\u6743\u9650\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3002\u5728macOS\u548cLinux\u4e2d\uff0c\u4f7f\u7528<code>sudo<\/code>\u547d\u4ee4\u63d0\u5347\u6743\u9650\u3002<\/p>\n<\/p>\n<p><p><strong>3. \u7248\u672c\u51b2\u7a81<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u7cfb\u7edf\u4e2d\u5df2\u5b89\u88c5\u591a\u4e2aPython\u7248\u672c\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u51b2\u7a81\u3002\u4f7f\u7528\u7248\u672c\u7ba1\u7406\u5de5\u5177\u5982pyenv\u53ef\u4ee5\u6709\u6548\u7ba1\u7406\u591a\u4e2aPython\u7248\u672c\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u5c06\u80fd\u591f\u6210\u529f\u4e0b\u8f7d\u5e76\u5b89\u88c5Python\uff0c\u5e76\u5f00\u59cb\u4f7f\u7528\u5b83\u8fdb\u884c\u5f00\u53d1\u3002\u65e0\u8bba\u60a8\u662f\u521d\u5b66\u8005\u8fd8\u662f\u7ecf\u9a8c\u4e30\u5bcc\u7684\u5f00\u53d1\u8005\uff0cPython\u7684\u5f3a\u5927\u529f\u80fd\u548c\u793e\u533a\u652f\u6301\u90fd\u80fd\u4e3a\u60a8\u7684\u9879\u76ee\u63d0\u4f9b\u5e2e\u52a9\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u786e\u5b9a\u6211\u7684\u8ba1\u7b97\u673a\u662f\u5426\u652f\u6301Python\u7684\u5b89\u88c5\uff1f<\/strong><br \/>\u5728\u4e0b\u8f7dPython\u4e4b\u524d\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u67e5\u770b\u64cd\u4f5c\u7cfb\u7edf\u7684\u7248\u672c\u4fe1\u606f\u6765\u786e\u8ba4\u517c\u5bb9\u6027\u3002Python\u652f\u6301\u591a\u4e2a\u5e73\u53f0\uff0c\u5305\u62ecWindows\u3001macOS\u548cLinux\u3002\u786e\u4fdd\u60a8\u7684\u64cd\u4f5c\u7cfb\u7edf\u662f\u6700\u65b0\u7248\u672c\uff0c\u5e76\u6ee1\u8db3Python\u7684\u7cfb\u7edf\u8981\u6c42\uff0c\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u7684\u95ee\u9898\u3002<\/p>\n<p><strong>\u4e0b\u8f7dPython\u65f6\u5e94\u8be5\u9009\u62e9\u54ea\u4e2a\u7248\u672c\uff1f<\/strong><br \/>\u5728\u4e0b\u8f7d\u9875\u9762\u4e2d\uff0c\u901a\u5e38\u4f1a\u63d0\u4f9b\u591a\u4e2a\u7248\u672c\u7684Python\u3002\u5efa\u8bae\u7528\u6237\u9009\u62e9\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\uff0c\u56e0\u4e3a\u5b83\u5305\u542b\u6700\u65b0\u7684\u529f\u80fd\u548c\u5b89\u5168\u66f4\u65b0\u3002\u6b64\u5916\uff0c\u5bf9\u4e8e\u65b0\u624b\u7528\u6237\uff0c\u9009\u62e9Python 3.x\u7248\u672c\u901a\u5e38\u66f4\u4e3a\u5408\u9002\uff0c\u56e0\u4e3aPython 2.x\u5df2\u7ecf\u505c\u6b62\u652f\u6301\uff0c\u529f\u80fd\u548c\u5e93\u7684\u517c\u5bb9\u6027\u4e5f\u66f4\u5dee\u3002<\/p>\n<p><strong>\u5b89\u88c5Python\u540e\uff0c\u6211\u5982\u4f55\u9a8c\u8bc1\u5176\u662f\u5426\u6210\u529f\u5b89\u88c5\uff1f<\/strong><br \/>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u5728\u547d\u4ee4\u884c\uff08Windows\u7528\u6237\u4f7f\u7528cmd\uff0cmacOS\u548cLinux\u7528\u6237\u4f7f\u7528Terminal\uff09\u4e2d\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u6765\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002\u5982\u679c\u663e\u793a\u51faPython\u7684\u7248\u672c\u53f7\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002\u6b64\u5916\uff0c\u7528\u6237\u8fd8\u53ef\u4ee5\u5c1d\u8bd5\u8fd0\u884c\u4e00\u4e2a\u7b80\u5355\u7684Python\u811a\u672c\uff0c\u786e\u4fdd\u4e00\u5207\u6b63\u5e38\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4e0b\u8f7d\u5e76\u5b89\u88c5Python\u7684\u6b65\u9aa4\u5305\u62ec\uff1a\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\u3001\u9009\u62e9\u5408\u9002\u7684\u7248\u672c\u3001\u4e0b\u8f7d\u5b89\u88c5\u5305\u3001\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3001\u914d\u7f6e\u73af\u5883 [&hellip;]","protected":false},"author":3,"featured_media":1013053,"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\/1013047"}],"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=1013047"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1013047\/revisions"}],"predecessor-version":[{"id":1013055,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1013047\/revisions\/1013055"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1013053"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1013047"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1013047"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1013047"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}