{"id":921039,"date":"2024-12-26T14:07:03","date_gmt":"2024-12-26T06:07:03","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/921039.html"},"modified":"2024-12-26T14:07:05","modified_gmt":"2024-12-26T06:07:05","slug":"%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8cpython%e7%a8%8b%e5%ba%8f","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/921039.html","title":{"rendered":"\u5982\u4f55\u8fd0\u884cpython\u7a0b\u5e8f"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24210205\/4b90c725-3ae5-4f76-b6f7-165bf51da7dd.webp\" alt=\"\u5982\u4f55\u8fd0\u884cpython\u7a0b\u5e8f\" \/><\/p>\n<p><p> <strong>\u8981\u8fd0\u884cPython\u7a0b\u5e8f\uff0c\u9996\u5148\u786e\u4fdd\u5df2\u5b89\u88c5Python\u89e3\u91ca\u5668\u3001\u7136\u540e\u7f16\u5199Python\u4ee3\u7801\u3001\u6700\u540e\u901a\u8fc7\u547d\u4ee4\u884c\u6216\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6267\u884c\u4ee3\u7801\u3002<\/strong> \u5728\u8be6\u7ec6\u89e3\u91ca\u8fd9\u4e9b\u6b65\u9aa4\u4e4b\u524d\uff0c\u7b80\u8981\u63d0\u4e00\u4e0bPython\u7684\u4f18\u52bf\u3002Python\u662f\u4e00\u79cd\u9ad8\u6548\u3001\u6613\u5b66\u4e14\u529f\u80fd\u5f3a\u5927\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u5e7f\u6cdb\u5e94\u7528\u4e8e\u6570\u636e\u5206\u6790\u3001<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u3001Web\u5f00\u53d1\u7b49\u9886\u57df\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u8be6\u7ec6\u63a2\u8ba8\u5982\u4f55\u8fd0\u884cPython\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u786e\u4fdd\u5df2\u5b89\u88c5Python\u89e3\u91ca\u5668<\/h3>\n<\/p>\n<p><p>\u5728\u8fd0\u884cPython\u7a0b\u5e8f\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u5728\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5Python\u89e3\u91ca\u5668\u3002Python\u89e3\u91ca\u5668\u662f\u6267\u884cPython\u4ee3\u7801\u7684\u6838\u5fc3\u5de5\u5177\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u5b89\u88c5Python\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7dPython\u5b89\u88c5\u5305<\/strong>\uff1a\u8bbf\u95eePython\u5b98\u65b9\u7f51\u7ad9\uff08python.org\uff09\uff0c\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u9009\u62e9\u9002\u5408\u7684\u7248\u672c\u8fdb\u884c\u4e0b\u8f7d\u3002\u5efa\u8bae\u4e0b\u8f7d\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5Python<\/strong>\uff1a\u8fd0\u884c\u4e0b\u8f7d\u7684\u5b89\u88c5\u5305\uff0c\u6309\u7167\u5b89\u88c5\u5411\u5bfc\u8fdb\u884c\u64cd\u4f5c\u3002\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u9009\u62e9\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u65b9\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u4f7f\u7528Python\u547d\u4ee4\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1\u5b89\u88c5<\/strong>\uff1a\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\u6216\u7ec8\u7aef\uff08MacOS\/Linux\uff09\uff0c\u8f93\u5165 <code>python --version<\/code> \u6216 <code>python3 --version<\/code>\uff0c\u5982\u679c\u663e\u793a\u51faPython\u7248\u672c\u53f7\uff0c\u5219\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u4e8c\u3001\u7f16\u5199Python\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u5728\u786e\u4fddPython\u89e3\u91ca\u5668\u5b89\u88c5\u6210\u529f\u540e\uff0c\u53ef\u4ee5\u5f00\u59cb\u7f16\u5199Python\u4ee3\u7801\u3002\u7f16\u5199Python\u4ee3\u7801\u6709\u591a\u79cd\u65b9\u6cd5\uff0c\u4ee5\u4e0b\u662f\u4e24\u79cd\u5e38\u7528\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668<\/strong>\uff1a\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u6587\u672c\u7f16\u8f91\u5668\uff08\u5982Notepad++\u3001Sublime Text\u3001VS Code\u7b49\uff09\u7f16\u5199Python\u4ee3\u7801\u3002\u5c06\u4ee3\u7801\u6587\u4ef6\u4fdd\u5b58\u4e3a <code>.py<\/code> \u6269\u5c55\u540d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09<\/strong>\uff1aIDE\u5982PyCharm\u3001Jupyter Notebook\u3001Spyder\u7b49\u63d0\u4f9b\u4e86\u66f4\u4e3a\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u5982\u4ee3\u7801\u8865\u5168\u3001\u8c03\u8bd5\u7b49\uff0c\u975e\u5e38\u9002\u5408\u4e8ePython\u5f00\u53d1\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u4e09\u3001\u901a\u8fc7\u547d\u4ee4\u884c\u6216IDE\u6267\u884c\u4ee3\u7801<\/h3>\n<\/p>\n<p><p>\u7f16\u5199\u597dPython\u7a0b\u5e8f\u540e\uff0c\u5c31\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u6216IDE\u6765\u8fd0\u884c\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528\u547d\u4ee4\u884c\u8fd0\u884cPython\u7a0b\u5e8f<\/h4>\n<\/p>\n<p><p>\u4f7f\u7528\u547d\u4ee4\u884c\u8fd0\u884cPython\u7a0b\u5e8f\u662f\u6700\u57fa\u672c\u7684\u65b9\u6cd5\u3002\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef<\/strong>\uff1a\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u9009\u62e9\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08Windows\uff09\u6216\u7ec8\u7aef\uff08MacOS\/Linux\uff09\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5bfc\u822a\u5230\u4ee3\u7801\u6587\u4ef6\u6240\u5728\u76ee\u5f55<\/strong>\uff1a\u4f7f\u7528 <code>cd<\/code> \u547d\u4ee4\u8fdb\u5165\u5b58\u653ePython\u6587\u4ef6\u7684\u76ee\u5f55\u3002\u4f8b\u5982\uff0c<code>cd path\/to\/your\/script<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884cPython\u7a0b\u5e8f<\/strong>\uff1a\u8f93\u5165 <code>python script_name.py<\/code> \u6216 <code>python3 script_name.py<\/code>\uff0c\u7136\u540e\u6309Enter\u952e\u5373\u53ef\u8fd0\u884c\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><h4>2. \u4f7f\u7528IDE\u8fd0\u884cPython\u7a0b\u5e8f<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u4f7f\u7528IDE\u6765\u7f16\u5199Python\u4ee3\u7801\uff0c\u53ef\u4ee5\u76f4\u63a5\u5728IDE\u4e2d\u8fd0\u884c\u7a0b\u5e8f\uff0c\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u6253\u5f00IDE<\/strong>\uff1a\u542f\u52a8\u4f60\u6240\u4f7f\u7528\u7684IDE\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6253\u5f00Python\u6587\u4ef6<\/strong>\uff1a\u5728IDE\u4e2d\u6253\u5f00\u5df2\u7f16\u5199\u7684Python\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884c\u7a0b\u5e8f<\/strong>\uff1a\u5927\u591a\u6570IDE\u90fd\u63d0\u4f9b\u4e86\u201cRun\u201d\u6309\u94ae\uff0c\u70b9\u51fb\u5373\u53ef\u8fd0\u884c\u7a0b\u5e8f\u3002\u53e6\u5916\uff0cIDE\u901a\u5e38\u652f\u6301\u5feb\u6377\u952e\u8fd0\u884c\uff0c\u5982F5\u3001Shift+Enter\u7b49\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><h3>\u56db\u3001\u9519\u8bef\u5904\u7406\u4e0e\u8c03\u8bd5<\/h3>\n<\/p>\n<p><p>\u5728\u8fd0\u884cPython\u7a0b\u5e8f\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u9519\u8bef\u6216\u7a0b\u5e8f\u672a\u6309\u9884\u671f\u8fd0\u884c\u3002\u6b64\u65f6\u9700\u8981\u8fdb\u884c\u8c03\u8bd5\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u7406\u89e3\u9519\u8bef\u4fe1\u606f<\/strong>\uff1aPython\u89e3\u91ca\u5668\u901a\u5e38\u4f1a\u8fd4\u56de\u9519\u8bef\u4fe1\u606f\uff0c\u5305\u62ec\u9519\u8bef\u7c7b\u578b\u3001\u9519\u8bef\u4f4d\u7f6e\u7b49\u3002\u7406\u89e3\u8fd9\u4e9b\u4fe1\u606f\u6709\u52a9\u4e8e\u5feb\u901f\u5b9a\u4f4d\u95ee\u9898\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u8c03\u8bd5\u5de5\u5177<\/strong>\uff1a\u8bb8\u591aIDE\u63d0\u4f9b\u4e86\u8c03\u8bd5\u5de5\u5177\uff0c\u53ef\u4ee5\u9010\u6b65\u6267\u884c\u4ee3\u7801\uff0c\u67e5\u770b\u53d8\u91cf\u503c\uff0c\u5e2e\u52a9\u53d1\u73b0\u95ee\u9898\u6240\u5728\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5e38\u89c1\u9519\u8bef\u7c7b\u578b<\/strong>\uff1a\u5305\u62ec\u8bed\u6cd5\u9519\u8bef\uff08SyntaxError\uff09\u3001\u903b\u8f91\u9519\u8bef\u3001\u8fd0\u884c\u65f6\u9519\u8bef\u7b49\u3002\u6bcf\u79cd\u9519\u8bef\u90fd\u6709\u5176\u5178\u578b\u7684\u8868\u73b0\u548c\u89e3\u51b3\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u4e94\u3001Python\u7a0b\u5e8f\u4f18\u5316<\/h3>\n<\/p>\n<p><p>\u5728\u6210\u529f\u8fd0\u884cPython\u7a0b\u5e8f\u540e\uff0c\u53ef\u4ee5\u8003\u8651\u8fdb\u884c\u4ee3\u7801\u4f18\u5316\uff0c\u4ee5\u63d0\u9ad8\u7a0b\u5e8f\u7684\u8fd0\u884c\u6548\u7387\u548c\u53ef\u8bfb\u6027\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4ee3\u7801\u7b80\u5316<\/strong>\uff1a\u4f7f\u7528Python\u5185\u7f6e\u51fd\u6570\u548c\u5e93\uff0c\u51cf\u5c11\u5197\u4f59\u4ee3\u7801\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\u4ee3\u66ff\u5faa\u73af\u751f\u6210\u5217\u8868\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6027\u80fd\u4f18\u5316<\/strong>\uff1a\u5206\u6790\u7a0b\u5e8f\u7684\u65f6\u95f4\u548c\u7a7a\u95f4\u590d\u6742\u5ea6\uff0c\u627e\u51fa\u74f6\u9888\u90e8\u5206\uff0c\u4f18\u5316\u7b97\u6cd5\u6216\u4f7f\u7528\u66f4\u9ad8\u6548\u7684\u6570\u636e\u7ed3\u6784\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6a21\u5757\u5316\u8bbe\u8ba1<\/strong>\uff1a\u5c06\u4ee3\u7801\u62c6\u5206\u4e3a\u591a\u4e2a\u6a21\u5757\u6216\u51fd\u6570\uff0c\u63d0\u9ad8\u4ee3\u7801\u7684\u590d\u7528\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6587\u6863\u5316<\/strong>\uff1a\u4e3a\u4ee3\u7801\u6dfb\u52a0\u6ce8\u91ca\u548c\u6587\u6863\u5b57\u7b26\u4e32\uff0c\u4fbf\u4e8e\u4ed6\u4eba\u7406\u89e3\u548c\u4f7f\u7528\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u516d\u3001Python<a href=\"https:\/\/docs.pingcode.com\/blog\/project-management\/23316.html\" target=\"_blank\">\u9879\u76ee\u7ba1\u7406<\/a><\/h3>\n<\/p>\n<p><p>\u5f53\u9879\u76ee\u89c4\u6a21\u6269\u5927\u65f6\uff0c\u7ba1\u7406Python\u9879\u76ee\u5c06\u53d8\u5f97\u5c24\u4e3a\u91cd\u8981\u3002\u4e0b\u9762\u4ecb\u7ecd\u4e00\u4e9b\u7ba1\u7406Python\u9879\u76ee\u7684\u6700\u4f73\u5b9e\u8df5\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528\u7248\u672c\u63a7\u5236\u7cfb\u7edf<\/strong>\uff1a\u5982Git\uff0c\u901a\u8fc7\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u53ef\u4ee5\u8ddf\u8e2a\u4ee3\u7801\u53d8\u66f4\u3001\u534f\u540c\u5f00\u53d1\uff0c\u4fdd\u6301\u4ee3\u7801\u7684\u5386\u53f2\u8bb0\u5f55\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u865a\u62df\u73af\u5883<\/strong>\uff1a\u4e3a\u6bcf\u4e2a\u9879\u76ee\u521b\u5efa\u72ec\u7acb\u7684\u865a\u62df\u73af\u5883\uff0c\u786e\u4fdd\u9879\u76ee\u4e4b\u95f4\u7684\u4f9d\u8d56\u4e0d\u51b2\u7a81\u3002\u4f7f\u7528\u5de5\u5177\u5982 <code>venv<\/code>\u3001<code>virtualenv<\/code> \u6216 <code>conda<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f9d\u8d56\u7ba1\u7406<\/strong>\uff1a\u901a\u8fc7 <code>requirements.txt<\/code> \u6587\u4ef6\u7ba1\u7406\u9879\u76ee\u7684\u4f9d\u8d56\uff0c\u8bb0\u5f55\u9879\u76ee\u6240\u9700\u7684\u5305\u53ca\u5176\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6d4b\u8bd5<\/strong>\uff1a\u7f16\u5199\u5355\u5143\u6d4b\u8bd5\u548c\u96c6\u6210\u6d4b\u8bd5\uff0c\u786e\u4fdd\u4ee3\u7801\u7684\u6b63\u786e\u6027\u548c\u7a33\u5b9a\u6027\u3002\u4f7f\u7528\u6846\u67b6\u5982 <code>unittest<\/code>\u3001<code>pytest<\/code> \u7b49\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>\u4e03\u3001\u90e8\u7f72Python\u5e94\u7528<\/h3>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u5b8c\u6210\u540e\uff0c\u53ef\u80fd\u9700\u8981\u5c06Python\u5e94\u7528\u90e8\u7f72\u5230\u751f\u4ea7\u73af\u5883\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u9009\u62e9\u90e8\u7f72\u5e73\u53f0<\/strong>\uff1a\u6839\u636e\u5e94\u7528\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u5e73\u53f0\uff0c\u5982\u670d\u52a1\u5668\u3001\u4e91\u670d\u52a1\uff08AWS\u3001Azure\u3001Google Cloud\uff09\u7b49\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e\u73af\u5883<\/strong>\uff1a\u5728\u76ee\u6807\u73af\u5883\u4e2d\u5b89\u88c5\u5fc5\u8981\u7684\u8f6f\u4ef6\u548c\u4f9d\u8d56\uff0c\u786e\u4fdd\u5e94\u7528\u53ef\u4ee5\u6b63\u5e38\u8fd0\u884c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u76d1\u63a7\u4e0e\u7ef4\u62a4<\/strong>\uff1a\u90e8\u7f72\u540e\uff0c\u6301\u7eed\u76d1\u63a7\u5e94\u7528\u7684\u6027\u80fd\u548c\u72b6\u6001\uff0c\u53ca\u65f6\u4fee\u590dbug\uff0c\u8fdb\u884c\u6027\u80fd\u4f18\u5316\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\u548c\u5b9e\u8df5\uff0c\u60a8\u53ef\u4ee5\u987a\u5229\u5730\u8fd0\u884c\u3001\u4f18\u5316\u548c\u7ba1\u7406Python\u7a0b\u5e8f\u3002\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u80fd\u591f\u5e2e\u52a9\u60a8\u66f4\u597d\u5730\u7406\u89e3\u5982\u4f55\u8fd0\u884cPython\u7a0b\u5e8f\uff0c\u5e76\u63d0\u9ad8Python\u7f16\u7a0b\u7684\u6548\u7387\u548c\u8d28\u91cf\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u8fd0\u884cPython\u7a0b\u5e8f\uff1f<\/strong><br \/>\u5728Windows\u3001macOS\u548cLinux\u7b49\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u8fd0\u884cPython\u7a0b\u5e8f\u7684\u6b65\u9aa4\u7565\u6709\u4e0d\u540c\u3002\u5728Windows\u4e0a\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26\u6216PowerShell\u6267\u884cPython\u811a\u672c\u3002\u5728macOS\u548cLinux\u4e0a\uff0c\u6253\u5f00\u7ec8\u7aef\u5e76\u4f7f\u7528\u547d\u4ee4\u884c\u8f93\u5165<code>python3 script.py<\/code>\uff08\u5176\u4e2d<code>script.py<\/code>\u662f\u4f60\u7684Python\u6587\u4ef6\u540d\uff09\u3002\u786e\u4fdd\u5728\u8fd0\u884c\u4e4b\u524d\u5df2\u5b89\u88c5Python\uff0c\u5e76\u5c06\u5176\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<p><strong>\u6211\u9700\u8981\u5b89\u88c5\u54ea\u4e9b\u8f6f\u4ef6\u624d\u80fd\u8fd0\u884cPython\u7a0b\u5e8f\uff1f<\/strong><br \/>\u8981\u8fd0\u884cPython\u7a0b\u5e8f\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5Python\u89e3\u91ca\u5668\u3002\u53ef\u4ee5\u4ecePython\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5efa\u8bae\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u6216\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6765\u7f16\u5199\u4ee3\u7801\uff0c\u5982VS Code\u3001PyCharm\u6216Jupyter Notebook\uff0c\u8fd9\u5c06\u5927\u5927\u63d0\u9ad8\u7f16\u7a0b\u6548\u7387\u3002<\/p>\n<p><strong>\u5982\u4f55\u8c03\u8bd5Python\u7a0b\u5e8f\u4ee5\u89e3\u51b3\u9519\u8bef\uff1f<\/strong><br \/>\u8c03\u8bd5Python\u7a0b\u5e8f\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u5185\u7f6e\u7684<code>print()<\/code>\u51fd\u6570\u6765\u67e5\u770b\u53d8\u91cf\u7684\u503c\u548c\u7a0b\u5e8f\u7684\u6267\u884c\u6d41\u7a0b\u3002\u6b64\u5916\uff0c\u4f7f\u7528\u8c03\u8bd5\u5de5\u5177\uff08\u5982PDB\u3001VS Code\u7684\u8c03\u8bd5\u529f\u80fd\u6216PyCharm\u7684\u8c03\u8bd5\u5668\uff09\u53ef\u4ee5\u9010\u6b65\u6267\u884c\u4ee3\u7801\uff0c\u68c0\u67e5\u6bcf\u4e00\u6b65\u7684\u72b6\u6001\uff0c\u8fd9\u6709\u52a9\u4e8e\u8fc5\u901f\u5b9a\u4f4d\u548c\u4fee\u590d\u9519\u8bef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u8fd0\u884cPython\u7a0b\u5e8f\uff0c\u9996\u5148\u786e\u4fdd\u5df2\u5b89\u88c5Python\u89e3\u91ca\u5668\u3001\u7136\u540e\u7f16\u5199Python\u4ee3\u7801\u3001\u6700\u540e\u901a\u8fc7\u547d\u4ee4\u884c\u6216\u96c6\u6210\u5f00\u53d1\u73af [&hellip;]","protected":false},"author":3,"featured_media":921051,"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\/921039"}],"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=921039"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/921039\/revisions"}],"predecessor-version":[{"id":921052,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/921039\/revisions\/921052"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/921051"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=921039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=921039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=921039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}