{"id":1008864,"date":"2024-12-27T11:06:34","date_gmt":"2024-12-27T03:06:34","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1008864.html"},"modified":"2024-12-27T11:06:36","modified_gmt":"2024-12-27T03:06:36","slug":"%e8%bf%9c%e7%a8%8b%e5%a6%82%e4%bd%95%e6%89%a7%e8%a1%8cpython%e8%84%9a%e6%9c%ac","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1008864.html","title":{"rendered":"\u8fdc\u7a0b\u5982\u4f55\u6267\u884cpython\u811a\u672c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25084016\/22ea68fc-5d27-4e48-b4ad-d845d8509771.webp\" alt=\"\u8fdc\u7a0b\u5982\u4f55\u6267\u884cpython\u811a\u672c\" \/><\/p>\n<p><p> \u8fdc\u7a0b\u6267\u884cPython\u811a\u672c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\uff0c<strong>\u4f7f\u7528SSH\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u3001\u5229\u7528\u4e91\u670d\u52a1\u5e73\u53f0\u3001\u901a\u8fc7\u8fdc\u7a0b\u684c\u9762\u8f6f\u4ef6\u3001\u4f7f\u7528\u8fdc\u7a0b\u6267\u884c\u5de5\u5177\u3001\u642d\u5efaWeb\u63a5\u53e3<\/strong>\u7b49\u90fd\u662f\u5e38\u7528\u7684\u65b9\u6cd5\u3002\u5176\u4e2d\uff0c\u4f7f\u7528SSH\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u662f\u6700\u5e38\u89c1\u548c\u76f4\u63a5\u7684\u65b9\u6cd5\uff0c\u5b83\u5141\u8bb8\u7528\u6237\u901a\u8fc7\u5b89\u5168\u7684\u901a\u9053\u8fde\u63a5\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u5e76\u6267\u884c\u547d\u4ee4\u3002\u4e3a\u4e86\u66f4\u8be6\u7ec6\u5730\u63cf\u8ff0\u8fd9\u4e00\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u8003\u8651\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a\u9996\u5148\uff0c\u786e\u4fdd\u672c\u5730\u673a\u5668\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u90fd\u5b89\u88c5\u4e86SSH\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\uff1b\u5176\u6b21\uff0c\u83b7\u53d6\u8fdc\u7a0b\u670d\u52a1\u5668\u7684IP\u5730\u5740\u548c\u767b\u5f55\u51ed\u8bc1\uff1b\u63a5\u7740\uff0c\u5728\u672c\u5730\u901a\u8fc7SSH\u547d\u4ee4\u8fde\u63a5\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\uff1b\u6700\u540e\uff0c\u5bfc\u822a\u5230Python\u811a\u672c\u6240\u5728\u7684\u76ee\u5f55\u5e76\u8fd0\u884c\u811a\u672c\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001SSH\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668<\/p>\n<\/p>\n<p><p>\u901a\u8fc7SSH\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u662f\u6700\u5e38\u7528\u7684\u65b9\u5f0f\u4e4b\u4e00\uff0c\u56e0\u4e3aSSH\u63d0\u4f9b\u4e86\u4e00\u4e2a\u5b89\u5168\u7684\u8fde\u63a5\u901a\u9053\uff0c\u65b9\u4fbf\u7528\u6237\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u547d\u4ee4\u548c\u811a\u672c\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5\u548c\u914d\u7f6eSSH<\/strong><\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684\u672c\u5730\u8ba1\u7b97\u673a\u548c\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u90fd\u5b89\u88c5\u4e86SSH\u3002\u5927\u591a\u6570Linux\u548cMac\u7cfb\u7edf\u9ed8\u8ba4\u5b89\u88c5\u4e86SSH\u5ba2\u6237\u7aef\u548c\u670d\u52a1\u5668\uff0c\u4f46\u5728Windows\u7cfb\u7edf\u4e0a\uff0c\u4f60\u53ef\u80fd\u9700\u8981\u989d\u5916\u5b89\u88c5\u4e00\u4e2aSSH\u5ba2\u6237\u7aef\uff0c\u6bd4\u5982PuTTY\u6216\u8005Windows 10\u7684\u5185\u7f6eOpenSSH\u3002<\/p>\n<\/p>\n<p><p>\u914d\u7f6eSSH\u670d\u52a1\u5668\u65f6\uff0c\u9700\u8981\u7f16\u8f91SSH\u914d\u7f6e\u6587\u4ef6\uff08\u901a\u5e38\u4f4d\u4e8e<code>\/etc\/ssh\/sshd_config<\/code>\uff09\u4ee5\u786e\u4fddSSH\u670d\u52a1\u6b63\u5e38\u8fd0\u884c\uff0c\u5e76\u53ef\u4ee5\u901a\u8fc7<code>sudo systemctl start sshd<\/code>\u547d\u4ee4\u542f\u52a8SSH\u670d\u52a1\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u83b7\u53d6\u670d\u52a1\u5668\u4fe1\u606f\u5e76\u8fde\u63a5<\/strong><\/p>\n<\/p>\n<p><p>\u8981\u901a\u8fc7SSH\u8fde\u63a5\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u4f60\u9700\u8981\u77e5\u9053\u670d\u52a1\u5668\u7684IP\u5730\u5740\u4ee5\u53ca\u4f60\u7684\u767b\u5f55\u51ed\u8bc1\uff08\u7528\u6237\u540d\u548c\u5bc6\u7801\u6216\u79c1\u94a5\u6587\u4ef6\uff09\u3002\u8fde\u63a5\u547d\u4ee4\u901a\u5e38\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">ssh username@remote_server_ip<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u4f7f\u7528SSH\u5bc6\u94a5\u5bf9\u8fdb\u884c\u8eab\u4efd\u9a8c\u8bc1\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">ssh -i \/path\/to\/private\/key username@remote_server_ip<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6267\u884cPython\u811a\u672c<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u65e6\u8fde\u63a5\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u5bfc\u822a\u5230Python\u811a\u672c\u6240\u5728\u7684\u76ee\u5f55\uff0c\u7136\u540e\u4f7f\u7528Python\u89e3\u91ca\u5668\u8fd0\u884c\u811a\u672c\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">cd \/path\/to\/python\/script<\/p>\n<p>python3 script_name.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u786e\u4fdd\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5df2\u5b89\u88c5Python\uff0c\u4ee5\u53ca\u8fd0\u884c\u811a\u672c\u6240\u9700\u7684\u6240\u6709\u4f9d\u8d56\u5e93\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u5229\u7528\u4e91\u670d\u52a1\u5e73\u53f0<\/p>\n<\/p>\n<p><p>\u4e91\u670d\u52a1\u5e73\u53f0\u5982AWS\u3001Google Cloud\u3001Azure\u7b49\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u5de5\u5177\u548c\u670d\u52a1\uff0c\u53ef\u4ee5\u5e2e\u52a9\u7528\u6237\u8fdc\u7a0b\u6267\u884cPython\u811a\u672c\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528AWS Lambda<\/strong><\/p>\n<\/p>\n<p><p>AWS Lambda\u5141\u8bb8\u4f60\u8fd0\u884c\u4ee3\u7801\u800c\u65e0\u9700\u7ba1\u7406\u670d\u52a1\u5668\u3002\u4f60\u53ef\u4ee5\u5c06Python\u811a\u672c\u4e0a\u4f20\u5230AWS Lambda\uff0c\u914d\u7f6e\u89e6\u53d1\u6761\u4ef6\uff0c\u7136\u540e\u5728\u9700\u8981\u65f6\u6267\u884c\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u7f16\u5199\u4f60\u7684Python\u811a\u672c\uff0c\u5e76\u786e\u4fdd\u5176\u53ef\u4ee5\u5728\u65e0\u72b6\u6001\u7684\u73af\u5883\u4e2d\u8fd0\u884c\u3002\u63a5\u7740\uff0c\u5c06\u811a\u672c\u6253\u5305\u5e76\u4e0a\u4f20\u5230AWS Lambda\u4e2d\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7AWS\u7ba1\u7406\u63a7\u5236\u53f0\u6216\u547d\u4ee4\u884c\u5de5\u5177\u6765\u5b8c\u6210\u6b64\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Google Cloud Functions<\/strong><\/p>\n<\/p>\n<p><p>\u7c7b\u4f3c\u4e8eAWS Lambda\uff0cGoogle Cloud Functions\u63d0\u4f9b\u4e86\u4e00\u79cd\u65e0\u670d\u52a1\u5668\u73af\u5883\uff0c\u9002\u5408\u8fd0\u884cPython\u811a\u672c\u3002\u4f60\u53ea\u9700\u4e0a\u4f20\u811a\u672c\u5e76\u8bbe\u7f6e\u89e6\u53d1\u5668\u5373\u53ef\u3002<\/p>\n<\/p>\n<p><p>\u5728Google Cloud Platform\u63a7\u5236\u53f0\u4e2d\uff0c\u4f60\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u51fd\u6570\uff0c\u9009\u62e9Python\u4f5c\u4e3a\u8fd0\u884c\u73af\u5883\uff0c\u4e0a\u4f20\u4f60\u7684\u811a\u672c\uff0c\u7136\u540e\u914d\u7f6e\u89e6\u53d1\u6761\u4ef6\uff08\u5982HTTP\u8bf7\u6c42\u3001\u4e91\u5b58\u50a8\u66f4\u6539\u7b49\uff09\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u901a\u8fc7\u8fdc\u7a0b\u684c\u9762\u8f6f\u4ef6<\/p>\n<\/p>\n<p><p>\u8fdc\u7a0b\u684c\u9762\u8f6f\u4ef6\u63d0\u4f9b\u4e86\u4e00\u79cd\u56fe\u5f62\u5316\u754c\u9762\u7684\u65b9\u5f0f\u6765\u8bbf\u95ee\u8fdc\u7a0b\u8ba1\u7b97\u673a\uff0c\u5e76\u5728\u5176\u4e0a\u8fd0\u884cPython\u811a\u672c\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528RDP\u6216VNC<\/strong><\/p>\n<\/p>\n<p><p>RDP\uff08\u8fdc\u7a0b\u684c\u9762\u534f\u8bae\uff09\u548cVNC\uff08\u865a\u62df\u7f51\u7edc\u8ba1\u7b97\uff09\u662f\u4e24\u79cd\u5e38\u7528\u7684\u8fdc\u7a0b\u684c\u9762\u534f\u8bae\u3002\u901a\u8fc7\u8fd9\u4e9b\u534f\u8bae\uff0c\u4f60\u53ef\u4ee5\u5728\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u6253\u5f00\u8fdc\u7a0b\u8ba1\u7b97\u673a\u7684\u684c\u9762\u73af\u5883\u3002<\/p>\n<\/p>\n<p><p>\u5728Windows\u7cfb\u7edf\u4e0a\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u5185\u7f6e\u7684\u8fdc\u7a0b\u684c\u9762\u8fde\u63a5\u5de5\u5177\uff0c\u901a\u8fc7\u8f93\u5165\u8fdc\u7a0b\u8ba1\u7b97\u673a\u7684IP\u5730\u5740\u8fdb\u884c\u8fde\u63a5\u3002\u5728Linux\u6216Mac\u7cfb\u7edf\u4e0a\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528VNC\u5ba2\u6237\u7aef\u8fdb\u884c\u8fde\u63a5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6267\u884cPython\u811a\u672c<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u65e6\u8fde\u63a5\u5230\u8fdc\u7a0b\u684c\u9762\uff0c\u4f60\u53ef\u4ee5\u50cf\u5728\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u64cd\u4f5c\u4e00\u6837\uff0c\u6253\u5f00\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u5bfc\u822a\u5230Python\u811a\u672c\u6240\u5728\u7684\u76ee\u5f55\uff0c\u5e76\u6267\u884c\u811a\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u4f7f\u7528\u8fdc\u7a0b\u6267\u884c\u5de5\u5177<\/p>\n<\/p>\n<p><p>\u6709\u4e00\u4e9b\u5de5\u5177\u4e13\u95e8\u7528\u4e8e\u8fdc\u7a0b\u6267\u884c\u4efb\u52a1\uff0c\u8fd9\u4e9b\u5de5\u5177\u53ef\u4ee5\u7b80\u5316\u5728\u591a\u53f0\u673a\u5668\u4e0a\u6267\u884cPython\u811a\u672c\u7684\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528Ansible<\/strong><\/p>\n<\/p>\n<p><p>Ansible\u662f\u4e00\u79cd\u6d41\u884c\u7684\u81ea\u52a8\u5316\u5de5\u5177\uff0c\u5b83\u5141\u8bb8\u4f60\u5728\u591a\u53f0\u673a\u5668\u4e0a\u540c\u65f6\u6267\u884c\u4efb\u52a1\u3002\u4f60\u53ef\u4ee5\u7f16\u5199Ansible\u5267\u672c\u6765\u5b9a\u4e49\u9700\u8981\u6267\u884c\u7684Python\u811a\u672c\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b89\u88c5Ansible\u5e76\u914d\u7f6e\u4f60\u7684\u4e3b\u673a\u6e05\u5355\u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u6240\u6709\u76ee\u6807\u673a\u5668\u7684\u4fe1\u606f\u3002\u63a5\u7740\uff0c\u7f16\u5199\u4e00\u4e2aAnsible\u5267\u672c\uff0c\u6307\u5b9aPython\u811a\u672c\u7684\u8def\u5f84\u548c\u6240\u9700\u7684\u53c2\u6570\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528Fabric<\/strong><\/p>\n<\/p>\n<p><p>Fabric\u662f\u4e00\u4e2aPython\u5e93\uff0c\u4e13\u4e3a\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6267\u884c\u4efb\u52a1\u800c\u8bbe\u8ba1\u3002\u4f60\u53ef\u4ee5\u7f16\u5199Python\u811a\u672c\uff0c\u4f7f\u7528Fabric\u7684API\u6765\u8fde\u63a5\u5e76\u6267\u884c\u8fdc\u7a0b\u4efb\u52a1\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u5b89\u88c5Fabric\uff0c\u4f60\u53ef\u4ee5\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684Python\u811a\u672c\uff0c\u5b9a\u4e49\u8fde\u63a5\u4fe1\u606f\u548c\u8981\u6267\u884c\u7684\u547d\u4ee4\uff0c\u7136\u540e\u901a\u8fc7Fabric\u7684\u547d\u4ee4\u884c\u5de5\u5177\u8fd0\u884c\u8be5\u811a\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u642d\u5efaWeb\u63a5\u53e3<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u642d\u5efaWeb\u63a5\u53e3\uff0c\u4f60\u53ef\u4ee5\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6258\u7ba1\u4e00\u4e2aWeb\u670d\u52a1\uff0c\u5e76\u901a\u8fc7HTTP\u8bf7\u6c42\u89e6\u53d1Python\u811a\u672c\u7684\u6267\u884c\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528Flask\u6216Django<\/strong><\/p>\n<\/p>\n<p><p>Flask\u548cDjango\u662f\u4e24\u4e2a\u6d41\u884c\u7684Python Web\u6846\u67b6\uff0c\u9002\u5408\u5feb\u901f\u642d\u5efaWeb\u670d\u52a1\u3002\u4f60\u53ef\u4ee5\u7f16\u5199\u4e00\u4e2aFlask\u6216Django\u5e94\u7528\uff0c\u5b9a\u4e49\u4e00\u4e2a\u8def\u7531\uff0c\u7528\u4e8e\u63a5\u6536HTTP\u8bf7\u6c42\u5e76\u6267\u884cPython\u811a\u672c\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u5b89\u88c5Flask\u6216Django\uff0c\u7136\u540e\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u5b9a\u4e49\u4e00\u4e2a\u89c6\u56fe\u51fd\u6570\u3002\u8be5\u51fd\u6570\u53ef\u4ee5\u6839\u636e\u63a5\u6536\u5230\u7684\u8bf7\u6c42\u53c2\u6570\uff0c\u8c03\u7528\u76f8\u5e94\u7684Python\u811a\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u90e8\u7f72\u548c\u8bbf\u95ee<\/strong><\/p>\n<\/p>\n<p><p>\u5c06Web\u5e94\u7528\u90e8\u7f72\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\uff0c\u786e\u4fdd\u670d\u52a1\u5668\u53ef\u4ee5\u63a5\u6536\u5916\u90e8HTTP\u8bf7\u6c42\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528gunicorn\u3001uWSGI\u7b49\u5de5\u5177\u6765\u6258\u7ba1Flask\u6216Django\u5e94\u7528\uff0c\u5e76\u4f7f\u7528Nginx\u6216Apache\u4f5c\u4e3a\u53cd\u5411\u4ee3\u7406\u3002<\/p>\n<\/p>\n<p><p>\u90e8\u7f72\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u6d4f\u89c8\u5668\u6216HTTP\u5ba2\u6237\u7aef\u5411\u670d\u52a1\u5668\u53d1\u9001\u8bf7\u6c42\uff0c\u89e6\u53d1Python\u811a\u672c\u7684\u6267\u884c\uff0c\u5e76\u83b7\u53d6\u6267\u884c\u7ed3\u679c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u6839\u636e\u5177\u4f53\u7684\u9700\u6c42\u548c\u73af\u5883\uff0c\u9009\u62e9\u6700\u9002\u5408\u7684\u65b9\u5f0f\u6765\u8fdc\u7a0b\u6267\u884cPython\u811a\u672c\u3002\u8fd9\u4e9b\u65b9\u6cd5\u5404\u6709\u4f18\u52a3\uff0c\u9009\u62e9\u65f6\u9700\u7efc\u5408\u8003\u8651\u5b89\u5168\u6027\u3001\u6613\u7528\u6027\u548c\u6267\u884c\u6548\u7387\u7b49\u56e0\u7d20\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u8fd0\u884cPython\u811a\u672c\uff1f<\/strong><br \/>\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u8fd0\u884cPython\u811a\u672c\u901a\u5e38\u9700\u8981\u4f7f\u7528SSH\uff08\u5b89\u5168\u5916\u58f3\u534f\u8bae\uff09\u8fde\u63a5\u5230\u670d\u52a1\u5668\u3002\u60a8\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177\uff08\u5982PuTTY\u6216\u7ec8\u7aef\uff09\u8fde\u63a5\u5230\u8fdc\u7a0b\u670d\u52a1\u5668\uff0c\u5e76\u5bfc\u822a\u5230\u811a\u672c\u6240\u5728\u7684\u76ee\u5f55\u3002\u4f7f\u7528\u547d\u4ee4<code>python script.py<\/code>\u6216<code>python3 script.py<\/code>\u6765\u6267\u884c\u60a8\u7684Python\u811a\u672c\u3002\u6b64\u5916\uff0c\u786e\u4fdd\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5df2\u5b89\u88c5Python\u73af\u5883\u3002<\/p>\n<p><strong>\u5982\u4f55\u8bbe\u7f6e\u8fdc\u7a0b\u73af\u5883\u4ee5\u4fbf\u6267\u884cPython\u811a\u672c\uff1f<\/strong><br \/>\u4e3a\u4e86\u5728\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u6210\u529f\u6267\u884cPython\u811a\u672c\uff0c\u60a8\u9700\u8981\u786e\u4fdd\u670d\u52a1\u5668\u4e0a\u5b89\u88c5\u4e86Python\u53ca\u5176\u4f9d\u8d56\u5305\u3002\u53ef\u4ee5\u901a\u8fc7SSH\u8fde\u63a5\u5230\u670d\u52a1\u5668\uff0c\u5e76\u4f7f\u7528\u5305\u7ba1\u7406\u5668\uff08\u5982<code>apt<\/code>\u6216<code>yum<\/code>\uff09\u5b89\u88c5\u6240\u9700\u7684Python\u7248\u672c\u548c\u5e93\u3002\u5982\u679c\u4f7f\u7528\u865a\u62df\u73af\u5883\uff0c\u5efa\u8bae\u5728\u670d\u52a1\u5668\u4e0a\u521b\u5efa\u4e00\u4e2a\u865a\u62df\u73af\u5883\uff0c\u4ee5\u4fbf\u7ba1\u7406\u4f9d\u8d56\u5173\u7cfb\u5e76\u907f\u514d\u51b2\u7a81\u3002<\/p>\n<p><strong>\u5982\u4f55\u8fdc\u7a0b\u8c03\u8bd5Python\u811a\u672c\uff1f<\/strong><br \/>\u8fdc\u7a0b\u8c03\u8bd5Python\u811a\u672c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\u3002\u4f7f\u7528Python\u7684\u5185\u7f6e\u8c03\u8bd5\u5668\uff08pdb\uff09\u53ef\u4ee5\u5728\u4ee3\u7801\u4e2d\u8bbe\u7f6e\u65ad\u70b9\uff0c\u6216\u4f7f\u7528\u66f4\u9ad8\u7ea7\u7684IDE\u5982PyCharm\u3001VSCode\u7b49\uff0c\u652f\u6301\u8fdc\u7a0b\u8c03\u8bd5\u529f\u80fd\u3002\u9700\u8981\u5728\u8fdc\u7a0b\u673a\u5668\u4e0a\u914d\u7f6e\u8c03\u8bd5\u5668\uff0c\u5e76\u786e\u4fdd\u5f00\u53d1\u73af\u5883\u80fd\u591f\u8fde\u63a5\u5230\u8fdc\u7a0b\u4e3b\u673a\uff0c\u4ece\u800c\u5b9e\u73b0\u5b9e\u65f6\u8c03\u8bd5\u548c\u4ee3\u7801\u67e5\u770b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8fdc\u7a0b\u6267\u884cPython\u811a\u672c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\uff0c\u4f7f\u7528SSH\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u3001\u5229\u7528\u4e91\u670d\u52a1\u5e73\u53f0\u3001\u901a\u8fc7\u8fdc\u7a0b\u684c\u9762\u8f6f\u4ef6\u3001\u4f7f\u7528 [&hellip;]","protected":false},"author":3,"featured_media":1008870,"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\/1008864"}],"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=1008864"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1008864\/revisions"}],"predecessor-version":[{"id":1008871,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1008864\/revisions\/1008871"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1008870"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1008864"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1008864"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1008864"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}