{"id":1102268,"date":"2025-01-08T15:58:11","date_gmt":"2025-01-08T07:58:11","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1102268.html"},"modified":"2025-01-08T15:58:13","modified_gmt":"2025-01-08T07:58:13","slug":"%e5%a6%82%e4%bd%95%e5%9c%a8cmd%e4%b8%ad%e6%89%93%e5%bc%80python%e6%96%87%e4%bb%b6%e5%a4%b9-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1102268.html","title":{"rendered":"\u5982\u4f55\u5728cmd\u4e2d\u6253\u5f00python\u6587\u4ef6\u5939"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25064644\/4b47eba0-3311-465d-a46c-1ef32cec7566.webp\" alt=\"\u5982\u4f55\u5728cmd\u4e2d\u6253\u5f00python\u6587\u4ef6\u5939\" \/><\/p>\n<p><p> <strong>\u8981\u5728cmd\u4e2d\u6253\u5f00python\u6587\u4ef6\u5939\uff0c\u53ef\u4ee5\u4f7f\u7528cd\u547d\u4ee4\u3001\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u3001\u76f4\u63a5\u8fd0\u884cpython\u6587\u4ef6\u7b49<\/strong>\u3002\u5176\u4e2d\uff0c\u6700\u5e38\u89c1\u4e14\u65b9\u4fbf\u7684\u65b9\u6cd5\u662f\u4f7f\u7528cd\u547d\u4ee4\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u63cf\u8ff0\u5982\u4f55\u901a\u8fc7cmd\u6253\u5f00python\u6587\u4ef6\u5939\u7684\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c<strong>cd\u547d\u4ee4<\/strong>\u662f\u7528\u4e8e\u5728\u547d\u4ee4\u63d0\u793a\u7b26\uff08cmd\uff09\u4e2d\u66f4\u6539\u76ee\u5f55\u3002\u5047\u8bbe\u4f60\u7684Python\u6587\u4ef6\u5939\u8def\u5f84\u662fC:\\Python39\uff0c\u90a3\u4e48\u4f60\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08cmd\uff09\uff0c\u53ef\u4ee5\u901a\u8fc7\u5728Windows\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201ccmd\u201d\u5e76\u70b9\u51fb\u6253\u5f00\u3002<\/li>\n<li>\u8f93\u5165\u547d\u4ee4<code>cd C:\\Python39<\/code>\uff0c\u7136\u540e\u6309Enter\u952e\u3002<\/li>\n<\/ol>\n<p><p>\u8fd9\u6837\uff0c\u4f60\u5c31\u6210\u529f\u5730\u5bfc\u822a\u5230\u4e86Python\u6587\u4ef6\u5939\u3002\u63a5\u4e0b\u6765\uff0c\u4f60\u53ef\u4ee5\u5728\u8be5\u6587\u4ef6\u5939\u4e0b\u6267\u884cPython\u811a\u672c\uff0c\u6216\u8fdb\u884c\u5176\u4ed6\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001cd\u547d\u4ee4\u6253\u5f00Python\u6587\u4ef6\u5939<\/h3>\n<\/p>\n<p><p>cd\u547d\u4ee4\u662f\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u6700\u5e38\u7528\u7684\u547d\u4ee4\u4e4b\u4e00\uff0c\u7528\u4e8e\u66f4\u6539\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<p><h4>1. \u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff08cmd\uff09\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u6253\u5f00\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u6309\u4e0b<code>Win + R<\/code>\u7ec4\u5408\u952e\uff0c\u8f93\u5165<code>cmd<\/code>\uff0c\u7136\u540e\u6309Enter\u952e\u3002<\/li>\n<li>\u6216\u8005\u76f4\u63a5\u5728Windows\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201ccmd\u201d\uff0c\u5e76\u70b9\u51fb\u6253\u5f00\u3002<\/li>\n<\/ul>\n<p><h4>2. \u4f7f\u7528cd\u547d\u4ee4\u5bfc\u822a\u5230Python\u6587\u4ef6\u5939<\/h4>\n<\/p>\n<p><p>\u5047\u8bbe\u4f60\u7684Python\u6587\u4ef6\u5939\u4f4d\u4e8eC\u76d8\u6839\u76ee\u5f55\u4e0b\uff0c\u8def\u5f84\u4e3a<code>C:\\Python39<\/code>\u3002\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">cd C:\\Python39<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\u6309Enter\u952e\uff0c\u4f60\u5c31\u6210\u529f\u5730\u5bfc\u822a\u5230\u4e86Python\u6587\u4ef6\u5939\u3002\u5728\u8be5\u6587\u4ef6\u5939\u4e0b\uff0c\u4f60\u53ef\u4ee5\u6267\u884cPython\u811a\u672c\u6216\u8fdb\u884c\u5176\u4ed6\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf<\/h3>\n<\/p>\n<p><p>\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u8fd9\u6837\u4f60\u53ef\u4ee5\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u76f4\u63a5\u8f93\u5165\u201cpython\u201d\u6765\u8fd0\u884cPython\uff0c\u800c\u4e0d\u9700\u8981\u6bcf\u6b21\u90fd\u5bfc\u822a\u5230Python\u5b89\u88c5\u76ee\u5f55\u3002\u8fd9\u5bf9\u4e8e\u9891\u7e41\u4f7f\u7528Python\u7684\u5f00\u53d1\u8005\u6765\u8bf4\u975e\u5e38\u65b9\u4fbf\u3002<\/p>\n<\/p>\n<p><h4>1. \u67e5\u627ePython\u5b89\u88c5\u8def\u5f84<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u77e5\u9053Python\u7684\u5b89\u88c5\u8def\u5f84\u3002\u901a\u5e38\uff0c\u9ed8\u8ba4\u5b89\u88c5\u8def\u5f84\u4e3a<code>C:\\Python39<\/code>\uff0c\u4f46\u5982\u679c\u4f60\u5728\u5b89\u88c5\u65f6\u9009\u62e9\u4e86\u81ea\u5b9a\u4e49\u8def\u5f84\uff0c\u5219\u9700\u8981\u627e\u5230\u8be5\u8def\u5f84\u3002<\/p>\n<\/p>\n<p><h4>2. \u8bbe\u7f6e\u73af\u5883\u53d8\u91cf<\/h4>\n<\/p>\n<p><p>\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u53f3\u952e\u70b9\u51fb\u201c\u6b64\u7535\u8111\u201d\u6216\u201c\u6211\u7684\u7535\u8111\u201d\uff0c\u9009\u62e9\u201c\u5c5e\u6027\u201d\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d\u3002<\/li>\n<li>\u5728\u201c\u7cfb\u7edf\u5c5e\u6027\u201d\u7a97\u53e3\u4e2d\uff0c\u70b9\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\u6309\u94ae\u3002<\/li>\n<li>\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u90e8\u5206\uff0c\u627e\u5230\u5e76\u9009\u62e9\u201cPath\u201d\uff0c\u7136\u540e\u70b9\u51fb\u201c\u7f16\u8f91\u201d\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u65b0\u5efa\u201d\uff0c\u7136\u540e\u8f93\u5165Python\u7684\u5b89\u88c5\u8def\u5f84\uff0c\u4f8b\u5982<code>C:\\Python39<\/code>\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u786e\u5b9a\u201d\u4fdd\u5b58\u66f4\u6539\u3002<\/li>\n<\/ol>\n<p><p>\u8bbe\u7f6e\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u76f4\u63a5\u8f93\u5165<code>python<\/code>\u6765\u8fd0\u884cPython\uff0c\u800c\u4e0d\u9700\u8981\u6bcf\u6b21\u90fd\u5bfc\u822a\u5230Python\u5b89\u88c5\u76ee\u5f55\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u76f4\u63a5\u8fd0\u884cPython\u6587\u4ef6<\/h3>\n<\/p>\n<p><p>\u4f60\u8fd8\u53ef\u4ee5\u76f4\u63a5\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8fd0\u884cPython\u6587\u4ef6\uff0c\u800c\u65e0\u9700\u5148\u5bfc\u822a\u5230Python\u6587\u4ef6\u5939\u3002<\/p>\n<\/p>\n<p><h4>1. \u67e5\u627ePython\u6587\u4ef6\u8def\u5f84<\/h4>\n<\/p>\n<p><p>\u5047\u8bbe\u4f60\u7684Python\u6587\u4ef6\u4f4d\u4e8e<code>C:\\Projects\\my_script.py<\/code>\u3002<\/p>\n<\/p>\n<p><h4>2. \u8fd0\u884cPython\u6587\u4ef6<\/h4>\n<\/p>\n<p><p>\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python C:\\Projects\\my_script.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u7136\u540e\u6309Enter\u952e\uff0cPython\u89e3\u91ca\u5668\u4f1a\u76f4\u63a5\u8fd0\u884c\u8be5\u811a\u672c\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u5728\u4f7f\u7528cmd\u6253\u5f00Python\u6587\u4ef6\u5939\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\uff0c\u4e0b\u9762\u5217\u51fa\u4e86\u4e00\u4e9b\u95ee\u9898\u53ca\u5176\u89e3\u51b3\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h4>1. \u627e\u4e0d\u5230Python\u547d\u4ee4<\/h4>\n<\/p>\n<p><p>\u5982\u679c\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165<code>python<\/code>\u547d\u4ee4\u540e\uff0c\u7cfb\u7edf\u63d0\u793a\u627e\u4e0d\u5230\u8be5\u547d\u4ee4\uff0c\u53ef\u80fd\u662f\u56e0\u4e3a\u6ca1\u6709\u6b63\u786e\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u3002\u53ef\u4ee5\u6309\u7167\u524d\u9762\u63d0\u5230\u7684\u6b65\u9aa4\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u4ee5\u4fbf\u7cfb\u7edf\u8bc6\u522bPython\u547d\u4ee4\u3002<\/p>\n<\/p>\n<p><h4>2. \u6743\u9650\u95ee\u9898<\/h4>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u4f60\u53ef\u80fd\u4f1a\u9047\u5230\u6743\u9650\u95ee\u9898\uff0c\u5bfc\u81f4\u65e0\u6cd5\u8bbf\u95ee\u67d0\u4e9b\u6587\u4ef6\u5939\u6216\u6267\u884c\u67d0\u4e9b\u547d\u4ee4\u3002\u8fd9\u65f6\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u547d\u4ee4\u63d0\u793a\u7b26\u3002\u53f3\u952e\u70b9\u51fb\u201c\u547d\u4ee4\u63d0\u793a\u7b26\u201d\u56fe\u6807\uff0c\u9009\u62e9\u201c\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u201d\u3002<\/p>\n<\/p>\n<p><h4>3. \u8def\u5f84\u5305\u542b\u7a7a\u683c<\/h4>\n<\/p>\n<p><p>\u5982\u679cPython\u5b89\u88c5\u8def\u5f84\u6216\u6587\u4ef6\u8def\u5f84\u5305\u542b\u7a7a\u683c\uff0c\u9700\u8981\u5728\u8def\u5f84\u4e24\u8fb9\u52a0\u4e0a\u53cc\u5f15\u53f7\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">cd &quot;C:\\Program Files\\Python39&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001Python\u6587\u4ef6\u5939\u7ba1\u7406\u6280\u5de7<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u66f4\u597d\u5730\u7ba1\u7406\u548c\u4f7f\u7528Python\u6587\u4ef6\u5939\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b\u6280\u5de7\u548c\u5efa\u8bae\uff1a<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528\u865a\u62df\u73af\u5883<\/h4>\n<\/p>\n<p><p>\u5728\u5f00\u53d1Python\u9879\u76ee\u65f6\uff0c\u5efa\u8bae\u4f7f\u7528\u865a\u62df\u73af\u5883\uff08virtual environment\uff09\u6765\u9694\u79bb\u9879\u76ee\u7684\u4f9d\u8d56\u5173\u7cfb\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u4f9d\u8d56\u51b2\u7a81\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u548c\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python -m venv myenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff08Windows\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">myenv\\Scripts\\activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff08Linux\/Mac\uff09\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source myenv\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177<\/h4>\n<\/p>\n<p><p>Python\u7684\u5305\u7ba1\u7406\u5de5\u5177pip\u53ef\u4ee5\u5e2e\u52a9\u4f60\u5b89\u88c5\u548c\u7ba1\u7406\u9879\u76ee\u6240\u9700\u7684\u4f9d\u8d56\u5305\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\u5305\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install package_name<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>3. \u4f7f\u7528\u7248\u672c\u63a7\u5236\u5de5\u5177<\/h4>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u5efa\u8bae\u4f7f\u7528\u7248\u672c\u63a7\u5236\u5de5\u5177\uff08\u5982Git\uff09\u6765\u7ba1\u7406\u4ee3\u7801\u3002\u8fd9\u6837\u53ef\u4ee5\u65b9\u4fbf\u5730\u8ddf\u8e2a\u4ee3\u7801\u53d8\u66f4\u3001\u534f\u4f5c\u5f00\u53d1\u4ee5\u53ca\u56de\u6eda\u5230\u4e4b\u524d\u7684\u7248\u672c\u3002<\/p>\n<\/p>\n<p><h4>4. \u5b9a\u671f\u5907\u4efd<\/h4>\n<\/p>\n<p><p>\u5b9a\u671f\u5907\u4efd\u4f60\u7684Python\u9879\u76ee\u6587\u4ef6\u5939\uff0c\u4ee5\u9632\u6b62\u6570\u636e\u4e22\u5931\u3002\u53ef\u4ee5\u4f7f\u7528\u4e91\u5b58\u50a8\u670d\u52a1\uff08\u5982Google Drive\u3001Dropbox\uff09\u6216\u672c\u5730\u5907\u4efd\u5de5\u5177\u6765\u8fdb\u884c\u5907\u4efd\u3002<\/p>\n<\/p>\n<p><h3>\u516d\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u672c\u6587\uff0c\u6211\u4eec\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728cmd\u4e2d\u6253\u5f00Python\u6587\u4ef6\u5939\u7684\u65b9\u6cd5\uff0c\u5305\u62ec\u4f7f\u7528cd\u547d\u4ee4\u3001\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u4ee5\u53ca\u76f4\u63a5\u8fd0\u884cPython\u6587\u4ef6\u3002\u540c\u65f6\uff0c\u8fd8\u4ecb\u7ecd\u4e86\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u53ca\u5176\u89e3\u51b3\u65b9\u6cd5\uff0c\u4ee5\u53caPython\u6587\u4ef6\u5939\u7ba1\u7406\u7684\u6280\u5de7\u548c\u5efa\u8bae\u3002\u5e0c\u671b\u8fd9\u4e9b\u5185\u5bb9\u80fd\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u4f7f\u7528\u548c\u7ba1\u7406Python\u6587\u4ef6\u5939\uff0c\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728cmd\u4e2d\u627e\u5230Python\u7684\u5b89\u88c5\u8def\u5f84\uff1f<\/strong><br \/>\u8981\u627e\u5230Python\u7684\u5b89\u88c5\u8def\u5f84\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u63d0\u793a\u7b26\uff08cmd\uff09\u4e2d\u8f93\u5165<code>where python<\/code>\u3002\u8fd9\u6761\u547d\u4ee4\u4f1a\u663e\u793aPython\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8def\u5f84\uff0c\u5982\u679c\u60a8\u5df2\u7ecf\u6b63\u786e\u5b89\u88c5\u4e86Python\u5e76\u5c06\u5176\u6dfb\u52a0\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<p><strong>\u5728cmd\u4e2d\u6253\u5f00\u7279\u5b9a\u7684Python\u6587\u4ef6\u5939\uff0c\u5e94\u8be5\u4f7f\u7528\u4ec0\u4e48\u547d\u4ee4\uff1f<\/strong><br \/>\u8981\u6253\u5f00\u7279\u5b9a\u7684Python\u6587\u4ef6\u5939\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>cd<\/code>\u547d\u4ee4\u3002\u4f8b\u5982\uff0c\u5982\u679c\u60a8\u7684Python\u6587\u4ef6\u5939\u4f4d\u4e8e<code>C:\\Users\\YourUsername\\Python<\/code>\uff0c\u60a8\u53ef\u4ee5\u8f93\u5165<code>cd C:\\Users\\YourUsername\\Python<\/code>\u6765\u5207\u6362\u5230\u8be5\u6587\u4ef6\u5939\u3002\u786e\u4fdd\u5c06\u8def\u5f84\u66ff\u6362\u4e3a\u60a8\u5b9e\u9645\u7684\u6587\u4ef6\u5939\u8def\u5f84\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728cmd\u4e2d\u8fd0\u884cPython\u6587\u4ef6\uff1f<\/strong><br \/>\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5bfc\u822a\u5230\u5305\u542bPython\u6587\u4ef6\u7684\u6587\u4ef6\u5939\u540e\uff0c\u4f7f\u7528\u547d\u4ee4<code>python yourfile.py<\/code>\u6765\u8fd0\u884cPython\u6587\u4ef6\u3002\u8bf7\u5c06<code>yourfile.py<\/code>\u66ff\u6362\u4e3a\u60a8\u5b9e\u9645\u7684Python\u6587\u4ef6\u540d\u3002\u786e\u4fdd\u6587\u4ef6\u8def\u5f84\u6b63\u786e\uff0c\u5e76\u4e14Python\u5df2\u7ecf\u5b89\u88c5\u5e76\u914d\u7f6e\u5728\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5728cmd\u4e2d\u6253\u5f00python\u6587\u4ef6\u5939\uff0c\u53ef\u4ee5\u4f7f\u7528cd\u547d\u4ee4\u3001\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf\u3001\u76f4\u63a5\u8fd0\u884cpython\u6587\u4ef6\u7b49\u3002\u5176\u4e2d\uff0c\u6700\u5e38\u89c1\u4e14 [&hellip;]","protected":false},"author":3,"featured_media":1102274,"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\/1102268"}],"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=1102268"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1102268\/revisions"}],"predecessor-version":[{"id":1102276,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1102268\/revisions\/1102276"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1102274"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1102268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1102268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1102268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}