{"id":1151122,"date":"2025-01-13T17:09:43","date_gmt":"2025-01-13T09:09:43","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1151122.html"},"modified":"2025-01-13T17:09:46","modified_gmt":"2025-01-13T09:09:46","slug":"python%e5%a6%82%e4%bd%95%e4%bf%9d%e5%ad%98%e4%bb%a3%e7%a0%81%e6%96%87%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1151122.html","title":{"rendered":"python\u5982\u4f55\u4fdd\u5b58\u4ee3\u7801\u6587\u4ef6"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25181435\/2b1af08d-7a74-4e11-bcbc-47b850a724bc.webp\" alt=\"python\u5982\u4f55\u4fdd\u5b58\u4ee3\u7801\u6587\u4ef6\" \/><\/p>\n<p><p> <strong>Python\u4fdd\u5b58\u4ee3\u7801\u6587\u4ef6\u7684\u65b9\u5f0f\u6709\u591a\u79cd\uff0c\u5982\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u3001IDE\u3001\u547d\u4ee4\u884c\u5de5\u5177\u7b49\u3002\u5e38\u7528\u7684\u4fdd\u5b58\u65b9\u5f0f\u5305\u62ec\uff1a<\/strong><\/p>\n<\/p>\n<ol>\n<li><strong>\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u4fdd\u5b58\u4e3a.py\u6587\u4ef6<\/strong>\uff0c\u5982Notepad++\u3001Sublime Text\u3001VS Code\u7b49\uff1b<\/li>\n<li><strong>\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u4fdd\u5b58\u4ee3\u7801<\/strong>\uff0c\u5982PyCharm\u3001Spyder\u3001Jupyter Notebook\u7b49\uff1b<\/li>\n<li><strong>\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u4fdd\u5b58\u4ee3\u7801<\/strong>\uff1b<\/li>\n<li><strong>\u4f7f\u7528\u5728\u7ebf\u7f16\u8f91\u5668\u4fdd\u5b58\u4ee3\u7801<\/strong>\uff0c\u5982Google Colab\u7b49\uff1b<\/li>\n<li><strong>\u5c06\u4ee3\u7801\u63d0\u4ea4\u5230\u7248\u672c\u63a7\u5236\u7cfb\u7edf<\/strong>\uff0c\u5982GitHub\u7b49\u3002<\/li>\n<\/ol>\n<p><p>\u5176\u4e2d\uff0c<strong>\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u4fdd\u5b58\u4ee3\u7801<\/strong>\u662f\u63a8\u8350\u7684\u65b9\u5f0f\uff0c\u56e0\u4e3aIDE\u53ef\u4ee5\u63d0\u4f9b\u4ee3\u7801\u8865\u5168\u3001\u8c03\u8bd5\u3001\u8fd0\u884c\u7b49\u591a\u79cd\u529f\u80fd\uff0c\u5927\u5927\u63d0\u9ad8\u7f16\u5199\u548c\u7ef4\u62a4\u4ee3\u7801\u7684\u6548\u7387\u3002\u4ee5PyCharm\u4e3a\u4f8b\uff0c\u7528\u6237\u53ef\u4ee5\u65b0\u5efa\u9879\u76ee\uff0c\u521b\u5efaPython\u6587\u4ef6\uff0c\u7136\u540e\u76f4\u63a5\u5728\u6587\u4ef6\u4e2d\u7f16\u5199\u4ee3\u7801\u5e76\u4fdd\u5b58\u3002PyCharm\u652f\u6301\u81ea\u52a8\u4fdd\u5b58\u529f\u80fd\uff0c\u53ef\u4ee5\u5728\u8bbe\u7f6e\u4e2d\u5f00\u542f\uff0c\u907f\u514d\u56e0\u610f\u5916\u60c5\u51b5\u5bfc\u81f4\u4ee3\u7801\u4e22\u5931\u3002<\/p>\n<\/p>\n<p><h2>\u4e00\u3001\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u4fdd\u5b58\u4ee3\u7801<\/h2>\n<\/p>\n<p><p>\u6587\u672c\u7f16\u8f91\u5668\u662f\u6700\u57fa\u672c\u7684\u4ee3\u7801\u7f16\u5199\u5de5\u5177\uff0c\u9002\u7528\u4e8e\u5404\u79cd\u7f16\u7a0b\u8bed\u8a00\u3002\u4ee5\u4e0b\u662f\u51e0\u4e2a\u5e38\u7528\u7684\u6587\u672c\u7f16\u8f91\u5668\u53ca\u5176\u4f7f\u7528\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><h3>1. Notepad++<\/h3>\n<\/p>\n<p><p>Notepad++\u662f\u4e00\u6b3e\u514d\u8d39\u5f00\u6e90\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u3002\u4f7f\u7528Notepad++\u4fdd\u5b58Python\u4ee3\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00Notepad++\u3002<\/li>\n<li>\u5728\u7f16\u8f91\u533a\u57df\u7f16\u5199Python\u4ee3\u7801\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u6587\u4ef6\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201c\u53e6\u5b58\u4e3a\u201d\u3002<\/li>\n<li>\u5728\u201c\u4fdd\u5b58\u7c7b\u578b\u201d\u4e0b\u62c9\u83dc\u5355\u4e2d\u9009\u62e9\u201c\u6240\u6709\u6587\u4ef6\uff08<em>.<\/em>\uff09\u201d\u3002<\/li>\n<li>\u5728\u6587\u4ef6\u540d\u4e2d\u8f93\u5165\u6587\u4ef6\u540d\uff0c\u540e\u7f00\u4e3a\u201c.py\u201d\uff0c\u4f8b\u5982\u201cexample.py\u201d\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u4fdd\u5b58\u201d\u6309\u94ae\u3002<\/li>\n<\/ol>\n<p><h3>2. Sublime Text<\/h3>\n<\/p>\n<p><p>Sublime Text\u662f\u4e00\u6b3e\u529f\u80fd\u5f3a\u5927\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u652f\u6301\u5404\u79cd\u7f16\u7a0b\u8bed\u8a00\u548c\u63d2\u4ef6\u3002\u4f7f\u7528Sublime Text\u4fdd\u5b58Python\u4ee3\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00Sublime Text\u3002<\/li>\n<li>\u5728\u7f16\u8f91\u533a\u57df\u7f16\u5199Python\u4ee3\u7801\u3002<\/li>\n<li>\u70b9\u51fb\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cSave As\u201d\u3002<\/li>\n<li>\u5728\u6587\u4ef6\u540d\u4e2d\u8f93\u5165\u6587\u4ef6\u540d\uff0c\u540e\u7f00\u4e3a\u201c.py\u201d\uff0c\u4f8b\u5982\u201cexample.py\u201d\u3002<\/li>\n<li>\u70b9\u51fb\u201cSave\u201d\u6309\u94ae\u3002<\/li>\n<\/ol>\n<p><h3>3. Visual Studio Code (VS Code)<\/h3>\n<\/p>\n<p><p>VS Code\u662f\u7531\u5fae\u8f6f\u5f00\u53d1\u7684\u4e00\u6b3e\u5f00\u6e90\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u548c\u63d2\u4ef6\u3002\u4f7f\u7528VS Code\u4fdd\u5b58Python\u4ee3\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00VS Code\u3002<\/li>\n<li>\u5728\u7f16\u8f91\u533a\u57df\u7f16\u5199Python\u4ee3\u7801\u3002<\/li>\n<li>\u70b9\u51fb\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cSave As\u201d\u3002<\/li>\n<li>\u5728\u6587\u4ef6\u540d\u4e2d\u8f93\u5165\u6587\u4ef6\u540d\uff0c\u540e\u7f00\u4e3a\u201c.py\u201d\uff0c\u4f8b\u5982\u201cexample.py\u201d\u3002<\/li>\n<li>\u70b9\u51fb\u201cSave\u201d\u6309\u94ae\u3002<\/li>\n<\/ol>\n<p><h2>\u4e8c\u3001\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u4fdd\u5b58\u4ee3\u7801<\/h2>\n<\/p>\n<p><p>\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u662f\u4e00\u79cd\u96c6\u6210\u4e86\u4ee3\u7801\u7f16\u8f91\u3001\u8c03\u8bd5\u3001\u8fd0\u884c\u7b49\u529f\u80fd\u7684\u5f00\u53d1\u5de5\u5177\u3002\u4ee5\u4e0b\u662f\u51e0\u4e2a\u5e38\u7528\u7684IDE\u53ca\u5176\u4f7f\u7528\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><h3>1. PyCharm<\/h3>\n<\/p>\n<p><p>PyCharm\u662f\u7531JetBr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ns\u5f00\u53d1\u7684\u4e00\u6b3e\u4e13\u4e1a\u7684Python IDE\uff0c\u529f\u80fd\u5f3a\u5927\uff0c\u9002\u5408\u5927\u578b\u9879\u76ee\u7684\u5f00\u53d1\u3002\u4f7f\u7528PyCharm\u4fdd\u5b58Python\u4ee3\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00PyCharm\uff0c\u65b0\u5efa\u4e00\u4e2a\u9879\u76ee\u3002<\/li>\n<li>\u5728\u9879\u76ee\u4e2d\u53f3\u952e\u70b9\u51fb\u9009\u62e9\u201cNew\u201d\uff0c\u7136\u540e\u9009\u62e9\u201cPython File\u201d\u3002<\/li>\n<li>\u8f93\u5165\u6587\u4ef6\u540d\uff0c\u70b9\u51fb\u201cOK\u201d\u3002<\/li>\n<li>\u5728\u65b0\u5efa\u7684Python\u6587\u4ef6\u4e2d\u7f16\u5199\u4ee3\u7801\u3002<\/li>\n<li>\u70b9\u51fb\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cSave All\u201d\u4fdd\u5b58\u6240\u6709\u6587\u4ef6\u3002<\/li>\n<\/ol>\n<p><h3>2. Spyder<\/h3>\n<\/p>\n<p><p>Spyder\u662f\u4e00\u6b3e\u5f00\u6e90\u7684Python IDE\uff0c\u96c6\u6210\u4e86\u4ee3\u7801\u7f16\u8f91\u3001\u8c03\u8bd5\u3001\u79d1\u5b66\u8ba1\u7b97\u7b49\u529f\u80fd\uff0c\u9002\u5408\u79d1\u5b66\u8ba1\u7b97\u548c\u6570\u636e\u5206\u6790\u3002\u4f7f\u7528Spyder\u4fdd\u5b58Python\u4ee3\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00Spyder\u3002<\/li>\n<li>\u5728\u7f16\u8f91\u533a\u57df\u7f16\u5199Python\u4ee3\u7801\u3002<\/li>\n<li>\u70b9\u51fb\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cSave As\u201d\u3002<\/li>\n<li>\u5728\u6587\u4ef6\u540d\u4e2d\u8f93\u5165\u6587\u4ef6\u540d\uff0c\u540e\u7f00\u4e3a\u201c.py\u201d\uff0c\u4f8b\u5982\u201cexample.py\u201d\u3002<\/li>\n<li>\u70b9\u51fb\u201cSave\u201d\u6309\u94ae\u3002<\/li>\n<\/ol>\n<p><h3>3. Jupyter Notebook<\/h3>\n<\/p>\n<p><p>Jupyter Notebook\u662f\u4e00\u6b3e\u5f00\u6e90\u7684Web\u5e94\u7528\u7a0b\u5e8f\uff0c\u5141\u8bb8\u7528\u6237\u521b\u5efa\u548c\u5171\u4eab\u5305\u542b\u4ee3\u7801\u3001\u65b9\u7a0b\u3001\u53ef\u89c6\u5316\u548c\u6587\u5b57\u53d9\u8ff0\u7684\u6587\u6863\u3002\u4f7f\u7528Jupyter Notebook\u4fdd\u5b58Python\u4ee3\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00Jupyter Notebook\uff0c\u65b0\u5efa\u4e00\u4e2aNotebook\u3002<\/li>\n<li>\u5728Notebook\u4e2d\u7f16\u5199Python\u4ee3\u7801\u3002<\/li>\n<li>\u70b9\u51fb\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cSave and Checkpoint\u201d\u3002<\/li>\n<li>Notebook\u4f1a\u81ea\u52a8\u4fdd\u5b58\u4e3a.ipynb\u6587\u4ef6\u3002<\/li>\n<\/ol>\n<p><h2>\u4e09\u3001\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u4fdd\u5b58\u4ee3\u7801<\/h2>\n<\/p>\n<p><p>\u9664\u4e86\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u548cIDE\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u4fdd\u5b58Python\u4ee3\u7801\u3002\u4ee5\u4e0b\u662f\u51e0\u4e2a\u5e38\u7528\u7684\u547d\u4ee4\u884c\u5de5\u5177\u53ca\u5176\u4f7f\u7528\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><h3>1. Vim<\/h3>\n<\/p>\n<p><p>Vim\u662f\u4e00\u6b3e\u5f3a\u5927\u7684\u547d\u4ee4\u884c\u6587\u672c\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u3002\u4f7f\u7528Vim\u4fdd\u5b58Python\u4ee3\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00\u7ec8\u7aef\uff0c\u8f93\u5165<code>vim example.py<\/code>\u6253\u5f00\u4e00\u4e2a\u65b0\u7684Python\u6587\u4ef6\u3002<\/li>\n<li>\u6309<code>i<\/code>\u8fdb\u5165\u63d2\u5165\u6a21\u5f0f\uff0c\u7f16\u5199Python\u4ee3\u7801\u3002<\/li>\n<li>\u6309<code>Esc<\/code>\u9000\u51fa\u63d2\u5165\u6a21\u5f0f\u3002<\/li>\n<li>\u8f93\u5165<code>:wq<\/code>\u4fdd\u5b58\u5e76\u9000\u51fa\u6587\u4ef6\u3002<\/li>\n<\/ol>\n<p><h3>2. Nano<\/h3>\n<\/p>\n<p><p>Nano\u662f\u4e00\u6b3e\u7b80\u5355\u6613\u7528\u7684\u547d\u4ee4\u884c\u6587\u672c\u7f16\u8f91\u5668\uff0c\u9002\u5408\u521d\u5b66\u8005\u4f7f\u7528\u3002\u4f7f\u7528Nano\u4fdd\u5b58Python\u4ee3\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00\u7ec8\u7aef\uff0c\u8f93\u5165<code>nano example.py<\/code>\u6253\u5f00\u4e00\u4e2a\u65b0\u7684Python\u6587\u4ef6\u3002<\/li>\n<li>\u7f16\u5199Python\u4ee3\u7801\u3002<\/li>\n<li>\u6309<code>Ctrl + O<\/code>\u4fdd\u5b58\u6587\u4ef6\u3002<\/li>\n<li>\u6309<code>Ctrl + X<\/code>\u9000\u51fa\u7f16\u8f91\u5668\u3002<\/li>\n<\/ol>\n<p><h2>\u56db\u3001\u4f7f\u7528\u5728\u7ebf\u7f16\u8f91\u5668\u4fdd\u5b58\u4ee3\u7801<\/h2>\n<\/p>\n<p><p>\u5728\u7ebf\u7f16\u8f91\u5668\u662f\u4e00\u79cd\u57fa\u4e8eWeb\u7684\u4ee3\u7801\u7f16\u8f91\u5de5\u5177\uff0c\u9002\u5408\u5feb\u901f\u7f16\u5199\u548c\u6d4b\u8bd5\u4ee3\u7801\u3002\u4ee5\u4e0b\u662f\u51e0\u4e2a\u5e38\u7528\u7684\u5728\u7ebf\u7f16\u8f91\u5668\u53ca\u5176\u4f7f\u7528\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><h3>1. Google Colab<\/h3>\n<\/p>\n<p><p>Google Colab\u662f\u7531Google\u63d0\u4f9b\u7684\u4e00\u6b3e\u57fa\u4e8e\u4e91\u7684Jupyter Notebook\u73af\u5883\uff0c\u652f\u6301Python\u4ee3\u7801\u7684\u7f16\u5199\u548c\u8fd0\u884c\u3002\u4f7f\u7528Google Colab\u4fdd\u5b58Python\u4ee3\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00Google Colab\uff0c\u65b0\u5efa\u4e00\u4e2aNotebook\u3002<\/li>\n<li>\u5728Notebook\u4e2d\u7f16\u5199Python\u4ee3\u7801\u3002<\/li>\n<li>\u70b9\u51fb\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cSave a copy in Drive\u201d\u5c06Notebook\u4fdd\u5b58\u5230Google Drive\u4e2d\u3002<\/li>\n<\/ol>\n<p><h3>2. Repl.it<\/h3>\n<\/p>\n<p><p>Repl.it\u662f\u4e00\u6b3e\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\u7684\u5728\u7ebf\u7f16\u7a0b\u5e73\u53f0\uff0c\u9002\u5408\u5feb\u901f\u7f16\u5199\u548c\u6d4b\u8bd5\u4ee3\u7801\u3002\u4f7f\u7528Repl.it\u4fdd\u5b58Python\u4ee3\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00Repl.it\uff0c\u9009\u62e9Python\u8bed\u8a00\u3002<\/li>\n<li>\u5728\u7f16\u8f91\u533a\u57df\u7f16\u5199Python\u4ee3\u7801\u3002<\/li>\n<li>\u70b9\u51fb\u201cSave\u201d\u6309\u94ae\u4fdd\u5b58\u4ee3\u7801\u6587\u4ef6\u3002<\/li>\n<\/ol>\n<p><h2>\u4e94\u3001\u5c06\u4ee3\u7801\u63d0\u4ea4\u5230\u7248\u672c\u63a7\u5236\u7cfb\u7edf<\/h2>\n<\/p>\n<p><p>\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u662f\u4e00\u79cd\u7528\u4e8e\u7ba1\u7406\u4ee3\u7801\u7248\u672c\u7684\u5de5\u5177\uff0c\u9002\u5408\u56e2\u961f\u5408\u4f5c\u548c\u5927\u578b\u9879\u76ee\u7684\u5f00\u53d1\u3002\u4ee5\u4e0b\u662f\u51e0\u4e2a\u5e38\u7528\u7684\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u53ca\u5176\u4f7f\u7528\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><h3>1. GitHub<\/h3>\n<\/p>\n<p><p>GitHub\u662f\u4e00\u6b3e\u6d41\u884c\u7684\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\uff0c\u652f\u6301Git\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u3002\u4f7f\u7528GitHub\u4fdd\u5b58Python\u4ee3\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u5728GitHub\u4e0a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u4ed3\u5e93\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u6253\u5f00\u7ec8\u7aef\uff0c\u514b\u9686\u4ed3\u5e93\u5230\u672c\u5730\uff1a<code>git clone &lt;repository_url&gt;<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u5728\u672c\u5730\u4ed3\u5e93\u4e2d\u7f16\u5199Python\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u5c06\u4ee3\u7801\u63d0\u4ea4\u5230GitHub\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">git add .<\/p>\n<p>git commit -m &quot;Add Python code&quot;<\/p>\n<p>git push origin main<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>2. GitLab<\/h3>\n<\/p>\n<p><p>GitLab\u662f\u4e00\u6b3e\u5f00\u6e90\u7684\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\uff0c\u652f\u6301Git\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u3002\u4f7f\u7528GitLab\u4fdd\u5b58Python\u4ee3\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u5728GitLab\u4e0a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u4ed3\u5e93\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u6253\u5f00\u7ec8\u7aef\uff0c\u514b\u9686\u4ed3\u5e93\u5230\u672c\u5730\uff1a<code>git clone &lt;repository_url&gt;<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u5728\u672c\u5730\u4ed3\u5e93\u4e2d\u7f16\u5199Python\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u5c06\u4ee3\u7801\u63d0\u4ea4\u5230GitLab\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">git add .<\/p>\n<p>git commit -m &quot;Add Python code&quot;<\/p>\n<p>git push origin main<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><h3>3. Bitbucket<\/h3>\n<\/p>\n<p><p>Bitbucket\u662f\u4e00\u6b3e\u652f\u6301Git\u548cMercurial\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u7684\u4ee3\u7801\u6258\u7ba1\u5e73\u53f0\u3002\u4f7f\u7528Bitbucket\u4fdd\u5b58Python\u4ee3\u7801\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p>\u5728Bitbucket\u4e0a\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u4ed3\u5e93\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u6253\u5f00\u7ec8\u7aef\uff0c\u514b\u9686\u4ed3\u5e93\u5230\u672c\u5730\uff1a<code>git clone &lt;repository_url&gt;<\/code>\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u5728\u672c\u5730\u4ed3\u5e93\u4e2d\u7f16\u5199Python\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u5c06\u4ee3\u7801\u63d0\u4ea4\u5230Bitbucket\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">git add .<\/p>\n<p>git commit -m &quot;Add Python code&quot;<\/p>\n<p>git push origin main<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><h2>\u603b\u7ed3<\/h2>\n<\/p>\n<p><p>\u4fdd\u5b58Python\u4ee3\u7801\u6587\u4ef6\u7684\u65b9\u6cd5\u6709\u5f88\u591a\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53ef\u4ee5\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002\u5bf9\u4e8e\u521d\u5b66\u8005\uff0c\u53ef\u4ee5\u4f7f\u7528\u7b80\u5355\u7684\u6587\u672c\u7f16\u8f91\u5668\u5982Notepad++\u3001Sublime Text\u6216VS Code\uff1b\u5bf9\u4e8e\u6709\u4e00\u5b9a\u7f16\u7a0b\u7ecf\u9a8c\u7684\u7528\u6237\uff0c\u53ef\u4ee5\u4f7f\u7528\u529f\u80fd\u5f3a\u5927\u7684IDE\u5982PyCharm\u3001Spyder\u6216Jupyter Notebook\uff1b\u5bf9\u4e8e\u559c\u6b22\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\u7684\u7528\u6237\uff0c\u53ef\u4ee5\u9009\u62e9Vim\u6216Nano\uff1b\u5bf9\u4e8e\u9700\u8981\u5feb\u901f\u7f16\u5199\u548c\u6d4b\u8bd5\u4ee3\u7801\u7684\u7528\u6237\uff0c\u53ef\u4ee5\u9009\u62e9\u5728\u7ebf\u7f16\u8f91\u5668\u5982Google Colab\u6216Repl.it\uff1b\u5bf9\u4e8e\u56e2\u961f\u5408\u4f5c\u548c\u5927\u578b\u9879\u76ee\u7684\u5f00\u53d1\uff0c\u53ef\u4ee5\u5c06\u4ee3\u7801\u63d0\u4ea4\u5230\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u5982GitHub\u3001GitLab\u6216Bitbucket\u3002\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\uff0c\u90fd\u8981\u6ce8\u610f\u517b\u6210\u826f\u597d\u7684\u4ee3\u7801\u7ba1\u7406\u548c\u4fdd\u5b58\u4e60\u60ef\uff0c\u907f\u514d\u56e0\u610f\u5916\u60c5\u51b5\u5bfc\u81f4\u4ee3\u7801\u4e22\u5931\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u4fdd\u5b58\u4ee3\u7801\u6587\u4ef6\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u4fdd\u5b58\u4ee3\u7801\u6587\u4ef6\u901a\u5e38\u662f\u901a\u8fc7\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6216\u6587\u672c\u7f16\u8f91\u5668\u6765\u5b8c\u6210\u7684\u3002\u60a8\u53ef\u4ee5\u9009\u62e9\u4f7f\u7528\u50cfPyCharm\u3001VS Code\u6216Jupyter Notebook\u7b49\u5de5\u5177\u3002\u5728\u8fd9\u4e9b\u5de5\u5177\u4e2d\uff0c\u901a\u5e38\u4f1a\u6709\u201c\u4fdd\u5b58\u201d\u6216\u201c\u53e6\u5b58\u4e3a\u201d\u9009\u9879\uff0c\u60a8\u53ea\u9700\u9009\u62e9\u6587\u4ef6\u540d\u548c\u4fdd\u5b58\u4f4d\u7f6e\uff0c\u6587\u4ef6\u5c06\u4ee5.py\u683c\u5f0f\u4fdd\u5b58\u3002<\/p>\n<p><strong>Python\u4ee3\u7801\u6587\u4ef6\u7684\u547d\u540d\u89c4\u5219\u662f\u4ec0\u4e48\uff1f<\/strong><br \/>\u5728\u4fdd\u5b58Python\u4ee3\u7801\u6587\u4ef6\u65f6\uff0c\u9075\u5faa\u4e00\u5b9a\u7684\u547d\u540d\u89c4\u5219\u662f\u5f88\u91cd\u8981\u7684\u3002\u6587\u4ef6\u540d\u5e94\u4ee5\u5b57\u6bcd\u5f00\u5934\uff0c\u53ef\u4ee5\u5305\u542b\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u4e0b\u5212\u7ebf\uff0c\u907f\u514d\u4f7f\u7528\u7279\u6b8a\u5b57\u7b26\u548c\u7a7a\u683c\u3002\u6587\u4ef6\u6269\u5c55\u540d\u5fc5\u987b\u4e3a\u201c.py\u201d\uff0c\u8fd9\u5c06\u5e2e\u52a9\u7cfb\u7edf\u8bc6\u522b\u8be5\u6587\u4ef6\u4e3aPython\u811a\u672c\u3002<\/p>\n<p><strong>\u5982\u4f55\u786e\u4fdd\u6211\u7684Python\u4ee3\u7801\u6587\u4ef6\u4fdd\u5b58\u6210\u529f\uff1f<\/strong><br \/>\u5728\u4fdd\u5b58Python\u4ee3\u7801\u6587\u4ef6\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u51e0\u79cd\u65b9\u5f0f\u6765\u786e\u8ba4\u6587\u4ef6\u4fdd\u5b58\u662f\u5426\u6210\u529f\u3002\u60a8\u53ef\u4ee5\u5728\u6587\u4ef6\u6d4f\u89c8\u5668\u4e2d\u5bfc\u822a\u5230\u4fdd\u5b58\u7684\u6587\u4ef6\u8def\u5f84\uff0c\u67e5\u770b\u6587\u4ef6\u662f\u5426\u5b58\u5728\u5e76\u68c0\u67e5\u5176\u5927\u5c0f\u3002\u6b64\u5916\uff0c\u60a8\u8fd8\u53ef\u4ee5\u5728IDE\u6216\u6587\u672c\u7f16\u8f91\u5668\u4e2d\u91cd\u65b0\u6253\u5f00\u8be5\u6587\u4ef6\uff0c\u786e\u4fdd\u60a8\u7684\u4ee3\u7801\u5728\u7f16\u8f91\u540e\u4ecd\u7136\u4fdd\u7559\u3002\u6267\u884c\u4ee3\u7801\u65f6\u5982\u679c\u6ca1\u6709\u9519\u8bef\uff0c\u901a\u5e38\u4e5f\u8868\u793a\u6587\u4ef6\u4fdd\u5b58\u6210\u529f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4fdd\u5b58\u4ee3\u7801\u6587\u4ef6\u7684\u65b9\u5f0f\u6709\u591a\u79cd\uff0c\u5982\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u3001IDE\u3001\u547d\u4ee4\u884c\u5de5\u5177\u7b49\u3002\u5e38\u7528\u7684\u4fdd\u5b58\u65b9\u5f0f\u5305\u62ec\uff1a \u4f7f\u7528\u6587\u672c\u7f16 [&hellip;]","protected":false},"author":3,"featured_media":1151126,"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\/1151122"}],"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=1151122"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1151122\/revisions"}],"predecessor-version":[{"id":1151127,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1151122\/revisions\/1151127"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1151126"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1151122"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1151122"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1151122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}