{"id":1061085,"date":"2024-12-31T15:39:52","date_gmt":"2024-12-31T07:39:52","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1061085.html"},"modified":"2024-12-31T15:39:55","modified_gmt":"2024-12-31T07:39:55","slug":"%e7%94%b5%e8%84%91%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8c%e8%87%aa%e5%b7%b1%e7%bc%96%e5%86%99%e7%9a%84python%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1061085.html","title":{"rendered":"\u7535\u8111\u5982\u4f55\u8fd0\u884c\u81ea\u5df1\u7f16\u5199\u7684python\u7a0b\u5e8f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/67a5f372-93d3-4165-824f-f6e762a1bf07.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"\u7535\u8111\u5982\u4f55\u8fd0\u884c\u81ea\u5df1\u7f16\u5199\u7684python\u7a0b\u5e8f\" \/><\/p>\n<p><p> <strong>\u7535\u8111\u8fd0\u884c\u81ea\u5df1\u7f16\u5199\u7684Python\u7a0b\u5e8f\u9700\u8981\u5b89\u88c5Python\u89e3\u91ca\u5668\u3001\u7f16\u5199\u4ee3\u7801\u3001\u4fdd\u5b58\u4e3a.py\u6587\u4ef6\u3001\u4f7f\u7528\u547d\u4ee4\u884c\u8fd0\u884c\u3001\u8c03\u8bd5\u548c\u4f18\u5316<\/strong>\u3002\u5176\u4e2d\uff0c\u5b89\u88c5Python\u89e3\u91ca\u5668\u662f\u6700\u57fa\u7840\u7684\u6b65\u9aa4\uff0c\u4e5f\u662f\u6574\u4e2a\u8fc7\u7a0b\u7684\u5173\u952e\u3002Python\u89e3\u91ca\u5668\u8d1f\u8d23\u8bfb\u53d6\u548c\u6267\u884cPython\u4ee3\u7801\uff0c\u6ca1\u6709\u5b83\uff0c\u7535\u8111\u65e0\u6cd5\u8bc6\u522b\u548c\u6267\u884cPython\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5Python\u89e3\u91ca\u5668  <\/p>\n<\/p>\n<p><p>Python\u89e3\u91ca\u5668\u662f\u8fd0\u884cPython\u7a0b\u5e8f\u7684\u57fa\u7840\uff0c\u4ee5\u4e0b\u662f\u8be6\u7ec6\u6b65\u9aa4\uff1a  <\/p>\n<\/p>\n<ol>\n<li>\u8bbf\u95eePython\u5b98\u7f51\uff08<a href=\"https:\/\/www.python.org\/%EF%BC%89%EF%BC%8C%E4%B8%8B%E8%BD%BD%E9%80%82%E7%94%A8%E4%BA%8E%E8%87%AA%E5%B7%B1%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84Python%E5%AE%89%E8%A3%85%E5%8C%85%E3%80%82\">https:\/\/www.python.org\/\uff09\uff0c\u4e0b\u8f7d\u9002\u7528\u4e8e\u81ea\u5df1\u64cd\u4f5c\u7cfb\u7edf\u7684Python\u5b89\u88c5\u5305\u3002<\/a>  <\/li>\n<li>\u8fd0\u884c\u5b89\u88c5\u5305\uff0c\u6309\u7167\u63d0\u793a\u5b8c\u6210\u5b89\u88c5\uff0c\u6ce8\u610f\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u8c03\u7528Python\u3002  <\/li>\n<li>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\uff08Windows\u4e0b\u662fcmd\uff0cmacOS\u548cLinux\u4e0b\u662f\u7ec8\u7aef\uff09\uff0c\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\uff0c\u5982\u679c\u663e\u793aPython\u7248\u672c\u53f7\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u7f16\u5199Python\u4ee3\u7801  <\/p>\n<\/p>\n<p><p>\u7f16\u5199Python\u4ee3\u7801\u53ef\u4ee5\u4f7f\u7528\u5404\u79cd\u6587\u672c\u7f16\u8f91\u5668\u6216\u8005IDE\uff08\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff09\u3002\u5e38\u89c1\u7684\u6709\uff1a  <\/p>\n<\/p>\n<ol>\n<li><strong>\u6587\u672c\u7f16\u8f91\u5668<\/strong>\uff1a\u5982Notepad++\u3001Sublime Text\u3001Visual Studio Code\u7b49\uff0c\u8fd9\u4e9b\u5de5\u5177\u8f7b\u91cf\u4e14\u5bb9\u6613\u4e0a\u624b\uff0c\u9002\u5408\u521d\u5b66\u8005\u3002  <\/li>\n<li><strong>IDE<\/strong>\uff1a\u5982PyCharm\u3001Eclipse+PyDev\u7b49\uff0c\u8fd9\u4e9b\u5de5\u5177\u529f\u80fd\u5f3a\u5927\uff0c\u9002\u5408\u5927\u578b\u9879\u76ee\u5f00\u53d1\u3002<\/li>\n<\/ol>\n<p><p>\u65e0\u8bba\u4f7f\u7528\u54ea\u79cd\u5de5\u5177\uff0c\u7f16\u5199\u4ee3\u7801\u540e\u90fd\u9700\u8981\u4fdd\u5b58\u4e3a.py\u6587\u4ef6\u3002\u4f8b\u5982\uff0c\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684Python\u7a0b\u5e8f\u5982\u4e0b\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><p>\u5c06\u4ee5\u4e0a\u4ee3\u7801\u4fdd\u5b58\u4e3a<code>hello.py<\/code>\u3002  <\/p>\n<\/p>\n<p><p>\u4e09\u3001\u4fdd\u5b58\u4e3a.py\u6587\u4ef6  <\/p>\n<\/p>\n<p><p>\u5728\u7f16\u5199\u597dPython\u4ee3\u7801\u540e\uff0c\u9700\u8981\u5c06\u6587\u4ef6\u4fdd\u5b58\u4e3a.py\u6269\u5c55\u540d\uff0c\u4ee5\u4fbfPython\u89e3\u91ca\u5668\u80fd\u591f\u8bc6\u522b\u548c\u6267\u884c\u3002\u4fdd\u5b58\u6587\u4ef6\u65f6\uff0c\u9009\u62e9\u6587\u4ef6\u7c7b\u578b\u4e3a\u201c\u6240\u6709\u6587\u4ef6\u201d\uff0c\u7136\u540e\u5728\u6587\u4ef6\u540d\u540e\u6dfb\u52a0.py\u6269\u5c55\u540d\u3002\u4f8b\u5982\uff0c\u5c06\u4e4b\u524d\u7684\u4ee3\u7801\u4fdd\u5b58\u4e3a<code>hello.py<\/code>\u3002  <\/p>\n<\/p>\n<p><p>\u56db\u3001\u4f7f\u7528\u547d\u4ee4\u884c\u8fd0\u884cPython\u7a0b\u5e8f  <\/p>\n<\/p>\n<p><p>\u5728\u4fdd\u5b58\u597dPython\u4ee3\u7801\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8fd0\u884c\u7a0b\u5e8f\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a  <\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\uff08Windows\u4e0b\u662fcmd\uff0cmacOS\u548cLinux\u4e0b\u662f\u7ec8\u7aef\uff09\u3002  <\/li>\n<li>\u4f7f\u7528<code>cd<\/code>\u547d\u4ee4\u5bfc\u822a\u5230\u4fdd\u5b58Python\u6587\u4ef6\u7684\u76ee\u5f55\u3002\u4f8b\u5982\uff0c\u5982\u679cPython\u6587\u4ef6\u4fdd\u5b58\u5728\u684c\u9762\uff0c\u53ef\u4ee5\u8f93\u5165\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-bash\">cd Desktop<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li>\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u8fd0\u884cPython\u7a0b\u5e8f\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-bash\">python hello.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u770b\u5230\u201cHello, World!\u201d\u7684\u8f93\u51fa\uff0c\u8bf4\u660ePython\u7a0b\u5e8f\u8fd0\u884c\u6210\u529f\u3002  <\/p>\n<\/p>\n<p><p>\u4e94\u3001\u8c03\u8bd5\u548c\u4f18\u5316  <\/p>\n<\/p>\n<p><p>\u5728\u8fd0\u884cPython\u7a0b\u5e8f\u7684\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u9519\u8bef\u548c\u95ee\u9898\u3002\u6b64\u65f6\u9700\u8981\u8fdb\u884c\u8c03\u8bd5\u548c\u4f18\u5316\uff1a  <\/p>\n<\/p>\n<ol>\n<li><strong>\u8c03\u8bd5<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528print\u8bed\u53e5\u8f93\u51fa\u53d8\u91cf\u503c\uff0c\u6216\u8005\u4f7f\u7528Python\u5185\u7f6e\u7684pdb\u8c03\u8bd5\u5668\u8fdb\u884c\u9010\u6b65\u8c03\u8bd5\u3002  <\/li>\n<li><strong>\u4f18\u5316<\/strong>\uff1a\u4f18\u5316\u4ee3\u7801\u4ee5\u63d0\u9ad8\u6027\u80fd\uff0c\u53ef\u4ee5\u4f7f\u7528\u66f4\u9ad8\u6548\u7684\u6570\u636e\u7ed3\u6784\u548c\u7b97\u6cd5\uff0c\u6216\u8005\u4f7f\u7528Python\u7684\u5185\u7f6e\u6a21\u5757\u8fdb\u884c\u4f18\u5316\u3002<\/li>\n<\/ol>\n<p><p>\u5728\u4f18\u5316\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u5de5\u5177\u548c\u65b9\u6cd5\uff1a  <\/p>\n<\/p>\n<ol>\n<li><strong>\u6027\u80fd\u5206\u6790\u5de5\u5177<\/strong>\uff1a\u5982cProfile\u3001line_profiler\u7b49\uff0c\u53ef\u4ee5\u5206\u6790\u4ee3\u7801\u7684\u6027\u80fd\u74f6\u9888\u3002  <\/li>\n<li><strong>\u4ee3\u7801\u4f18\u5316\u6280\u5de7<\/strong>\uff1a\u5982\u907f\u514d\u4e0d\u5fc5\u8981\u7684\u5faa\u73af\u3001\u4f7f\u7528\u751f\u6210\u5668\u4ee3\u66ff\u5217\u8868\u3001\u4f7f\u7528\u5185\u7f6e\u51fd\u6570\u4ee3\u66ff\u81ea\u5b9a\u4e49\u51fd\u6570\u7b49\u3002<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u9009\u62e9\u5408\u9002\u7684Python\u7248\u672c  <\/p>\n<\/p>\n<p><p>\u5728\u8fd0\u884cPython\u7a0b\u5e8f\u65f6\uff0c\u9009\u62e9\u5408\u9002\u7684Python\u7248\u672c\u4e5f\u5f88\u91cd\u8981\u3002Python\u6709\u591a\u4e2a\u7248\u672c\uff0c\u4e3b\u8981\u5206\u4e3aPython 2\u548cPython 3\u4e24\u4e2a\u7cfb\u5217\u3002Python 2\u5df2\u7ecf\u505c\u6b62\u66f4\u65b0\uff0c\u5efa\u8bae\u4f7f\u7528Python 3\u3002  <\/p>\n<\/p>\n<ol>\n<li><strong>\u68c0\u67e5Python\u7248\u672c<\/strong>\uff1a\u4f7f\u7528<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u547d\u4ee4\u68c0\u67e5\u5f53\u524d\u5b89\u88c5\u7684Python\u7248\u672c\u3002  <\/li>\n<li><strong>\u5b89\u88c5\u591a\u4e2a\u7248\u672c<\/strong>\uff1a\u53ef\u4ee5\u540c\u65f6\u5b89\u88c5\u591a\u4e2a\u7248\u672c\u7684Python\uff0c\u901a\u8fc7\u547d\u4ee4\u884c\u5207\u6362\u4f7f\u7528\u3002\u4f8b\u5982\uff0c\u4f7f\u7528pyenv\u7ba1\u7406\u591a\u4e2aPython\u7248\u672c\u3002  <\/li>\n<li><strong>\u4f7f\u7528\u865a\u62df\u73af\u5883<\/strong>\uff1a\u901a\u8fc7virtualenv\u6216venv\u521b\u5efa\u865a\u62df\u73af\u5883\uff0c\u9694\u79bb\u4e0d\u540c\u9879\u76ee\u7684\u4f9d\u8d56\u548cPython\u7248\u672c\u3002<\/li>\n<\/ol>\n<p><p>\u4e03\u3001\u4f7f\u7528Python\u5305\u548c\u6a21\u5757  <\/p>\n<\/p>\n<p><p>Python\u751f\u6001\u7cfb\u7edf\u4e30\u5bcc\uff0c\u5305\u542b\u5927\u91cf\u7684\u7b2c\u4e09\u65b9\u5305\u548c\u6a21\u5757\uff0c\u53ef\u4ee5\u5927\u5927\u7b80\u5316\u5f00\u53d1\u5de5\u4f5c\u3002\u4f7f\u7528\u7b2c\u4e09\u65b9\u5305\u548c\u6a21\u5757\u9700\u8981\u5148\u5b89\u88c5\u5305\u7ba1\u7406\u5de5\u5177pip\u3002  <\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5pip<\/strong>\uff1a\u5982\u679c\u5b89\u88c5Python\u65f6\u5df2\u7ecf\u52fe\u9009\u4e86\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u4e00\u822c\u4f1a\u81ea\u52a8\u5b89\u88c5pip\u3002\u53ef\u4ee5\u901a\u8fc7<code>pip --version<\/code>\u547d\u4ee4\u68c0\u67e5pip\u662f\u5426\u5b89\u88c5\u6210\u529f\u3002  <\/li>\n<li><strong>\u5b89\u88c5\u7b2c\u4e09\u65b9\u5305<\/strong>\uff1a\u4f7f\u7528pip\u5b89\u88c5\u7b2c\u4e09\u65b9\u5305\uff0c\u4f8b\u5982\u5b89\u88c5requests\u5305\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-bash\">pip install requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li><strong>\u5bfc\u5165\u548c\u4f7f\u7528\u5305<\/strong>\uff1a\u5728Python\u4ee3\u7801\u4e2d\u5bfc\u5165\u548c\u4f7f\u7528\u7b2c\u4e09\u65b9\u5305\uff0c\u4f8b\u5982\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import requests<\/p>\n<p>response = requests.get(&#39;https:\/\/www.example.com&#39;)<\/p>\n<p>print(response.text)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u516b\u3001\u4f7f\u7528IDE\u63d0\u9ad8\u5f00\u53d1\u6548\u7387  <\/p>\n<\/p>\n<p><p>\u4f7f\u7528IDE\u53ef\u4ee5\u5927\u5927\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002IDE\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\uff0c\u4f8b\u5982\u4ee3\u7801\u8865\u5168\u3001\u8bed\u6cd5\u68c0\u67e5\u3001\u8c03\u8bd5\u3001\u7248\u672c\u63a7\u5236\u7b49\u3002\u4ee5\u4e0b\u662f\u5e38\u7528\u7684Python IDE\uff1a  <\/p>\n<\/p>\n<ol>\n<li><strong>PyCharm<\/strong>\uff1a\u529f\u80fd\u5f3a\u5927\uff0c\u652f\u6301\u4ee3\u7801\u8865\u5168\u3001\u8c03\u8bd5\u3001\u7248\u672c\u63a7\u5236\u7b49\uff0c\u9002\u5408\u5927\u578b\u9879\u76ee\u5f00\u53d1\u3002  <\/li>\n<li><strong>Visual Studio Code<\/strong>\uff1a\u8f7b\u91cf\u4e14\u529f\u80fd\u5f3a\u5927\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u901a\u8fc7\u63d2\u4ef6\u6269\u5c55\u529f\u80fd\u3002  <\/li>\n<li><strong>Jupyter Notebook<\/strong>\uff1a\u9002\u5408\u6570\u636e\u5206\u6790\u548c\u79d1\u5b66\u8ba1\u7b97\uff0c\u652f\u6301\u4ea4\u4e92\u5f0f\u7f16\u7a0b\u548c\u53ef\u89c6\u5316\u3002<\/li>\n<\/ol>\n<p><p>\u5728\u4f7f\u7528IDE\u65f6\uff0c\u53ef\u4ee5\u6839\u636e\u9700\u8981\u914d\u7f6e\u548c\u4f18\u5316\u5f00\u53d1\u73af\u5883\u3002\u4f8b\u5982\uff0c\u914d\u7f6e\u865a\u62df\u73af\u5883\u3001\u5b89\u88c5\u5fc5\u8981\u7684\u63d2\u4ef6\u3001\u8bbe\u7f6e\u4ee3\u7801\u98ce\u683c\u7b49\u3002  <\/p>\n<\/p>\n<p><p>\u4e5d\u3001\u90e8\u7f72\u548c\u53d1\u5e03Python\u7a0b\u5e8f  <\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u5b8c\u6210Python\u7a0b\u5e8f\u540e\uff0c\u53ef\u4ee5\u5c06\u7a0b\u5e8f\u90e8\u7f72\u548c\u53d1\u5e03\u5230\u670d\u52a1\u5668\u6216\u8005\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\u3002  <\/p>\n<\/p>\n<ol>\n<li><strong>\u90e8\u7f72\u5230\u670d\u52a1\u5668<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528ssh\u8fde\u63a5\u5230\u670d\u52a1\u5668\uff0c\u5c06Python\u7a0b\u5e8f\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u5e76\u8fd0\u884c\u3002\u4f8b\u5982\uff0c\u5c06Python\u7a0b\u5e8f\u90e8\u7f72\u5230\u4e91\u670d\u52a1\u5668\u3002  <\/li>\n<li><strong>\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6<\/strong>\uff1a\u4f7f\u7528\u5de5\u5177\u5982PyInstaller\u3001cx_Freeze\u7b49\uff0c\u5c06Python\u7a0b\u5e8f\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u65b9\u4fbf\u5206\u53d1\u548c\u8fd0\u884c\u3002\u4f8b\u5982\uff0c\u4f7f\u7528PyInstaller\u6253\u5305\uff1a<\/li>\n<\/ol>\n<p><pre><code class=\"language-bash\">pyinstaller --onefile hello.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6253\u5305\u5b8c\u6210\u540e\uff0c\u4f1a\u751f\u6210\u4e00\u4e2a\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u53ef\u4ee5\u5728\u6ca1\u6709Python\u73af\u5883\u7684\u673a\u5668\u4e0a\u8fd0\u884c\u3002  <\/p>\n<\/p>\n<p><p>\u5341\u3001\u6301\u7eed\u5b66\u4e60\u548c\u63d0\u5347  <\/p>\n<\/p>\n<p><p>Python\u662f\u4e00\u95e8\u4e0d\u65ad\u53d1\u5c55\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u6301\u7eed\u5b66\u4e60\u548c\u63d0\u5347\u662f\u975e\u5e38\u91cd\u8981\u7684\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u5b66\u4e60\u548c\u63d0\u5347\u7684\u5efa\u8bae\uff1a  <\/p>\n<\/p>\n<ol>\n<li><strong>\u5b66\u4e60\u5b98\u65b9\u6587\u6863<\/strong>\uff1aPython\u5b98\u65b9\u6587\u6863\u662f\u6700\u6743\u5a01\u7684\u5b66\u4e60\u8d44\u6599\uff0c\u5305\u542b\u8be6\u7ec6\u7684\u8bed\u6cd5\u3001\u5e93\u51fd\u6570\u3001\u793a\u4f8b\u4ee3\u7801\u7b49\u3002  <\/li>\n<li><strong>\u53c2\u52a0\u5728\u7ebf\u8bfe\u7a0b<\/strong>\uff1a\u5982Coursera\u3001edX\u3001Udacity\u7b49\u5e73\u53f0\u4e0a\u6709\u5927\u91cf\u7684Python\u8bfe\u7a0b\uff0c\u53ef\u4ee5\u7cfb\u7edf\u5b66\u4e60Python\u7f16\u7a0b\u3002  <\/li>\n<li><strong>\u9605\u8bfb\u5f00\u6e90\u9879\u76ee<\/strong>\uff1a\u9605\u8bfb\u548c\u53c2\u4e0e\u5f00\u6e90\u9879\u76ee\uff0c\u53ef\u4ee5\u5b66\u4e60\u4ed6\u4eba\u7684\u4ee3\u7801\u98ce\u683c\u548c\u7f16\u7a0b\u6280\u5de7\uff0c\u63d0\u9ad8\u81ea\u5df1\u7684\u7f16\u7a0b\u6c34\u5e73\u3002  <\/li>\n<li><strong>\u53c2\u52a0\u7f16\u7a0b\u793e\u533a<\/strong>\uff1a\u5982Stack Overflow\u3001GitHub\u7b49\u7f16\u7a0b\u793e\u533a\uff0c\u53c2\u4e0e\u8ba8\u8bba\u548c\u5206\u4eab\u7ecf\u9a8c\uff0c\u89e3\u51b3\u7f16\u7a0b\u4e2d\u7684\u95ee\u9898\u3002<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\u548c\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5728\u7535\u8111\u4e0a\u8fd0\u884c\u81ea\u5df1\u7f16\u5199\u7684Python\u7a0b\u5e8f\uff0c\u5e76\u4e0d\u65ad\u63d0\u5347\u7f16\u7a0b\u6c34\u5e73\u3002\u6301\u7eed\u5b66\u4e60\u548c\u5b9e\u8df5\uff0c\u5c06\u4f7f\u4f60\u6210\u4e3a\u4e00\u540d\u4f18\u79c0\u7684Python\u5f00\u53d1\u8005\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u7535\u8111\u4e0a\u5b89\u88c5Python\u4ee5\u4fbf\u8fd0\u884c\u6211\u7684\u7a0b\u5e8f\uff1f<\/strong><br \/>\u5728\u7535\u8111\u4e0a\u8fd0\u884cPython\u7a0b\u5e8f\u4e4b\u524d\uff0c\u786e\u4fdd\u4f60\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u3002\u53ef\u4ee5\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u9002\u5408\u4f60\u64cd\u4f5c\u7cfb\u7edf\u7684\u7248\u672c\u3002\u5b89\u88c5\u65f6\uff0c\u8bb0\u5f97\u52fe\u9009\u201c\u5c06Python\u6dfb\u52a0\u5230PATH\u201d\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u8c03\u7528Python\u3002<\/p>\n<p><strong>\u6211\u9700\u8981\u4f7f\u7528\u4ec0\u4e48\u5de5\u5177\u6765\u7f16\u5199Python\u4ee3\u7801\uff1f<\/strong><br \/>\u6709\u5f88\u591a\u6587\u672c\u7f16\u8f91\u5668\u548c\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u53ef\u4ee5\u7528\u6765\u7f16\u5199Python\u4ee3\u7801\u3002\u5e38\u89c1\u7684\u9009\u62e9\u5305\u62ecPyCharm\u3001Visual Studio Code\u3001Jupyter Notebook\u548cSublime Text\u7b49\u3002\u9009\u62e9\u4e00\u4e2a\u4f60\u719f\u6089\u6216\u559c\u6b22\u7684\u5de5\u5177\uff0c\u786e\u4fdd\u5b83\u652f\u6301Python\u7f16\u7a0b\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u6211\u7684Python\u7a0b\u5e8f\uff1f<\/strong><br \/>\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884cPython\u7a0b\u5e8f\u975e\u5e38\u7b80\u5355\u3002\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\u6216\u7ec8\u7aef\uff08macOS\/Linux\uff09\uff0c\u5bfc\u822a\u5230\u5b58\u653e\u4f60\u7684Python\u6587\u4ef6\u7684\u76ee\u5f55\u3002\u4f7f\u7528\u547d\u4ee4<code>python \u6587\u4ef6\u540d.py<\/code>\uff08\u5c06\u201c\u6587\u4ef6\u540d\u201d\u66ff\u6362\u4e3a\u4f60\u7684\u6587\u4ef6\u540d\uff09\u6765\u6267\u884c\u7a0b\u5e8f\u3002\u5982\u679c\u4f60\u7684\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86\u591a\u4e2aPython\u7248\u672c\uff0c\u53ef\u80fd\u9700\u8981\u4f7f\u7528<code>python3<\/code>\u547d\u4ee4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u7535\u8111\u8fd0\u884c\u81ea\u5df1\u7f16\u5199\u7684Python\u7a0b\u5e8f\u9700\u8981\u5b89\u88c5Python\u89e3\u91ca\u5668\u3001\u7f16\u5199\u4ee3\u7801\u3001\u4fdd\u5b58\u4e3a.py\u6587\u4ef6\u3001\u4f7f\u7528\u547d\u4ee4\u884c\u8fd0\u884c\u3001\u8c03\u8bd5 [&hellip;]","protected":false},"author":3,"featured_media":1061093,"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\/1061085"}],"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=1061085"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1061085\/revisions"}],"predecessor-version":[{"id":1061099,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1061085\/revisions\/1061099"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1061093"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1061085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1061085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1061085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}