{"id":1161480,"date":"2025-01-13T19:16:56","date_gmt":"2025-01-13T11:16:56","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1161480.html"},"modified":"2025-01-13T19:16:59","modified_gmt":"2025-01-13T11:16:59","slug":"%e8%81%94%e6%83%b3%e7%94%b5%e8%84%91%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8cpython%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1161480.html","title":{"rendered":"\u8054\u60f3\u7535\u8111\u5982\u4f55\u8fd0\u884cpython\u4ee3\u7801"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25202728\/5d4f975b-9a07-4bbb-8786-777028c27c61.webp\" alt=\"\u8054\u60f3\u7535\u8111\u5982\u4f55\u8fd0\u884cpython\u4ee3\u7801\" \/><\/p>\n<p><p> <strong>\u8054\u60f3\u7535\u8111\u5982\u4f55\u8fd0\u884cPython\u4ee3\u7801\uff1a\u5b89\u88c5Python\u73af\u5883\u3001\u5b89\u88c5IDE\u3001\u7f16\u5199Python\u4ee3\u7801\u3001\u8fd0\u884cPython\u4ee3\u7801\u3001\u8c03\u8bd5Python\u4ee3\u7801<\/strong>\u3002\u5176\u4e2d\uff0c\u5b89\u88c5Python\u73af\u5883\u662f\u6700\u5173\u952e\u7684\u4e00\u6b65\u3002\u4f60\u9700\u8981\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u9002\u5408\u4f60\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\uff0c\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u8bb0\u5f97\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u65b9\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u8fd0\u884cPython\u547d\u4ee4\u3002<\/p>\n<\/p>\n<hr>\n<p><h3>\u4e00\u3001\u5b89\u88c5Python\u73af\u5883<\/h3>\n<\/p>\n<p><h4>1. \u4e0b\u8f7dPython\u5b89\u88c5\u5305<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9 (<a href=\"https:\/\/www.python.org\/\">https:\/\/www.python.org\/<\/a>) \u4e0b\u8f7dPython\u5b89\u88c5\u5305\u3002\u7f51\u7ad9\u4e0a\u4f1a\u6709\u6700\u65b0\u7248\u672c\u7684Python\u4f9b\u4f60\u4e0b\u8f7d\u3002\u5efa\u8bae\u9009\u62e9\u7a33\u5b9a\u7248\u672c\u59823.x\u7cfb\u5217\u3002<\/p>\n<\/p>\n<p><h4>2. \u5b89\u88c5Python<\/h4>\n<\/p>\n<p><p>\u53cc\u51fb\u4e0b\u8f7d\u7684\u5b89\u88c5\u5305\uff0c\u8fdb\u5165\u5b89\u88c5\u754c\u9762\u3002\u8fd9\u91cc\u6709\u51e0\u4e2a\u91cd\u8981\u7684\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u52fe\u9009\u201cAdd Python to PATH\u201d\uff0c\u8fd9\u5c06\u4f7f\u5f97\u5728\u547d\u4ee4\u884c\u4e2d\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528Python\u547d\u4ee4\u3002<\/li>\n<li>\u9009\u62e9\u201cCustomize installation\u201d\u53ef\u4ee5\u81ea\u5b9a\u4e49\u5b89\u88c5\u8def\u5f84\u548c\u7ec4\u4ef6\uff0c\u63a8\u8350\u9009\u62e9\u9ed8\u8ba4\u8bbe\u7f6e\u3002<\/li>\n<\/ul>\n<p><p>\u70b9\u51fb\u201cInstall Now\u201d\u5f00\u59cb\u5b89\u88c5\uff0c\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8f93\u5165<code>python<\/code>\u6216\u8005<code>python --version<\/code>\u6765\u9a8c\u8bc1Python\u662f\u5426\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u5b89\u88c5\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09<\/h3>\n<\/p>\n<p><p>\u867d\u7136Python\u81ea\u5e26\u4e86IDLE\uff0c\u4f46\u4e3a\u4e86\u66f4\u597d\u7684\u5f00\u53d1\u4f53\u9a8c\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u5b89\u88c5\u66f4\u4e3a\u5f3a\u5927\u7684IDE\u5982PyCharm\u3001VS Code\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1. PyCharm<\/h4>\n<\/p>\n<p><p>PyCharm\u662f\u4e00\u4e2a\u4e13\u95e8\u4e3aPython\u5f00\u53d1\u8bbe\u8ba1\u7684IDE\uff0c\u5177\u5907\u5f3a\u5927\u7684\u4ee3\u7801\u7f16\u8f91\u3001\u8c03\u8bd5\u3001\u6d4b\u8bd5\u548c\u96c6\u6210\u5de5\u5177\u3002\u4f60\u53ef\u4ee5\u4eceJetBrains\u5b98\u7f51\uff08<a href=\"https:\/\/www.jetbrains.com\/pycharm\/%EF%BC%89%E4%B8%8B%E8%BD%BD%E7%A4%BE%E5%8C%BA%E7%89%88%EF%BC%88%E5%85%8D%E8%B4%B9%EF%BC%89%E6%88%96%E4%B8%93%E4%B8%9A%E7%89%88%E3%80%82\">https:\/\/www.jetbr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ns.com\/pycharm\/\uff09\u4e0b\u8f7d\u793e\u533a\u7248\uff08\u514d\u8d39\uff09\u6216\u4e13\u4e1a\u7248\u3002<\/a><\/p>\n<\/p>\n<p><p>\u5b89\u88c5PyCharm\u540e\uff0c\u4f60\u9700\u8981\u4e3a\u5176\u914d\u7f6ePython\u89e3\u91ca\u5668\u3002\u5728\u9996\u6b21\u542f\u52a8\u65f6\uff0cPyCharm\u4f1a\u81ea\u52a8\u68c0\u6d4b\u7cfb\u7edf\u4e2d\u7684Python\u5b89\u88c5\u8def\u5f84\uff0c\u4f60\u53ea\u9700\u786e\u8ba4\u5373\u53ef\u3002<\/p>\n<\/p>\n<p><h4>2. VS Code<\/h4>\n<\/p>\n<p><p>VS Code\u662f\u7531\u5fae\u8f6f\u63a8\u51fa\u7684\u4e00\u6b3e\u8f7b\u91cf\u7ea7\u4f46\u529f\u80fd\u5f3a\u5927\u7684\u4ee3\u7801\u7f16\u8f91\u5668\u3002\u4f60\u53ef\u4ee5\u4eceVS Code\u5b98\u7f51\uff08<a href=\"https:\/\/code.visualstudio.com\/%EF%BC%89%E4%B8%8B%E8%BD%BD%E5%B9%B6%E5%AE%89%E8%A3%85%E3%80%82\">https:\/\/code.visualstudio.com\/\uff09\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002<\/a><\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9700\u8981\u5b89\u88c5Python\u6269\u5c55\u3002\u5728VS Code\u4e2d\u6253\u5f00\u6269\u5c55\u7ba1\u7406\u5668\uff0c\u641c\u7d22\u201cPython\u201d\uff0c\u70b9\u51fb\u5b89\u88c5\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u914d\u7f6ePython\u89e3\u91ca\u5668\u8def\u5f84\uff0c\u786e\u4fddVS Code\u80fd\u591f\u6b63\u786e\u8bc6\u522b\u5e76\u8fd0\u884cPython\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u7f16\u5199Python\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u5b89\u88c5\u597dPython\u73af\u5883\u548cIDE\u540e\uff0c\u5c31\u53ef\u4ee5\u5f00\u59cb\u7f16\u5199Python\u4ee3\u7801\u4e86\u3002\u65e0\u8bba\u4f60\u9009\u62e9\u4f7f\u7528PyCharm\u8fd8\u662fVS Code\uff0c\u90fd\u53ef\u4ee5\u65b0\u5efa\u4e00\u4e2aPython\u6587\u4ef6\uff08\u901a\u5e38\u4ee5\u201c.py\u201d\u7ed3\u5c3e\uff09\uff0c\u5e76\u5728\u6587\u4ef6\u4e2d\u7f16\u5199\u4f60\u7684Python\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u4f60\u53ef\u4ee5\u65b0\u5efa\u4e00\u4e2a<code>hello.py<\/code>\u6587\u4ef6\uff0c\u5199\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;Hello, world!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u8fd0\u884cPython\u4ee3\u7801<\/h3>\n<\/p>\n<p><h4>1. \u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c<\/h4>\n<\/p>\n<p><p>\u6253\u5f00\u547d\u4ee4\u884c\uff08\u53ef\u4ee5\u4f7f\u7528Windows\u81ea\u5e26\u7684\u547d\u4ee4\u63d0\u793a\u7b26\u6216PowerShell\uff09\uff0c\u5bfc\u822a\u5230\u4f60\u7684Python\u6587\u4ef6\u6240\u5728\u76ee\u5f55\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u8fd0\u884cPython\u4ee3\u7801\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">python hello.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679cPython\u5b89\u88c5\u6210\u529f\u5e76\u4e14\u6587\u4ef6\u8def\u5f84\u6b63\u786e\uff0c\u4f60\u4f1a\u770b\u5230\u8f93\u51fa\u201cHello, world!\u201d\u3002<\/p>\n<\/p>\n<p><h4>2. \u5728IDE\u4e2d\u8fd0\u884c<\/h4>\n<\/p>\n<p><p>\u5728PyCharm\u6216VS Code\u4e2d\u6253\u5f00\u4f60\u7684Python\u6587\u4ef6\uff0c\u70b9\u51fb\u8fd0\u884c\u6309\u94ae\u5373\u53ef\u8fd0\u884c\u4ee3\u7801\u3002IDE\u4f1a\u81ea\u52a8\u5728\u5185\u7f6e\u7ec8\u7aef\u4e2d\u6267\u884c\u4f60\u7684Python\u4ee3\u7801\uff0c\u5e76\u663e\u793a\u8f93\u51fa\u7ed3\u679c\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u8c03\u8bd5Python\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u8c03\u8bd5\u662f\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u4e0d\u53ef\u6216\u7f3a\u7684\u4e00\u90e8\u5206\u3002\u901a\u8fc7\u8c03\u8bd5\u53ef\u4ee5\u53d1\u73b0\u5e76\u89e3\u51b3\u4ee3\u7801\u4e2d\u7684\u9519\u8bef\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528PyCharm\u8c03\u8bd5<\/h4>\n<\/p>\n<p><p>\u5728PyCharm\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u5728\u4ee3\u7801\u884c\u53f7\u65c1\u8fb9\u70b9\u51fb\uff0c\u8bbe\u7f6e\u65ad\u70b9\u3002\u7136\u540e\u70b9\u51fb\u8c03\u8bd5\u6309\u94ae\u5f00\u59cb\u8c03\u8bd5\u3002\u8c03\u8bd5\u8fc7\u7a0b\u4e2d\uff0c\u4f60\u53ef\u4ee5\u67e5\u770b\u53d8\u91cf\u503c\uff0c\u6267\u884c\u5355\u6b65\u64cd\u4f5c\u7b49\u3002<\/p>\n<\/p>\n<p><h4>2. \u4f7f\u7528VS Code\u8c03\u8bd5<\/h4>\n<\/p>\n<p><p>\u5728VS Code\u4e2d\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7\u70b9\u51fb\u4ee3\u7801\u884c\u53f7\u65c1\u8fb9\u6765\u8bbe\u7f6e\u65ad\u70b9\u3002\u70b9\u51fb\u5de6\u4fa7\u6d3b\u52a8\u680f\u4e2d\u7684\u8c03\u8bd5\u56fe\u6807\uff0c\u7136\u540e\u70b9\u51fb\u8fd0\u884c\u548c\u8c03\u8bd5\u6309\u94ae\uff0c\u9009\u62e9Python\u6587\u4ef6\u8fdb\u884c\u8c03\u8bd5\u3002VS Code\u540c\u6837\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u8c03\u8bd5\u529f\u80fd\uff0c\u5982\u67e5\u770b\u53d8\u91cf\u3001\u8c03\u7528\u5806\u6808\u3001\u5355\u6b65\u6267\u884c\u7b49\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u5b89\u88c5\u548c\u7ba1\u7406Python\u5305<\/h3>\n<\/p>\n<p><p>Python\u7684\u5f3a\u5927\u4e4b\u5904\u5728\u4e8e\u5176\u4e30\u5bcc\u7684\u7b2c\u4e09\u65b9\u5e93\u548c\u5305\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528<code>pip<\/code>\u5de5\u5177\u6765\u5b89\u88c5\u548c\u7ba1\u7406\u8fd9\u4e9b\u5305\u3002<\/p>\n<\/p>\n<p><h4>1. \u5b89\u88c5Python\u5305<\/h4>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>pip install<\/code>\u547d\u4ee4\u6765\u5b89\u88c5\u6240\u9700\u7684Python\u5305\u3002\u4f8b\u5982\uff0c\u5b89\u88c5\u5e38\u7528\u7684NumPy\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install numpy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u7ba1\u7406Python\u5305<\/h4>\n<\/p>\n<p><p>\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u7ba1\u7406\u5df2\u5b89\u88c5\u7684Python\u5305\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u67e5\u770b\u5df2\u5b89\u88c5\u7684\u5305\uff1a<code>pip list<\/code><\/li>\n<li>\u5378\u8f7d\u5305\uff1a<code>pip uninstall \u5305\u540d<\/code><\/li>\n<li>\u66f4\u65b0\u5305\uff1a<code>pip install --upgrade \u5305\u540d<\/code><\/li>\n<\/ul>\n<p><h3>\u4e03\u3001\u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u51b3\u529e\u6cd5<\/h3>\n<\/p>\n<p><p>\u5728\u8fd0\u884cPython\u4ee3\u7801\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u53ca\u5176\u89e3\u51b3\u529e\u6cd5\u3002<\/p>\n<\/p>\n<p><h4>1. Python\u547d\u4ee4\u65e0\u6cd5\u8bc6\u522b<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165<code>python<\/code>\u547d\u4ee4\u65f6\u63d0\u793a\u65e0\u6cd5\u8bc6\u522b\uff0c\u53ef\u80fd\u662f\u56e0\u4e3aPython\u8def\u5f84\u6ca1\u6709\u6b63\u786e\u6dfb\u52a0\u5230\u7cfb\u7edfPATH\u4e2d\u3002\u4f60\u53ef\u4ee5\u624b\u52a8\u6dfb\u52a0Python\u5b89\u88c5\u8def\u5f84\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<\/p>\n<p><h4>2. \u5305\u5b89\u88c5\u5931\u8d25<\/h4>\n<\/p>\n<p><p>\u6709\u65f6\u5019\u5728\u5b89\u88c5Python\u5305\u65f6\u4f1a\u9047\u5230\u5b89\u88c5\u5931\u8d25\u7684\u60c5\u51b5\u3002\u8fd9\u53ef\u80fd\u662f\u7531\u4e8e\u7f51\u7edc\u95ee\u9898\u3001\u4f9d\u8d56\u95ee\u9898\u7b49\u3002\u4f60\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u4e0b\u89e3\u51b3\u529e\u6cd5\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u4f7f\u7528\u56fd\u5185\u955c\u50cf\u6e90\uff1a<code>pip install \u5305\u540d -i https:\/\/pypi.tuna.tsinghua.edu.cn\/simple<\/code><\/li>\n<li>\u68c0\u67e5Python\u7248\u672c\u662f\u5426\u517c\u5bb9<\/li>\n<li>\u66f4\u65b0pip\uff1a<code>python -m pip install --upgrade pip<\/code><\/li>\n<\/ul>\n<p><h4>3. \u4ee3\u7801\u8fd0\u884c\u62a5\u9519<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u5728\u8fd0\u884cPython\u4ee3\u7801\u65f6\u9047\u5230\u9519\u8bef\u63d0\u793a\uff0c\u53ef\u4ee5\u6839\u636e\u9519\u8bef\u4fe1\u606f\u5b9a\u4f4d\u95ee\u9898\u3002\u5e38\u89c1\u7684\u9519\u8bef\u5305\u62ec\u8bed\u6cd5\u9519\u8bef\u3001\u5f15\u7528\u672a\u5b9a\u4e49\u53d8\u91cf\u3001\u5305\u672a\u5b89\u88c5\u7b49\u3002<\/p>\n<\/p>\n<p><h3>\u516b\u3001Python\u4ee3\u7801\u89c4\u8303\u548c\u6700\u4f73\u5b9e\u8df5<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u7ef4\u62a4\u6027\uff0c\u9075\u5faaPython\u4ee3\u7801\u89c4\u8303\u548c\u6700\u4f73\u5b9e\u8df5\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002<\/p>\n<\/p>\n<p><h4>1. \u4ee3\u7801\u98ce\u683c<\/h4>\n<\/p>\n<p><p>\u9075\u5faaPEP 8\u7f16\u7801\u89c4\u8303\uff0c\u8fd9\u662fPython\u5b98\u65b9\u63a8\u8350\u7684\u7f16\u7801\u98ce\u683c\u6307\u5357\u3002\u5b83\u6db5\u76d6\u4e86\u4ee3\u7801\u7f29\u8fdb\u3001\u53d8\u91cf\u547d\u540d\u3001\u6ce8\u91ca\u7b49\u65b9\u9762\u7684\u89c4\u8303\u3002<\/p>\n<\/p>\n<p><h4>2. \u6a21\u5757\u5316\u548c\u51fd\u6570\u5316<\/h4>\n<\/p>\n<p><p>\u5c06\u4ee3\u7801\u62c6\u5206\u6210\u6a21\u5757\u548c\u51fd\u6570\uff0c\u4fbf\u4e8e\u4ee3\u7801\u7684\u590d\u7528\u548c\u7ef4\u62a4\u3002\u6bcf\u4e2a\u6a21\u5757\u548c\u51fd\u6570\u5e94\u8be5\u53ea\u5b8c\u6210\u4e00\u4e2a\u5355\u4e00\u7684\u529f\u80fd\u3002<\/p>\n<\/p>\n<p><h4>3. \u6ce8\u91ca\u548c\u6587\u6863<\/h4>\n<\/p>\n<p><p>\u5728\u4ee3\u7801\u4e2d\u9002\u5f53\u6dfb\u52a0\u6ce8\u91ca\uff0c\u89e3\u91ca\u4ee3\u7801\u7684\u610f\u56fe\u548c\u903b\u8f91\u3002\u540c\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528docstring\u4e3a\u6a21\u5757\u3001\u7c7b\u548c\u51fd\u6570\u7f16\u5199\u6587\u6863\uff0c\u4fbf\u4e8e\u4ed6\u4eba\u7406\u89e3\u548c\u4f7f\u7528\u3002<\/p>\n<\/p>\n<p><h3>\u4e5d\u3001\u8fdb\u9636\u5b66\u4e60\u548c\u5e94\u7528<\/h3>\n<\/p>\n<p><p>Python\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u9002\u7528\u4e8e\u5404\u79cd\u5e94\u7528\u573a\u666f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u8fdb\u9636\u5b66\u4e60\u548c\u5e94\u7528\u65b9\u5411\u3002<\/p>\n<\/p>\n<p><h4>1. \u6570\u636e\u5206\u6790<\/h4>\n<\/p>\n<p><p>Python\u5728\u6570\u636e\u5206\u6790\u9886\u57df\u6709\u7740\u5e7f\u6cdb\u7684\u5e94\u7528\u3002\u53ef\u4ee5\u5b66\u4e60\u4f7f\u7528Pandas\u3001NumPy\u3001Matplotlib\u7b49\u5e93\u8fdb\u884c\u6570\u636e\u5904\u7406\u548c\u53ef\u89c6\u5316\u3002<\/p>\n<\/p>\n<p><h4>2. Web\u5f00\u53d1<\/h4>\n<\/p>\n<p><p>Python\u4e5f\u9002\u7528\u4e8eWeb\u5f00\u53d1\u3002\u53ef\u4ee5\u5b66\u4e60\u4f7f\u7528Django\u3001Flask\u7b49Web\u6846\u67b6\u8fdb\u884cWeb\u5e94\u7528\u5f00\u53d1\u3002<\/p>\n<\/p>\n<p><h4>3. <a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a><\/h4>\n<\/p>\n<p><p>\u673a\u5668\u5b66\u4e60\u662f\u5f53\u524d\u70ed\u95e8\u7684\u7814\u7a76\u65b9\u5411\u3002\u53ef\u4ee5\u5b66\u4e60\u4f7f\u7528Scikit-learn\u3001TensorFlow\u3001Keras\u7b49\u5e93\u8fdb\u884c\u673a\u5668\u5b66\u4e60\u6a21\u578b\u7684\u6784\u5efa\u548c\u8bad\u7ec3\u3002<\/p>\n<\/p>\n<p><h3>\u5341\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5728\u8054\u60f3\u7535\u8111\u4e0a\u6210\u529f\u8fd0\u884cPython\u4ee3\u7801\u3002\u4ece\u5b89\u88c5Python\u73af\u5883\u3001\u5b89\u88c5IDE\u3001\u7f16\u5199\u548c\u8fd0\u884c\u4ee3\u7801\u5230\u8c03\u8bd5\u548c\u7ba1\u7406\u5305\uff0c\u6bcf\u4e00\u6b65\u90fd\u6709\u8be6\u7ec6\u7684\u4ecb\u7ecd\u548c\u64cd\u4f5c\u6307\u5357\u3002\u540c\u65f6\uff0c\u9075\u5faa\u4ee3\u7801\u89c4\u8303\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u638c\u63e1\u8fdb\u9636\u5b66\u4e60\u548c\u5e94\u7528\u65b9\u5411\uff0c\u53ef\u4ee5\u8fdb\u4e00\u6b65\u63d0\u5347\u4f60\u7684Python\u7f16\u7a0b\u6c34\u5e73\u3002<\/p>\n<\/p>\n<p><p>\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u5bf9\u4f60\u6709\u5e2e\u52a9\uff0c\u795d\u4f60\u5728Python\u7f16\u7a0b\u4e4b\u8def\u4e0a\u53d6\u5f97\u66f4\u5927\u7684\u6210\u5c31\uff01<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u8054\u60f3\u7535\u8111\u53ef\u4ee5\u8fd0\u884c\u54ea\u4e9b\u7248\u672c\u7684Python\uff1f<\/strong><br \/>\u8054\u60f3\u7535\u8111\u652f\u6301\u591a\u79cd\u7248\u672c\u7684Python\uff0c\u5305\u62ecPython 2.x\u548cPython 3.x\u3002\u4e3a\u4e86\u786e\u4fdd\u517c\u5bb9\u6027\u548c\u83b7\u5f97\u6700\u4f73\u7684\u529f\u80fd\uff0c\u5efa\u8bae\u4f7f\u7528\u6700\u65b0\u7684Python 3\u7248\u672c\u3002\u7528\u6237\u53ef\u4ee5\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u9002\u5408\u81ea\u5df1\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\u3002<\/p>\n<p><strong>\u5728\u8054\u60f3\u7535\u8111\u4e0a\u5982\u4f55\u5b89\u88c5Python\uff1f<\/strong><br \/>\u5728\u8054\u60f3\u7535\u8111\u4e0a\u5b89\u88c5Python\u975e\u5e38\u7b80\u5355\u3002\u7528\u6237\u53ef\u4ee5\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u9002\u5408\u5176\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\u3002\u4e0b\u8f7d\u540e\uff0c\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\uff0c\u6309\u7167\u63d0\u793a\u8fdb\u884c\u5b89\u88c5\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u52a1\u5fc5\u9009\u62e9\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u8f7b\u677e\u8bbf\u95eePython\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u8054\u60f3\u7535\u8111\u4e0a\u8fd0\u884cPython\u4ee3\u7801\uff1f<\/strong><br \/>\u8fd0\u884cPython\u4ee3\u7801\u7684\u65b9\u6cd5\u6709\u5f88\u591a\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u754c\u9762\uff08CMD\uff09\u8f93\u5165<code>python<\/code>\u547d\u4ee4\u6765\u542f\u52a8Python\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\uff0c\u76f4\u63a5\u8f93\u5165\u4ee3\u7801\u8fdb\u884c\u6d4b\u8bd5\u3002\u6b64\u5916\uff0c\u7528\u6237\u8fd8\u53ef\u4ee5\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u5982PyCharm\u3001Visual Studio Code\u6216Jupyter Notebook\u6765\u7f16\u5199\u548c\u6267\u884cPython\u4ee3\u7801\u3002\u8fd9\u4e9b\u5de5\u5177\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\uff0c\u80fd\u591f\u63d0\u9ad8\u7f16\u7a0b\u6548\u7387\u3002<\/p>\n<p><strong>\u8054\u60f3\u7535\u8111\u4e0a\u6709\u54ea\u4e9b\u63a8\u8350\u7684Python\u5f00\u53d1\u5de5\u5177\uff1f<\/strong><br \/>\u5728\u8054\u60f3\u7535\u8111\u4e0a\uff0c\u6709\u591a\u79cd\u5f00\u53d1\u5de5\u5177\u53ef\u4ee5\u7528\u4e8ePython\u7f16\u7a0b\u3002\u5e38\u7528\u7684\u5de5\u5177\u5305\u62ecPyCharm\uff0c\u5b83\u63d0\u4f9b\u5f3a\u5927\u7684\u4ee3\u7801\u8865\u5168\u548c\u8c03\u8bd5\u529f\u80fd\uff1bVisual Studio Code\uff0c\u5177\u6709\u5e7f\u6cdb\u7684\u63d2\u4ef6\u652f\u6301\uff1b\u4ee5\u53caJupyter Notebook\uff0c\u9002\u5408\u6570\u636e\u5206\u6790\u548c\u79d1\u5b66\u8ba1\u7b97\u3002\u8fd9\u4e9b\u5de5\u5177\u5404\u5177\u7279\u8272\uff0c\u7528\u6237\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u5f00\u53d1\u73af\u5883\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8054\u60f3\u7535\u8111\u5982\u4f55\u8fd0\u884cPython\u4ee3\u7801\uff1a\u5b89\u88c5Python\u73af\u5883\u3001\u5b89\u88c5IDE\u3001\u7f16\u5199Python\u4ee3\u7801\u3001\u8fd0\u884cPython\u4ee3\u7801 [&hellip;]","protected":false},"author":3,"featured_media":1161489,"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\/1161480"}],"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=1161480"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1161480\/revisions"}],"predecessor-version":[{"id":1161493,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1161480\/revisions\/1161493"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1161489"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1161480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1161480"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1161480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}