{"id":938660,"date":"2024-12-26T20:16:03","date_gmt":"2024-12-26T12:16:03","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/938660.html"},"modified":"2024-12-26T20:16:06","modified_gmt":"2024-12-26T12:16:06","slug":"pycharm-%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8cpython","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/938660.html","title":{"rendered":"pycharm \u5982\u4f55\u8fd0\u884cpython"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25074043\/045d3716-6d65-492d-9782-afd125dd786f.webp\" alt=\"pycharm \u5982\u4f55\u8fd0\u884cpython\" \/><\/p>\n<p><p> <strong>\u5728PyCharm\u4e2d\u8fd0\u884cPython\u7a0b\u5e8f\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5982\u4f7f\u7528\u201c\u8fd0\u884c\u201d\u6309\u94ae\u3001\u53f3\u952e\u83dc\u5355\u548c\u952e\u76d8\u5feb\u6377\u952e\u3002<\/strong> \u5176\u4e2d\uff0c<strong>\u4f7f\u7528\u201c\u8fd0\u884c\u201d\u6309\u94ae<\/strong>\u662f\u6700\u76f4\u89c2\u7684\u65b9\u6cd5\u3002\u5728PyCharm\u4e2d\u6253\u5f00\u4f60\u7684Python\u6587\u4ef6\u540e\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u70b9\u51fb\u5de5\u5177\u680f\u4e0a\u7684\u7eff\u8272\u201c\u8fd0\u884c\u201d\u6309\u94ae\u6765\u8fd0\u884c\u7a0b\u5e8f\u3002\u6b64\u5916\uff0c\u4f60\u8fd8\u53ef\u4ee5\u901a\u8fc7\u53f3\u952e\u70b9\u51fb\u6587\u4ef6\u540d\uff0c\u9009\u62e9\u201cRun &#39;file_name&#39;\u201d\u6765\u6267\u884c\u7a0b\u5e8f\u3002\u4f7f\u7528\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u6709\u6548\u5730\u6d4b\u8bd5\u548c\u8c03\u8bd5\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5\u548c\u914d\u7f6ePyCharm<\/p>\n<\/p>\n<p><p>\u5728\u4f7f\u7528PyCharm\u8fd0\u884cPython\u7a0b\u5e8f\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u786e\u4fddPyCharm\u548cPython\u89e3\u91ca\u5668\u5df2\u7ecf\u6b63\u786e\u5b89\u88c5\u548c\u914d\u7f6e\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7d\u548c\u5b89\u88c5PyCharm<\/strong><\/p>\n<p>PyCharm\u6709\u4e24\u4e2a\u7248\u672c\uff1a\u793e\u533a\u7248\uff08Community Edition\uff09\u548c\u4e13\u4e1a\u7248\uff08Professional Edition\uff09\u3002\u793e\u533a\u7248\u662f\u514d\u8d39\u7684\uff0c\u9002\u7528\u4e8e\u5927\u591a\u6570\u4e2a\u4eba\u9879\u76ee\u548c\u5c0f\u578b\u9879\u76ee\u3002\u4f60\u53ef\u4ee5\u4eceJetBr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ns\u7684\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u9002\u5408\u4f60\u64cd\u4f5c\u7cfb\u7edf\u7684\u7248\u672c\u3002\u5b89\u88c5\u8fc7\u7a0b\u901a\u5e38\u5f88\u7b80\u5355\uff0c\u53ea\u9700\u6309\u7167\u5b89\u88c5\u5411\u5bfc\u7684\u6307\u793a\u5373\u53ef\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6ePython\u89e3\u91ca\u5668<\/strong><\/p>\n<p>\u5b89\u88c5PyCharm\u540e\uff0c\u6253\u5f00\u5b83\u5e76\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u9879\u76ee\u3002PyCharm\u4f1a\u8981\u6c42\u4f60\u9009\u62e9\u4e00\u4e2aPython\u89e3\u91ca\u5668\u3002\u901a\u5e38\uff0c\u5b83\u4f1a\u81ea\u52a8\u68c0\u6d4b\u5230\u7cfb\u7edf\u4e2d\u5df2\u7ecf\u5b89\u88c5\u7684Python\u7248\u672c\u3002\u5982\u679c\u6ca1\u6709\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u624b\u52a8\u6307\u5b9aPython\u89e3\u91ca\u5668\u7684\u8def\u5f84\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u201cFile &gt; Settings &gt; Project: [project_name] &gt; Python Interpreter\u201d\u6765\u914d\u7f6e\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u521b\u5efa\u548c\u8fd0\u884cPython\u811a\u672c<\/p>\n<\/p>\n<p><p>\u4e00\u65e6PyCharm\u5b89\u88c5\u548c\u914d\u7f6e\u5b8c\u6210\uff0c\u4f60\u5c31\u53ef\u4ee5\u5f00\u59cb\u521b\u5efa\u548c\u8fd0\u884cPython\u811a\u672c\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u4e00\u4e2aPython\u6587\u4ef6<\/strong><\/p>\n<p>\u5728PyCharm\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u6587\u4ef6\uff0c\u53f3\u952e\u70b9\u51fb\u9879\u76ee\u76ee\u5f55\uff0c\u9009\u62e9\u201cNew &gt; Python File\u201d\uff0c\u8f93\u5165\u6587\u4ef6\u540d\u5e76\u786e\u8ba4\u3002\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u65b0\u7684.py\u6587\u4ef6\uff0c\u4f60\u53ef\u4ee5\u5728\u5176\u4e2d\u7f16\u5199Python\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199Python\u4ee3\u7801<\/strong><\/p>\n<p>\u5728\u65b0\u5efa\u7684Python\u6587\u4ef6\u4e2d\uff0c\u8f93\u5165\u4f60\u60f3\u8fd0\u884c\u7684Python\u4ee3\u7801\u3002\u4f8b\u5982\uff0c\u4f60\u53ef\u4ee5\u8f93\u5165\u4e00\u4e2a\u7b80\u5355\u7684\u201cHello, World!\u201d\u7a0b\u5e8f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">print(&quot;Hello, World!&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884cPython\u811a\u672c<\/strong><\/p>\n<p>\u6709\u591a\u79cd\u65b9\u6cd5\u53ef\u4ee5\u8fd0\u884cPython\u811a\u672c\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>\u4f7f\u7528\u5de5\u5177\u680f\u4e0a\u7684\u201c\u8fd0\u884c\u201d\u6309\u94ae<\/strong>\uff1a\u5728PyCharm\u7a97\u53e3\u7684\u53f3\u4e0a\u89d2\uff0c\u4f60\u4f1a\u770b\u5230\u4e00\u4e2a\u7eff\u8272\u7684\u4e09\u89d2\u5f62\u6309\u94ae\u3002\u70b9\u51fb\u5b83\u5c06\u4f1a\u8fd0\u884c\u5f53\u524d\u6253\u5f00\u7684Python\u811a\u672c\u3002<\/li>\n<li><strong>\u4f7f\u7528\u53f3\u952e\u83dc\u5355<\/strong>\uff1a\u5728\u7f16\u8f91\u5668\u4e2d\u53f3\u952e\u70b9\u51fbPython\u6587\u4ef6\uff0c\u7136\u540e\u9009\u62e9\u201cRun &#39;file_name&#39;\u201d\u3002<\/li>\n<li><strong>\u4f7f\u7528\u5feb\u6377\u952e<\/strong>\uff1a\u5728Windows\u4e0a\uff0c\u6309\u4e0b<code>Shift + F10<\/code>\uff0c\u5728macOS\u4e0a\uff0c\u6309\u4e0b<code>Control + R<\/code>\uff0c\u53ef\u4ee5\u5feb\u901f\u8fd0\u884c\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u8c03\u8bd5\u548c\u4f18\u5316\u4ee3\u7801<\/p>\n<\/p>\n<p><p>\u5728PyCharm\u4e2d\u8fd0\u884cPython\u7a0b\u5e8f\u4e0d\u4ec5\u4ec5\u662f\u4e3a\u4e86\u6267\u884c\u4ee3\u7801\uff0c\u8fd8\u53ef\u4ee5\u8c03\u8bd5\u548c\u4f18\u5316\u4ee3\u7801\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8bbe\u7f6e\u65ad\u70b9<\/strong><\/p>\n<p>\u5728PyCharm\u4e2d\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u70b9\u51fb\u884c\u53f7\u65c1\u8fb9\u7684\u7070\u8272\u533a\u57df\u6765\u8bbe\u7f6e\u65ad\u70b9\u3002\u8fd0\u884c\u7a0b\u5e8f\u65f6\uff0c\u4e00\u65e6\u7a0b\u5e8f\u6267\u884c\u5230\u65ad\u70b9\uff0c\u6267\u884c\u5c06\u6682\u505c\uff0c\u4f60\u53ef\u4ee5\u68c0\u67e5\u53d8\u91cf\u3001\u67e5\u770b\u5806\u6808\u7b49\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u8c03\u8bd5\u5de5\u5177<\/strong><\/p>\n<p>\u4f7f\u7528\u8c03\u8bd5\u5de5\u5177\u680f\u4e2d\u7684\u6309\u94ae\uff08\u5982\u201cStep Into\u201d\u3001\u201cStep Over\u201d\uff09\u53ef\u4ee5\u9010\u6b65\u6267\u884c\u7a0b\u5e8f\uff0c\u89c2\u5bdf\u7a0b\u5e8f\u7684\u8fd0\u884c\u72b6\u6001\u548c\u53d8\u91cf\u7684\u53d8\u5316\u3002\u8fd9\u6709\u52a9\u4e8e\u53d1\u73b0\u4ee3\u7801\u4e2d\u7684\u9519\u8bef\u548c\u6027\u80fd\u74f6\u9888\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f18\u5316\u4ee3\u7801<\/strong><\/p>\n<p>PyCharm\u63d0\u4f9b\u4e86\u8bb8\u591a\u5de5\u5177\u6765\u5e2e\u52a9\u4f60\u4f18\u5316\u4ee3\u7801\uff0c\u5982\u4ee3\u7801\u5206\u6790\u548c\u91cd\u6784\u529f\u80fd\u3002\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u8d28\u91cf\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\u7684\u4f18\u52bf<\/p>\n<\/p>\n<p><p>PyCharm\u4f5c\u4e3a\u4e00\u6b3e\u529f\u80fd\u5f3a\u5927\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\uff0c\u63d0\u4f9b\u4e86\u8bb8\u591a\u6709\u52a9\u4e8ePython\u5f00\u53d1\u7684\u529f\u80fd\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4ee3\u7801\u8865\u5168\u548c\u63d0\u793a<\/strong><\/p>\n<p>PyCharm\u63d0\u4f9b\u667a\u80fd\u7684\u4ee3\u7801\u8865\u5168\u548c\u63d0\u793a\u529f\u80fd\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5feb\u901f\u7f16\u5199\u4ee3\u7801\u5e76\u51cf\u5c11\u9519\u8bef\u3002\u8fd9\u5bf9\u4e8e\u521d\u5b66\u8005\u548c\u6709\u7ecf\u9a8c\u7684\u5f00\u53d1\u8005\u90fd\u662f\u975e\u5e38\u6709\u7528\u7684\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7248\u672c\u63a7\u5236\u96c6\u6210<\/strong><\/p>\n<p>PyCharm\u652f\u6301Git\u3001Subversion\u7b49\u7248\u672c\u63a7\u5236\u7cfb\u7edf\u3002\u4f60\u53ef\u4ee5\u76f4\u63a5\u5728IDE\u4e2d\u8fdb\u884c\u4ee3\u7801\u7684\u63d0\u4ea4\u3001\u66f4\u65b0\u548c\u5408\u5e76\u64cd\u4f5c\uff0c\u65b9\u4fbf\u56e2\u961f\u534f\u4f5c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5f3a\u5927\u7684\u63d2\u4ef6\u751f\u6001<\/strong><\/p>\n<p>PyCharm\u62e5\u6709\u4e30\u5bcc\u7684\u63d2\u4ef6\u751f\u6001\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u9700\u8981\u5b89\u88c5\u5404\u79cd\u63d2\u4ef6\u6765\u6269\u5c55PyCharm\u7684\u529f\u80fd\uff0c\u5982\u6570\u636e\u5e93\u5de5\u5177\u3001Web\u5f00\u53d1\u652f\u6301\u7b49\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u4f7f\u7528\u865a\u62df\u73af\u5883<\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1Python\u9879\u76ee\u65f6\uff0c\u4f7f\u7528\u865a\u62df\u73af\u5883\u53ef\u4ee5\u5e2e\u52a9\u4f60\u7ba1\u7406\u9879\u76ee\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u907f\u514d\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u5e93\u51b2\u7a81\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u865a\u62df\u73af\u5883<\/strong><\/p>\n<p>\u5728PyCharm\u4e2d\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u201cFile &gt; Settings &gt; Project: [project_name] &gt; Python Interpreter\u201d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u865a\u62df\u73af\u5883\u3002\u9009\u62e9\u201cAdd Interpreter\u201d\uff0c\u7136\u540e\u9009\u62e9\u201cVirtualenv Environment\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6fc0\u6d3b\u548c\u4f7f\u7528\u865a\u62df\u73af\u5883<\/strong><\/p>\n<p>\u521b\u5efa\u865a\u62df\u73af\u5883\u540e\uff0cPyCharm\u4f1a\u81ea\u52a8\u6fc0\u6d3b\u5e76\u4f7f\u7528\u8be5\u73af\u5883\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7PyCharm\u7684Terminal\u7a97\u53e3\u5b89\u88c5\u548c\u7ba1\u7406\u865a\u62df\u73af\u5883\u4e2d\u7684\u5e93\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>pip install package_name<\/code>\u6765\u5b89\u88c5\u5e93\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7ba1\u7406\u4f9d\u8d56\u5173\u7cfb<\/strong><\/p>\n<p>\u4f7f\u7528PyCharm\u7684\u201cRequirements\u201d\u5de5\u5177\u53ef\u4ee5\u5e2e\u52a9\u4f60\u7ba1\u7406\u9879\u76ee\u7684\u4f9d\u8d56\u5173\u7cfb\u3002\u4f60\u53ef\u4ee5\u751f\u6210requirements.txt\u6587\u4ef6\uff0c\u8bb0\u5f55\u9879\u76ee\u6240\u9700\u7684\u6240\u6709\u5e93\u53ca\u5176\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001\u8c03\u8bd5\u9ad8\u7ea7\u7279\u6027<\/p>\n<\/p>\n<p><p>PyCharm\u4e0d\u4ec5\u652f\u6301\u57fa\u672c\u7684\u8c03\u8bd5\u529f\u80fd\uff0c\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u9ad8\u7ea7\u8c03\u8bd5\u7279\u6027\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u66f4\u6709\u6548\u5730\u6392\u67e5\u95ee\u9898\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u6761\u4ef6\u65ad\u70b9<\/strong><\/p>\n<p>PyCharm\u5141\u8bb8\u4f60\u8bbe\u7f6e\u6761\u4ef6\u65ad\u70b9\uff0c\u5373\u5f53\u6ee1\u8db3\u7279\u5b9a\u6761\u4ef6\u65f6\u7a0b\u5e8f\u624d\u4f1a\u6682\u505c\u3002\u8fd9\u5bf9\u4e8e\u8c03\u8bd5\u5faa\u73af\u548c\u590d\u6742\u7684\u6761\u4ef6\u5224\u65ad\u975e\u5e38\u6709\u7528\u3002\u4f60\u53ef\u4ee5\u53f3\u952e\u70b9\u51fb\u65ad\u70b9\u56fe\u6807\uff0c\u9009\u62e9\u201cCondition\u201d\u5e76\u8f93\u5165\u6761\u4ef6\u8868\u8fbe\u5f0f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u65e5\u5fd7\u65ad\u70b9<\/strong><\/p>\n<p>\u65e5\u5fd7\u65ad\u70b9\u53ef\u4ee5\u5728\u4e0d\u6682\u505c\u7a0b\u5e8f\u7684\u60c5\u51b5\u4e0b\u8f93\u51fa\u65e5\u5fd7\u4fe1\u606f\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u5b83\u4eec\u5728\u7279\u5b9a\u4ee3\u7801\u884c\u8f93\u51fa\u53d8\u91cf\u503c\u6216\u8c03\u8bd5\u4fe1\u606f\uff0c\u800c\u4e0d\u5f71\u54cd\u7a0b\u5e8f\u7684\u6267\u884c\u6d41\u7a0b\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6027\u80fd\u5206\u6790<\/strong><\/p>\n<p>PyCharm\u96c6\u6210\u4e86\u6027\u80fd\u5206\u6790\u5de5\u5177\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u68c0\u6d4b\u4ee3\u7801\u4e2d\u7684\u6027\u80fd\u74f6\u9888\u3002\u901a\u8fc7\u5206\u6790\u8c03\u7528\u56fe\u548c\u6267\u884c\u65f6\u95f4\uff0c\u4f60\u53ef\u4ee5\u8bc6\u522b\u51fa\u9700\u8981\u4f18\u5316\u7684\u4ee3\u7801\u6bb5\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e03\u3001\u4f7f\u7528PyCharm\u8fdb\u884c\u6d4b\u8bd5<\/p>\n<\/p>\n<p><p>\u7f16\u5199\u6d4b\u8bd5\u662f\u4fdd\u8bc1\u4ee3\u7801\u8d28\u91cf\u7684\u91cd\u8981\u73af\u8282\uff0cPyCharm\u63d0\u4f9b\u4e86\u826f\u597d\u7684\u6d4b\u8bd5\u652f\u6301\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u6d4b\u8bd5\u7528\u4f8b<\/strong><\/p>\n<p>\u5728PyCharm\u4e2d\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u201cFile &gt; New &gt; Python File\u201d\u521b\u5efa\u6d4b\u8bd5\u6587\u4ef6\uff0c\u5e76\u4f7f\u7528unittest\u6216pytest\u6846\u67b6\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884c\u6d4b\u8bd5<\/strong><\/p>\n<p>PyCharm\u63d0\u4f9b\u4e86\u4e13\u95e8\u7684\u6d4b\u8bd5\u8fd0\u884c\u5668\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u53f3\u952e\u70b9\u51fb\u6d4b\u8bd5\u6587\u4ef6\u6216\u6d4b\u8bd5\u7c7b\uff0c\u9009\u62e9\u201cRun &#39;tests in [file_name]&#39;\u201d\u6765\u8fd0\u884c\u6d4b\u8bd5\u3002\u6d4b\u8bd5\u7ed3\u679c\u4f1a\u4ee5\u56fe\u5f62\u5316\u7684\u65b9\u5f0f\u663e\u793a\uff0c\u5e2e\u52a9\u4f60\u5feb\u901f\u5b9a\u4f4d\u5931\u8d25\u7684\u6d4b\u8bd5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u6d4b\u8bd5\u8986\u76d6\u7387<\/strong><\/p>\n<p>\u901a\u8fc7\u6d4b\u8bd5\u8986\u76d6\u7387\u5de5\u5177\uff0c\u4f60\u53ef\u4ee5\u67e5\u770b\u54ea\u4e9b\u4ee3\u7801\u884c\u88ab\u6d4b\u8bd5\u8986\u76d6\u4e86\uff0c\u54ea\u4e9b\u6ca1\u6709\u3002\u4f7f\u7528\u8fd9\u4e9b\u4fe1\u606f\u53ef\u4ee5\u5e2e\u52a9\u4f60\u63d0\u9ad8\u6d4b\u8bd5\u7684\u5b8c\u6574\u6027\u548c\u4ee3\u7801\u7684\u53ef\u9760\u6027\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516b\u3001PyCharm\u7684\u6269\u5c55\u529f\u80fd<\/p>\n<\/p>\n<p><p>PyCharm\u63d0\u4f9b\u4e86\u8bb8\u591a\u6269\u5c55\u529f\u80fd\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u66f4\u9ad8\u6548\u5730\u5b8c\u6210\u5de5\u4f5c\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8fdc\u7a0b\u5f00\u53d1<\/strong><\/p>\n<p>PyCharm\u652f\u6301\u8fdc\u7a0b\u5f00\u53d1\uff0c\u4f60\u53ef\u4ee5\u5728\u672c\u5730\u7f16\u8f91\u4ee3\u7801\uff0c\u5e76\u901a\u8fc7SSH\u8fde\u63a5\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u6267\u884c\u4ee3\u7801\u3002\u8fd9\u5bf9\u4e8e\u5728\u9ad8\u6027\u80fd\u8ba1\u7b97\u73af\u5883\u4e2d\u5f00\u53d1\u975e\u5e38\u6709\u7528\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6570\u636e\u5e93\u5de5\u5177<\/strong><\/p>\n<p>PyCharm\u5185\u7f6e\u4e86\u5f3a\u5927\u7684\u6570\u636e\u5e93\u5de5\u5177\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u5728IDE\u4e2d\u8fde\u63a5\u6570\u636e\u5e93\uff0c\u6267\u884cSQL\u67e5\u8be2\uff0c\u7ba1\u7406\u6570\u636e\u8868\u3002\u8fd9\u5bf9\u4e8e\u5f00\u53d1Web\u5e94\u7528\u548c\u6570\u636e\u9a71\u52a8\u7684\u5e94\u7528\u975e\u5e38\u65b9\u4fbf\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4ee3\u7801\u91cd\u6784<\/strong><\/p>\n<p>PyCharm\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u4ee3\u7801\u91cd\u6784\u5de5\u5177\uff0c\u4f60\u53ef\u4ee5\u8f7b\u677e\u5730\u91cd\u547d\u540d\u53d8\u91cf\u3001\u63d0\u53d6\u65b9\u6cd5\u3001\u4f18\u5316\u5bfc\u5165\u7b49\u3002\u8fd9\u4e9b\u5de5\u5177\u6709\u52a9\u4e8e\u4fdd\u6301\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e5d\u3001\u63d0\u9ad8PyCharm\u4f7f\u7528\u6548\u7387\u7684\u6280\u5de7<\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u66f4\u9ad8\u6548\u5730\u4f7f\u7528PyCharm\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5b66\u4e60\u4e00\u4e9b\u5c0f\u6280\u5de7\u548c\u5feb\u6377\u952e\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528\u5feb\u6377\u952e<\/strong><\/p>\n<p>PyCharm\u63d0\u4f9b\u4e86\u8bb8\u591a\u5feb\u6377\u952e\uff0c\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5feb\u901f\u5b8c\u6210\u5e38\u89c1\u64cd\u4f5c\u3002\u4f8b\u5982\uff0c<code>Ctrl + Space<\/code>\u7528\u4e8e\u4ee3\u7801\u8865\u5168\uff0c<code>Ctrl + \/<\/code>\u7528\u4e8e\u6ce8\u91ca\u548c\u53d6\u6d88\u6ce8\u91ca\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u81ea\u5b9a\u4e49\u754c\u9762<\/strong><\/p>\n<p>\u4f60\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u7684\u4e60\u60ef\u81ea\u5b9a\u4e49PyCharm\u7684\u754c\u9762\u5e03\u5c40\u548c\u914d\u8272\u65b9\u6848\u3002\u901a\u8fc7\u201cFile &gt; Settings &gt; Appearance &amp; Behavior\u201d\u53ef\u4ee5\u8c03\u6574\u4e3b\u9898\u3001\u5b57\u4f53\u548c\u5176\u4ed6\u754c\u9762\u5143\u7d20\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u63d2\u4ef6<\/strong><\/p>\n<p>\u6839\u636e\u9879\u76ee\u9700\u6c42\uff0c\u4f60\u53ef\u4ee5\u5728PyCharm\u7684\u63d2\u4ef6\u5e02\u573a\u4e2d\u641c\u7d22\u548c\u5b89\u88c5\u5404\u79cd\u63d2\u4ef6\uff0c\u4ee5\u589e\u5f3aPyCharm\u7684\u529f\u80fd\u3002\u4f8b\u5982\uff0cMarkdown\u63d2\u4ef6\u3001Docker\u63d2\u4ef6\u7b49\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u5341\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728PyCharm\u4e2d\u8fd0\u884cPython\u7a0b\u5e8f\u662f\u4e00\u4e2a\u7b80\u5355\u800c\u5f3a\u5927\u7684\u8fc7\u7a0b\u3002\u901a\u8fc7\u6b63\u786e\u5b89\u88c5\u548c\u914d\u7f6ePyCharm\uff0c\u4ee5\u53ca\u4e86\u89e3\u5176\u4e30\u5bcc\u7684\u529f\u80fd\u548c\u5de5\u5177\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u9ad8\u6548\u5730\u7f16\u5199\u3001\u8c03\u8bd5\u548c\u4f18\u5316Python\u4ee3\u7801\u3002\u65e0\u8bba\u662f\u4e2a\u4eba\u9879\u76ee\u8fd8\u662f\u5927\u578b\u56e2\u961f\u534f\u4f5c\uff0cPyCharm\u90fd\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u652f\u6301\u548c\u7075\u6d3b\u6027\uff0c\u4f7f\u5176\u6210\u4e3aPython\u5f00\u53d1\u8005\u7684\u9996\u9009IDE\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728PyCharm\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u9879\u76ee\uff1f<\/strong><br \/>\u5728PyCharm\u4e2d\u521b\u5efa\u65b0\u9879\u76ee\u975e\u5e38\u7b80\u5355\u3002\u6253\u5f00PyCharm\u540e\uff0c\u9009\u62e9\u201c\u65b0\u5efa\u9879\u76ee\u201d\u9009\u9879\u3002\u5728\u5f39\u51fa\u7684\u7a97\u53e3\u4e2d\uff0c\u60a8\u9700\u8981\u9009\u62e9\u9879\u76ee\u7684\u8def\u5f84\u548cPython\u89e3\u91ca\u5668\u3002\u786e\u4fdd\u9009\u62e9\u6b63\u786e\u7684Python\u7248\u672c\uff0c\u4ee5\u4fbf\u60a8\u7684\u4ee3\u7801\u80fd\u591f\u6b63\u5e38\u8fd0\u884c\u3002\u5b8c\u6210\u8bbe\u7f6e\u540e\uff0c\u70b9\u51fb\u201c\u521b\u5efa\u201d\u5373\u53ef\u3002<\/p>\n<p><strong>\u5728PyCharm\u4e2d\u8fd0\u884cPython\u811a\u672c\u65f6\u9047\u5230\u9519\u8bef\uff0c\u8be5\u5982\u4f55\u89e3\u51b3\uff1f<\/strong><br \/>\u5982\u679c\u5728\u8fd0\u884cPython\u811a\u672c\u65f6\u51fa\u73b0\u9519\u8bef\uff0c\u60a8\u53ef\u4ee5\u67e5\u770bPyCharm\u7684\u201c\u8fd0\u884c\u201d\u7a97\u53e3\u4ee5\u83b7\u53d6\u8be6\u7ec6\u7684\u9519\u8bef\u4fe1\u606f\u3002\u5e38\u89c1\u7684\u95ee\u9898\u5305\u62ec\u6a21\u5757\u672a\u627e\u5230\u3001\u8bed\u6cd5\u9519\u8bef\u6216\u8def\u5f84\u95ee\u9898\u3002\u6839\u636e\u9519\u8bef\u63d0\u793a\u8fdb\u884c\u76f8\u5e94\u7684\u8c03\u6574\uff0c\u6bd4\u5982\u68c0\u67e5\u6a21\u5757\u662f\u5426\u5b89\u88c5\u6216\u786e\u8ba4\u6587\u4ef6\u8def\u5f84\u662f\u5426\u6b63\u786e\u3002<\/p>\n<p><strong>PyCharm\u652f\u6301\u54ea\u4e9b\u8c03\u8bd5\u529f\u80fd\uff1f<\/strong><br \/>PyCharm\u63d0\u4f9b\u5f3a\u5927\u7684\u8c03\u8bd5\u529f\u80fd\uff0c\u5305\u62ec\u8bbe\u7f6e\u65ad\u70b9\u3001\u67e5\u770b\u53d8\u91cf\u503c\u548c\u9010\u6b65\u6267\u884c\u4ee3\u7801\u3002\u60a8\u53ef\u4ee5\u5728\u4ee3\u7801\u7684\u884c\u53f7\u65c1\u8fb9\u70b9\u51fb\u4ee5\u6dfb\u52a0\u65ad\u70b9\uff0c\u7136\u540e\u4f7f\u7528\u8c03\u8bd5\u5de5\u5177\u680f\u4e2d\u7684\u201c\u8c03\u8bd5\u201d\u6309\u94ae\u542f\u52a8\u8c03\u8bd5\u6a21\u5f0f\u3002\u8c03\u8bd5\u65f6\uff0c\u60a8\u53ef\u4ee5\u6682\u505c\u7a0b\u5e8f\u6267\u884c\uff0c\u5e76\u68c0\u67e5\u5f53\u524d\u72b6\u6001\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u7406\u89e3\u4ee3\u7801\u7684\u8fd0\u884c\u8fc7\u7a0b\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728PyCharm\u4e2d\u7ba1\u7406Python\u5e93\u548c\u4f9d\u8d56\uff1f<\/strong><br \/>\u5728PyCharm\u4e2d\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u201c\u9879\u76ee\u89e3\u91ca\u5668\u201d\u7ba1\u7406Python\u5e93\u548c\u4f9d\u8d56\u3002\u8fdb\u5165\u201c\u6587\u4ef6\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201c\u8bbe\u7f6e\u201d\uff0c\u7136\u540e\u5728\u201c\u9879\u76ee: [\u60a8\u7684\u9879\u76ee\u540d]\u201d\u4e0b\u627e\u5230\u201c\u9879\u76ee\u89e3\u91ca\u5668\u201d\u3002\u5728\u8fd9\u91cc\uff0c\u60a8\u53ef\u4ee5\u67e5\u770b\u5df2\u5b89\u88c5\u7684\u5e93\uff0c\u6dfb\u52a0\u65b0\u5e93\u6216\u66f4\u65b0\u73b0\u6709\u5e93\u3002PyCharm\u652f\u6301\u901a\u8fc7pip\u5b89\u88c5\u5e93\uff0c\u60a8\u53ea\u9700\u5728\u6b64\u754c\u9762\u4e2d\u8f93\u5165\u5e93\u7684\u540d\u79f0\u5e76\u786e\u8ba4\u5b89\u88c5\u5373\u53ef\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728PyCharm\u4e2d\u8fd0\u884cPython\u7a0b\u5e8f\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5982\u4f7f\u7528\u201c\u8fd0\u884c\u201d\u6309\u94ae\u3001\u53f3\u952e\u83dc\u5355\u548c\u952e\u76d8\u5feb\u6377\u952e\u3002 \u5176\u4e2d\uff0c\u4f7f\u7528\u201c\u8fd0 [&hellip;]","protected":false},"author":3,"featured_media":938663,"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\/938660"}],"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=938660"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/938660\/revisions"}],"predecessor-version":[{"id":938664,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/938660\/revisions\/938664"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/938663"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=938660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=938660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=938660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}