{"id":272041,"date":"2024-05-16T13:07:29","date_gmt":"2024-05-16T05:07:29","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/272041.html"},"modified":"2024-05-16T13:07:39","modified_gmt":"2024-05-16T05:07:39","slug":"pycharm-%e9%a1%b9%e7%9b%ae%e5%a6%82%e4%bd%95%e5%bf%ab%e9%80%9f%e6%b7%bb%e5%8a%a0%e8%bf%9c%e7%a8%8b%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/272041.html","title":{"rendered":"pycharm \u9879\u76ee\u5982\u4f55\u5feb\u901f\u6dfb\u52a0\u8fdc\u7a0b\u73af\u5883"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24194603\/b217388e-241c-4b77-9aaa-5b5167be3609.webp\" alt=\"pycharm \u9879\u76ee\u5982\u4f55\u5feb\u901f\u6dfb\u52a0\u8fdc\u7a0b\u73af\u5883\" \/><\/p>\n<p><p>\u5728PyCharm\u4e2d\u5feb\u901f\u6dfb\u52a0\u8fdc\u7a0b\u73af\u5883\uff0c\u4e3b\u8981\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<strong>\u5b89\u88c5\u548c\u914d\u7f6e PyCharm\u3001\u8bbe\u7f6e SSH \u8fde\u63a5\u3001\u914d\u7f6e\u8fdc\u7a0b\u89e3\u91ca\u5668\u3001\u540c\u6b65\u9879\u76ee\u6587\u4ef6\u3001\u6d4b\u8bd5\u548c\u8c03\u8bd5<\/strong>\u3002<strong>\u5176\u4e2d\uff0c\u914d\u7f6e\u8fdc\u7a0b\u89e3\u91ca\u5668<\/strong>\u662f\u6838\u5fc3\u6b65\u9aa4\uff0c\u56e0\u4e3a\u5b83\u76f4\u63a5\u5173\u7cfb\u5230\u672c\u5730\u5f00\u53d1\u73af\u5883\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e4b\u95f4\u7684\u4ea4\u4e92\u80fd\u529b\u4ee5\u53ca\u5982\u4f55\u5229\u7528\u8fdc\u7a0b\u73af\u5883\u7684\u8d44\u6e90\u8fdb\u884c\u5f00\u53d1\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001 \u5b89\u88c5\u548c\u914d\u7f6e PyCharm<\/h3>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u5df2\u7ecf\u5728\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5\u4e86 PyCharm \u4e13\u4e1a\u7248\u3002\u53ea\u6709\u4e13\u4e1a\u7248\u624d\u652f\u6301\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u8fdb\u884c\u8fde\u63a5\u3002\u5b89\u88c5\u5b8c\u6bd5\u540e\uff0c\u6253\u5f00 PyCharm \u5e76\u8bbe\u7f6e\u4f18\u5148\u7684\u5de5\u4f5c\u7a7a\u95f4\uff0c\u6839\u636e\u5f15\u5bfc\u5b8c\u6210\u57fa\u672c\u914d\u7f6e\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001 \u8bbe\u7f6e SSH \u8fde\u63a5<\/h3>\n<\/p>\n<p><p>\u5728 PyCharm \u4e2d\u5feb\u901f\u6dfb\u52a0\u8fdc\u7a0b\u73af\u5883\uff0c\u9996\u8981\u524d\u63d0\u662f\u5efa\u7acb\u672c\u5730\u8ba1\u7b97\u673a\u4e0e\u8fdc\u7a0b\u670d\u52a1\u5668\u4e4b\u95f4\u7684 SSH \u8fde\u63a5\u3002<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00 PyCharm\uff0c\u8fdb\u5165 <strong>Settings<\/strong> \u6216 <strong>Preferences<\/strong>\uff08\u53d6\u51b3\u4e8e\u4f60\u7684\u64cd\u4f5c\u7cfb\u7edf\uff09\u3002<\/li>\n<li>\u5728\u5f39\u51fa\u7684\u83dc\u5355\u4e2d\uff0c\u9009\u62e9 <strong>&quot;Build, Execution, Deployment&quot; &gt; &quot;Deployment&quot;<\/strong>\u3002<\/li>\n<li>\u70b9\u51fb &quot;+&quot; \u6765\u6dfb\u52a0\u4e00\u4e2a\u65b0\u7684\u8fde\u63a5\uff0c\u5e76\u9009\u62e9 <strong>SFTP<\/strong> \u4f5c\u4e3a\u8fde\u63a5\u7c7b\u578b\u3002<\/li>\n<li>\u5728\u51fa\u73b0\u7684\u754c\u9762\u4e2d\uff0c\u586b\u5199\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u76f8\u5173\u4fe1\u606f\uff08\u5982\uff1a\u4e3b\u673a\u540d\u3001\u7aef\u53e3\u3001\u7528\u6237\u540d\u548c\u5bc6\u7801\u6216\u5bc6\u94a5\u6587\u4ef6\u7b49\uff09\u3002<\/li>\n<li>\u6d4b\u8bd5\u8fde\u63a5\uff0c\u786e\u4fdd\u8bbe\u7f6e\u6b63\u786e\u65e0\u8bef\u3002<\/li>\n<\/ol>\n<p><h3>\u4e09\u3001 \u914d\u7f6e\u8fdc\u7a0b\u89e3\u91ca\u5668<\/h3>\n<\/p>\n<p><p><strong>\u914d\u7f6e\u8fdc\u7a0b\u89e3\u91ca\u5668<\/strong>\u662f\u6838\u5fc3\u6b65\u9aa4\uff0c\u6d89\u53ca\u5230 Python \u89e3\u91ca\u5668\u7684\u8fdc\u7aef\u914d\u7f6e\uff0c\u5141\u8bb8 PyCharm \u901a\u8fc7 SSH \u4f7f\u7528\u8fdc\u7a0b\u73af\u5883\u3002<\/p>\n<\/p>\n<ol>\n<li>\u5728 PyCharm \u4e2d\u6253\u5f00\u9879\u76ee\uff0c\u8fdb\u5165 <strong>&quot;File&quot; &gt; &quot;Settings&quot;<\/strong>\u3002<\/li>\n<li>\u9009\u62e9 <strong>&quot;Project: [\u4f60\u7684\u9879\u76ee\u540d]&quot; &gt; &quot;Project Interpreter&quot;<\/strong>\u3002<\/li>\n<li>\u70b9\u51fb\u9f7f\u8f6e\u56fe\u6807\uff0c\u9009\u62e9 <strong>&quot;Add&quot;<\/strong>\u3002<\/li>\n<li>\u5728\u5f39\u51fa\u7684\u7a97\u53e3\u4e2d\uff0c\u9009\u62e9 <strong>&quot;SSH Interpreter&quot;<\/strong>\uff0c\u8f93\u5165\u4e4b\u524d\u8bbe\u7f6e\u7684 SSH \u8fde\u63a5\u4fe1\u606f\u3002<\/li>\n<li>\u9009\u62e9\u8fdc\u7a0b\u73af\u5883\u4e2d\u5df2\u5b89\u88c5\u7684 Python \u89e3\u91ca\u5668\u6216\u5b89\u88c5\u4e00\u4e2a\u65b0\u7684\u89e3\u91ca\u5668\u3002<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u8fd9\u4e9b\u6b65\u9aa4\uff0cPyCharm \u5c06\u914d\u7f6e\u4e3a\u4f7f\u7528\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u7684 Python \u73af\u5883\uff0c\u4f7f\u5f97\u9879\u76ee\u53ef\u4ee5\u5229\u7528\u8fdc\u7a0b\u8d44\u6e90\u8fdb\u884c\u5f00\u53d1\u548c\u6d4b\u8bd5\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001 \u540c\u6b65\u9879\u76ee\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u4fdd\u8bc1\u672c\u5730\u5f00\u53d1\u548c\u8fdc\u7a0b\u6267\u884c\u7684\u4e00\u81f4\u6027\uff0c\u9700\u8981\u540c\u6b65\u9879\u76ee\u6587\u4ef6\u3002<\/p>\n<\/p>\n<ol>\n<li>\u5728 <strong>&quot;Build, Execution, Deployment&quot; &gt; &quot;Deployment&quot;<\/strong> \u4e2d\u914d\u7f6e\u597d\u7684\u8fde\u63a5\u4e0b\uff0c\u8bbe\u7f6e <strong>&quot;Automatic Upload&quot;<\/strong> \u9009\u9879\uff0c\u4ee5\u786e\u4fdd\u5728\u672c\u5730\u6587\u4ef6\u66f4\u6539\u65f6\uff0c\u81ea\u52a8\u540c\u6b65\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u3002<\/li>\n<li>\u4f7f\u7528 <strong>&quot;Upload to\u2026&quot;<\/strong> \u624b\u52a8\u540c\u6b65\u9879\u76ee\u6587\u4ef6\u3002<\/li>\n<\/ol>\n<p><h3>\u4e94\u3001 \u6d4b\u8bd5\u548c\u8c03\u8bd5<\/h3>\n<\/p>\n<p><p>\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u8fd0\u884c\/\u8c03\u8bd5\u914d\u7f6e\u6765\u6d4b\u8bd5\u8fdc\u7a0b\u73af\u5883\u3002<\/p>\n<\/p>\n<ol>\n<li>\u8fdb\u5165 <strong>Run &gt; Edit Configurations\u2026<\/strong>\uff0c\u70b9\u51fb &quot;+&quot; \u6dfb\u52a0\u914d\u7f6e\u3002<\/li>\n<li>\u9009\u62e9 Python \u89e3\u91ca\u5668\u4e3a\u4e4b\u524d\u914d\u7f6e\u7684\u8fdc\u7a0b\u89e3\u91ca\u5668\u3002<\/li>\n<li>\u8bbe\u7f6e\u597d\u811a\u672c\u8def\u5f84\u3001\u53c2\u6570\u7b49\u4fe1\u606f\u3002<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4e0a\u9762\u7684\u6b65\u9aa4\uff0c\u4f60\u7684 PyCharm \u9879\u76ee\u5c31\u6210\u529f\u914d\u7f6e\u4e86\u8fdc\u7a0b\u73af\u5883\uff0c\u53ef\u4ee5\u5f00\u59cb\u4eab\u53d7\u8fdc\u7a0b\u5f00\u53d1\u7684\u4fbf\u5229\u4e86\u3002\u4f7f\u7528\u8fdc\u7a0b\u73af\u5883\uff0c\u53ef\u4ee5\u8ba9\u5f00\u53d1\u8005\u4e0d\u53d7\u672c\u5730\u8d44\u6e90\u9650\u5236\uff0c\u5145\u5206\u5229\u7528\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u8ba1\u7b97\u80fd\u529b\uff0c\u5c24\u5176\u5bf9\u4e8e\u9700\u8981\u5927\u91cf\u8ba1\u7b97\u8d44\u6e90\u7684\u9879\u76ee\u6765\u8bf4\uff0c\u8fd9\u4e00\u70b9\u5c24\u4e3a\u91cd\u8981\u3002\u6b64\u5916\uff0c\u901a\u8fc7\u5728\u4e0d\u540c\u7684\u73af\u5883\u4e2d\u6d4b\u8bd5\u9879\u76ee\uff0c\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u7a33\u5b9a\u6027\u548c\u517c\u5bb9\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>\u5feb\u901f\u6dfb\u52a0\u8fdc\u7a0b\u73af\u5883\u6709\u54ea\u4e9b\u65b9\u6cd5\uff1f<\/strong><\/p>\n<ul>\n<li>\n<p><strong>\u65b9\u6cd5\u4e00\uff1a\u901a\u8fc7PyCharm\u7684\u8fdc\u7a0b\u8fde\u63a5\u529f\u80fd<\/strong><br \/>\nPyCharm\u63d0\u4f9b\u4e86\u8fdc\u7a0b\u8fde\u63a5\u529f\u80fd\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u5c06\u9879\u76ee\u4e0e\u8fdc\u7a0b\u73af\u5883\u8fdb\u884c\u5173\u8054\u3002\u5728PyCharm\u4e2d\u9009\u62e9&quot;File&quot; -&gt; &quot;Settings&quot; -&gt; &quot;Project: [\u9879\u76ee\u540d\u79f0]&quot; -&gt; &quot;Python Interpreter&quot;\u3002\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u9f7f\u8f6e\u6309\u94ae\uff0c\u9009\u62e9&quot;Add&quot; -&gt; &quot;SSH Interpreter&quot;\uff0c\u586b\u5199\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4fe1\u606f\u5e76\u4fdd\u5b58\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u65b9\u6cd5\u4e8c\uff1a\u901a\u8fc7\u4f7f\u7528Docker\u5bb9\u5668<\/strong><br \/>\n\u5982\u679c\u4f60\u7684\u8fdc\u7a0b\u73af\u5883\u662f\u57fa\u4e8eDocker\u5bb9\u5668\u7684\uff0c\u53ef\u4ee5\u5728PyCharm\u4e2d\u9009\u62e9&quot;File&quot; -&gt; &quot;Settings&quot; -&gt; &quot;Build, Execution, Deployment&quot; -&gt; &quot;Docker&quot;\uff0c\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684&quot;+&quot;\u6309\u94ae\uff0c\u9009\u62e9&quot;Add Remote&quot;\u5e76\u586b\u5199Docker\u4e3b\u673a\u7684\u8fde\u63a5\u4fe1\u606f\u3002\u4fdd\u5b58\u540e\uff0c\u5728&quot;Python Interpreter&quot;\u4e2d\u9009\u62e9\u8fd9\u4e2a\u65b0\u6dfb\u52a0\u7684Docker\u5bb9\u5668\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u65b9\u6cd5\u4e09\uff1a\u4f7f\u7528FTP\/SFTP\u65b9\u5f0f<\/strong><br \/>\n\u5982\u679c\u4f60\u7684\u8fdc\u7a0b\u73af\u5883\u4f7f\u7528FTP\u6216SFTP\u8fdb\u884c\u6587\u4ef6\u4f20\u8f93\uff0c\u53ef\u4ee5\u5728PyCharm\u4e2d\u9009\u62e9&quot;File&quot; -&gt; &quot;Settings&quot; -&gt; &quot;Build, Execution, Deployment&quot; -&gt; &quot;Deployment&quot;\u3002\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684&quot;+&quot;\u6309\u94ae\uff0c\u9009\u62e9&quot;FTP\/SFTP&quot;\uff0c\u586b\u5199\u8fdc\u7a0b\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4fe1\u606f\u5e76\u4fdd\u5b58\u3002\u7136\u540e\uff0c\u5728&quot;Python Interpreter&quot;\u4e2d\u9009\u62e9\u8fd9\u4e2a\u65b0\u6dfb\u52a0\u7684FTP\/SFTP\u914d\u7f6e\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u65b9\u6cd5\u90fd\u53ef\u4ee5\u5feb\u901f\u5c06PyCharm\u9879\u76ee\u4e0e\u8fdc\u7a0b\u73af\u5883\u5173\u8054\u8d77\u6765\uff0c\u65b9\u4fbf\u672c\u5730\u5f00\u53d1\u4e0e\u8fdc\u7a0b\u8c03\u8bd5\u3002\u9009\u62e9\u9002\u5408\u81ea\u5df1\u7684\u65b9\u6cd5\uff0c\u5e76\u6309\u7167\u63d0\u793a\u586b\u5199\u6b63\u786e\u7684\u8fde\u63a5\u4fe1\u606f\uff0c\u5c31\u53ef\u4ee5\u8ba9PyCharm\u4e0e\u8fdc\u7a0b\u73af\u5883\u6109\u5feb\u5730\u914d\u5408\u5de5\u4f5c\u4e86\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728PyCharm\u4e2d\u5feb\u901f\u6dfb\u52a0\u8fdc\u7a0b\u73af\u5883\uff0c\u4e3b\u8981\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a\u5b89\u88c5\u548c\u914d\u7f6e PyCharm\u3001\u8bbe\u7f6e SSH \u8fde\u63a5\u3001\u914d\u7f6e [&hellip;]","protected":false},"author":3,"featured_media":272057,"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\/272041"}],"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=272041"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/272041\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/272057"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=272041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=272041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=272041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}