{"id":1077340,"date":"2025-01-08T12:01:30","date_gmt":"2025-01-08T04:01:30","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1077340.html"},"modified":"2025-01-08T12:01:33","modified_gmt":"2025-01-08T04:01:33","slug":"%e7%ae%a1%e7%90%86%e5%91%98%e7%95%8c%e9%9d%a2%e5%a6%82%e4%bd%95%e6%89%93%e5%bc%80python-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1077340.html","title":{"rendered":"\u7ba1\u7406\u5458\u754c\u9762\u5982\u4f55\u6253\u5f00python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24181446\/16ddd003-d9db-48f3-982b-5ae564cee336.webp\" alt=\"\u7ba1\u7406\u5458\u754c\u9762\u5982\u4f55\u6253\u5f00python\" \/><\/p>\n<p><p> \u5f00\u5934\u6bb5\u843d: <strong>\u7ba1\u7406\u5458\u754c\u9762\u6253\u5f00Python\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u3001Windows PowerShell\u3001Jupyter Notebook\u3001Anaconda Navigator\u7b49<\/strong>\u3002\u5176\u4e2d\uff0c\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u662f\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u4e4b\u4e00\u3002\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u7ba1\u7406\u5458\u6743\u9650\u4e0b\u8fd0\u884cPython\u811a\u672c\uff0c\u8fdb\u884c\u5b89\u88c5\u5305\u7ba1\u7406\u7b49\u64cd\u4f5c\uff0c\u786e\u4fdd\u7cfb\u7edf\u7684\u5b89\u5168\u6027\u548c\u7a33\u5b9a\u6027\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u547d\u4ee4\u63d0\u793a\u7b26<\/p>\n<\/p>\n<p><p>\u547d\u4ee4\u63d0\u793a\u7b26\u662fWindows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\u7684\u4e00\u4e2a\u547d\u4ee4\u884c\u89e3\u91ca\u5668\uff0c\u901a\u8fc7\u5b83\u53ef\u4ee5\u6267\u884c\u5404\u79cd\u547d\u4ee4\uff0c\u8fd0\u884c\u7a0b\u5e8f\uff0c\u7ba1\u7406\u7cfb\u7edf\u548c\u6587\u4ef6\u7b49\u3002\u8981\u5728\u7ba1\u7406\u5458\u6743\u9650\u4e0b\u6253\u5f00Python\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26<\/strong>\uff1a\u5728Windows\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201ccmd\u201d\uff0c\u53f3\u952e\u70b9\u51fb\u201c\u547d\u4ee4\u63d0\u793a\u7b26\u201d\uff0c\u9009\u62e9\u201c\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u201d\u3002<\/li>\n<li><strong>\u68c0\u67e5Python\u5b89\u88c5\u8def\u5f84<\/strong>\uff1a\u8f93\u5165<code>python --version<\/code>\u6216<code>python<\/code>\u6765\u68c0\u67e5Python\u662f\u5426\u5df2\u6b63\u786e\u5b89\u88c5\u5e76\u914d\u7f6e\u4e86\u73af\u5883\u53d8\u91cf\u3002<\/li>\n<li><strong>\u8fd0\u884cPython\u811a\u672c<\/strong>\uff1a\u8f93\u5165<code>python script_name.py<\/code>\u6765\u8fd0\u884cPython\u811a\u672c\u3002\u786e\u4fdd\u811a\u672c\u8def\u5f84\u6b63\u786e\u3002<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u7ba1\u7406\u5458\u6743\u9650\u8fd0\u884c\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u53ef\u4ee5\u786e\u4fdd\u7528\u6237\u62e5\u6709\u6267\u884c\u7cfb\u7edf\u7ea7\u522b\u4efb\u52a1\u7684\u6743\u9650\uff0c\u5982\u5b89\u88c5\u7b2c\u4e09\u65b9\u5e93\u3001\u4fee\u6539\u7cfb\u7edf\u6587\u4ef6\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u4e8c\u3001Windows PowerShell<\/p>\n<\/p>\n<p><p>Windows PowerShell\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684\u547d\u4ee4\u884c\u5de5\u5177\u548c\u811a\u672c\u8bed\u8a00\uff0c\u9002\u7528\u4e8e\u7cfb\u7edf\u7ba1\u7406\u548c\u81ea\u52a8\u5316\u4efb\u52a1\u3002\u901a\u8fc7PowerShell\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u7ba1\u7406\u5458\u6743\u9650\u4e0b\u6253\u5f00\u5e76\u8fd0\u884cPython\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u6253\u5f00PowerShell<\/strong>\uff1a\u5728Windows\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201cPowerShell\u201d\uff0c\u53f3\u952e\u70b9\u51fb\u201cWindows PowerShell\u201d\uff0c\u9009\u62e9\u201c\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u201d\u3002<\/li>\n<li><strong>\u68c0\u67e5Python\u5b89\u88c5\u8def\u5f84<\/strong>\uff1a\u8f93\u5165<code>python --version<\/code>\u6765\u68c0\u67e5Python\u5b89\u88c5\u60c5\u51b5\u3002<\/li>\n<li><strong>\u8fd0\u884cPython\u811a\u672c<\/strong>\uff1a\u8f93\u5165<code>python script_name.py<\/code>\u6765\u8fd0\u884cPython\u811a\u672c\u3002<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7PowerShell\uff0c\u7528\u6237\u4e0d\u4ec5\u53ef\u4ee5\u8fd0\u884cPython\u811a\u672c\uff0c\u8fd8\u53ef\u4ee5\u7f16\u5199\u548c\u6267\u884c\u590d\u6742\u7684\u81ea\u52a8\u5316\u811a\u672c\uff0c\u8fdb\u884c\u7cfb\u7edf\u7ba1\u7406\u548c\u914d\u7f6e\u3002<\/p>\n<\/p>\n<p><p>\u4e09\u3001Jupyter Notebook<\/p>\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\u5f0f\u3001\u53ef\u89c6\u5316\u548c\u6587\u672c\u53d9\u8ff0\u7684\u6587\u6863\u3002Jupyter Notebook\u5e7f\u6cdb\u7528\u4e8e\u6570\u636e\u6e05\u7406\u548c\u8f6c\u6362\u3001\u6570\u503c\u6a21\u62df\u3001\u7edf\u8ba1\u5efa\u6a21\u3001<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5Jupyter Notebook<\/strong>\uff1a\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26\u6216PowerShell\uff08\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\uff09\u8f93\u5165<code>pip install notebook<\/code>\u6765\u5b89\u88c5Jupyter Notebook\u3002<\/li>\n<li><strong>\u542f\u52a8Jupyter Notebook<\/strong>\uff1a\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u6216PowerShell\u4e2d\u8f93\u5165<code>jupyter notebook<\/code>\u6765\u542f\u52a8Jupyter Notebook\u3002\u6d4f\u89c8\u5668\u5c06\u81ea\u52a8\u6253\u5f00Jupyter Notebook\u754c\u9762\u3002<\/li>\n<li><strong>\u521b\u5efa\u548c\u8fd0\u884cPython\u7b14\u8bb0\u672c<\/strong>\uff1a\u5728Jupyter Notebook\u754c\u9762\u4e2d\uff0c\u70b9\u51fb\u201cNew\u201d\u6309\u94ae\uff0c\u9009\u62e9\u201cPython 3\u201d\u6765\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u7b14\u8bb0\u672c\u3002\u5728\u7b14\u8bb0\u672c\u4e2d\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\u3002<\/li>\n<\/ol>\n<p><p>Jupyter Notebook\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u7684\u5f00\u53d1\u73af\u5883\uff0c\u9002\u5408\u6570\u636e\u79d1\u5b66\u5bb6\u548c\u7814\u7a76\u4eba\u5458\u8fdb\u884c\u6570\u636e\u5206\u6790\u548c\u5efa\u6a21\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001Anaconda Navigator<\/p>\n<\/p>\n<p><p>Anaconda Navigator\u662f\u4e00\u4e2a\u56fe\u5f62\u5316\u7528\u6237\u754c\u9762\uff0c\u5141\u8bb8\u7528\u6237\u7ba1\u7406Anaconda\u53d1\u884c\u7248\u4e2d\u7684\u5305\u3001\u73af\u5883\u548c\u5e94\u7528\u7a0b\u5e8f\u3002\u901a\u8fc7Anaconda Navigator\uff0c\u7528\u6237\u53ef\u4ee5\u65b9\u4fbf\u5730\u521b\u5efa\u548c\u7ba1\u7406Python\u73af\u5883\uff0c\u5b89\u88c5\u548c\u66f4\u65b0\u5305\uff0c\u5e76\u8fd0\u884c\u5404\u79cd\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5Anaconda<\/strong>\uff1a\u4eceAnaconda\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5Anaconda\u53d1\u884c\u7248\u3002<\/li>\n<li><strong>\u6253\u5f00Anaconda Navigator<\/strong>\uff1a\u5728Windows\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201cAnaconda Navigator\u201d\u5e76\u6253\u5f00\u5b83\u3002<\/li>\n<li><strong>\u521b\u5efa\u548c\u7ba1\u7406\u73af\u5883<\/strong>\uff1a\u5728Anaconda Navigator\u4e2d\uff0c\u70b9\u51fb\u201cEnvironments\u201d\u6807\u7b7e\uff0c\u53ef\u4ee5\u521b\u5efa\u548c\u7ba1\u7406\u4e0d\u540c\u7684Python\u73af\u5883\u3002\u70b9\u51fb\u201cCreate\u201d\u6309\u94ae\uff0c\u8f93\u5165\u73af\u5883\u540d\u79f0\u5e76\u9009\u62e9Python\u7248\u672c\u6765\u521b\u5efa\u65b0\u7684\u73af\u5883\u3002<\/li>\n<li><strong>\u8fd0\u884cPython\u5e94\u7528\u7a0b\u5e8f<\/strong>\uff1a\u5728Anaconda Navigator\u4e2d\uff0c\u70b9\u51fb\u201cHome\u201d\u6807\u7b7e\uff0c\u53ef\u4ee5\u770b\u5230\u5404\u79cd\u5e94\u7528\u7a0b\u5e8f\uff08\u5982Jupyter Notebook\u3001Spyder\u7b49\uff09\u3002\u70b9\u51fb\u201cLaunch\u201d\u6309\u94ae\u6765\u542f\u52a8\u76f8\u5e94\u7684\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<\/ol>\n<p><p>Anaconda Navigator\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7528\u6237\u53cb\u597d\u7684\u754c\u9762\uff0c\u9002\u5408\u521d\u5b66\u8005\u548c\u4e13\u4e1a\u5f00\u53d1\u8005\u7ba1\u7406Python\u73af\u5883\u548c\u5305\u3002<\/p>\n<\/p>\n<p><p>\u4e94\u3001PyCharm<\/p>\n<\/p>\n<p><p>PyCharm\u662f\u4e00\u6b3e\u7531JetBr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ns\u5f00\u53d1\u7684Python IDE\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u5f00\u53d1\u5de5\u5177\u548c\u529f\u80fd\uff0c\u9002\u7528\u4e8ePython\u5f00\u53d1\u3002\u901a\u8fc7PyCharm\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u7ba1\u7406\u5458\u6743\u9650\u4e0b\u6253\u5f00\u5e76\u8fd0\u884cPython\u9879\u76ee\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5PyCharm<\/strong>\uff1a\u4eceJetBrains\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5PyCharm\u3002<\/li>\n<li><strong>\u521b\u5efa\u6216\u6253\u5f00Python\u9879\u76ee<\/strong>\uff1a\u5728PyCharm\u4e2d\uff0c\u70b9\u51fb\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cNew Project\u201d\u6765\u521b\u5efa\u65b0\u7684Python\u9879\u76ee\uff0c\u6216\u9009\u62e9\u201cOpen\u201d\u6765\u6253\u5f00\u73b0\u6709\u7684Python\u9879\u76ee\u3002<\/li>\n<li><strong>\u914d\u7f6e\u9879\u76ee\u89e3\u91ca\u5668<\/strong>\uff1a\u5728PyCharm\u4e2d\uff0c\u70b9\u51fb\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cSettings\u201d\uff0c\u5728\u201cProject: [\u9879\u76ee\u540d\u79f0]\u201d\u4e0b\u9009\u62e9\u201cProject Interpreter\u201d\u3002\u5728\u8fd9\u91cc\u53ef\u4ee5\u914d\u7f6ePython\u89e3\u91ca\u5668\u548c\u5b89\u88c5\u6240\u9700\u7684\u5305\u3002<\/li>\n<li><strong>\u8fd0\u884cPython\u811a\u672c<\/strong>\uff1a\u5728PyCharm\u4e2d\uff0c\u53f3\u952e\u70b9\u51fbPython\u811a\u672c\u6587\u4ef6\uff0c\u9009\u62e9\u201cRun &#39;script_name&#39;\u201d\u6765\u8fd0\u884cPython\u811a\u672c\u3002<\/li>\n<\/ol>\n<p><p>PyCharm\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u4ee3\u7801\u7f16\u8f91\u3001\u8c03\u8bd5\u548c\u6d4b\u8bd5\u5de5\u5177\uff0c\u9002\u5408\u4e13\u4e1a\u5f00\u53d1\u8005\u8fdb\u884cPython\u5f00\u53d1\u3002<\/p>\n<\/p>\n<p><p>\u516d\u3001Visual Studio Code<\/p>\n<\/p>\n<p><p>Visual Studio Code\uff08VS Code\uff09\u662f\u4e00\u6b3e\u7531Microsoft\u5f00\u53d1\u7684\u514d\u8d39\u5f00\u6e90\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u5305\u62ecPython\u3002\u901a\u8fc7VS Code\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u7ba1\u7406\u5458\u6743\u9650\u4e0b\u6253\u5f00\u5e76\u8fd0\u884cPython\u9879\u76ee\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u5b89\u88c5VS Code<\/strong>\uff1a\u4eceVS Code\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5VS Code\u3002<\/li>\n<li><strong>\u5b89\u88c5Python\u6269\u5c55<\/strong>\uff1a\u5728VS Code\u4e2d\uff0c\u70b9\u51fb\u5de6\u4fa7\u6269\u5c55\u56fe\u6807\uff0c\u641c\u7d22\u201cPython\u201d\u5e76\u5b89\u88c5Microsoft\u63d0\u4f9b\u7684Python\u6269\u5c55\u3002<\/li>\n<li><strong>\u521b\u5efa\u6216\u6253\u5f00Python\u9879\u76ee<\/strong>\uff1a\u5728VS Code\u4e2d\uff0c\u70b9\u51fb\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cOpen Folder\u201d\u6765\u6253\u5f00Python\u9879\u76ee\u6587\u4ef6\u5939\uff0c\u6216\u9009\u62e9\u201cNew File\u201d\u6765\u521b\u5efa\u65b0\u7684Python\u6587\u4ef6\u3002<\/li>\n<li><strong>\u914d\u7f6ePython\u89e3\u91ca\u5668<\/strong>\uff1a\u5728VS Code\u4e2d\uff0c\u70b9\u51fb\u5de6\u4e0b\u89d2\u7684Python\u7248\u672c\u53f7\uff0c\u9009\u62e9\u5408\u9002\u7684Python\u89e3\u91ca\u5668\u3002<\/li>\n<li><strong>\u8fd0\u884cPython\u811a\u672c<\/strong>\uff1a\u5728VS Code\u4e2d\uff0c\u53f3\u952e\u70b9\u51fbPython\u811a\u672c\u6587\u4ef6\uff0c\u9009\u62e9\u201cRun Python File in Terminal\u201d\u6765\u8fd0\u884cPython\u811a\u672c\u3002<\/li>\n<\/ol>\n<p><p>VS Code\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u6269\u5c55\u548c\u63d2\u4ef6\uff0c\u9002\u5408\u5f00\u53d1\u8005\u8fdb\u884c\u591a\u8bed\u8a00\u5f00\u53d1\u548c\u96c6\u6210\u3002<\/p>\n<\/p>\n<p><p>\u4e03\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u65b9\u6cd5\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u7ba1\u7406\u5458\u6743\u9650\u4e0b\u6253\u5f00\u5e76\u8fd0\u884cPython\u3002\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u7528\u6237\u7684\u9700\u6c42\u548c\u4f7f\u7528\u4e60\u60ef\u3002\u547d\u4ee4\u63d0\u793a\u7b26\u548cPowerShell\u9002\u5408\u8fdb\u884c\u7cfb\u7edf\u7ea7\u522b\u4efb\u52a1\u548c\u5305\u7ba1\u7406\uff0cJupyter Notebook\u9002\u5408\u6570\u636e\u79d1\u5b66\u548c\u7814\u7a76\uff0cAnaconda Navigator\u63d0\u4f9b\u4e86\u7528\u6237\u53cb\u597d\u7684\u73af\u5883\u7ba1\u7406\u754c\u9762\uff0cPyCharm\u548cVS Code\u5219\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u5f00\u53d1\u5de5\u5177\u548c\u529f\u80fd\u3002\u901a\u8fc7\u5408\u7406\u4f7f\u7528\u8fd9\u4e9b\u5de5\u5177\uff0c\u7528\u6237\u53ef\u4ee5\u9ad8\u6548\u5730\u8fdb\u884cPython\u5f00\u53d1\u548c\u7ba1\u7406\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u7ba1\u7406\u5458\u754c\u9762\u4e2d\u6253\u5f00Python\u73af\u5883\uff1f<\/strong><br \/>\u8981\u5728\u7ba1\u7406\u5458\u754c\u9762\u4e2d\u6253\u5f00Python\u73af\u5883\uff0c\u60a8\u9700\u8981\u53f3\u51fbPython\u7684\u5feb\u6377\u65b9\u5f0f\uff0c\u9009\u62e9\u201c\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u201d\u3002\u8fd9\u5c06\u5141\u8bb8\u60a8\u8bbf\u95ee\u9700\u8981\u7ba1\u7406\u5458\u6743\u9650\u7684\u7cfb\u7edf\u8d44\u6e90\u3002\u6b64\u5916\uff0c\u60a8\u4e5f\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884cPython\uff0c\u65b9\u6cd5\u662f\u641c\u7d22\u201ccmd\u201d\uff0c\u53f3\u51fb\u201c\u547d\u4ee4\u63d0\u793a\u7b26\u201d\uff0c\u9009\u62e9\u201c\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u201d\uff0c\u7136\u540e\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165<code>python<\/code>\u3002<\/p>\n<p><strong>\u5728Windows\u4e0a\u600e\u6837\u786e\u4fddPython\u5728\u7ba1\u7406\u5458\u6a21\u5f0f\u4e0b\u8fd0\u884c\uff1f<\/strong><br \/>\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u4e00\u4e2a\u5feb\u6377\u65b9\u5f0f\u6765\u786e\u4fddPython\u59cb\u7ec8\u4ee5\u7ba1\u7406\u5458\u6a21\u5f0f\u8fd0\u884c\u3002\u53f3\u51fbPython\u7684\u5b89\u88c5\u8def\u5f84\uff0c\u9009\u62e9\u201c\u53d1\u9001\u5230\u201d-&gt;\u201c\u684c\u9762\u5feb\u6377\u65b9\u5f0f\u201d\uff0c\u7136\u540e\u53f3\u51fb\u8be5\u5feb\u6377\u65b9\u5f0f\uff0c\u9009\u62e9\u201c\u5c5e\u6027\u201d\u3002\u5728\u201c\u5feb\u6377\u65b9\u5f0f\u201d\u9009\u9879\u5361\u4e2d\uff0c\u70b9\u51fb\u201c\u9ad8\u7ea7\u201d\u6309\u94ae\uff0c\u52fe\u9009\u201c\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u201d\uff0c\u4fdd\u5b58\u540e\u5373\u53ef\u3002<\/p>\n<p><strong>\u5728Linux\u7cfb\u7edf\u4e2d\u5982\u4f55\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884cPython\uff1f<\/strong><br \/>\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528<code>sudo<\/code>\u547d\u4ee4\u6765\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884cPython\u3002\u53ea\u9700\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>sudo python<\/code>\u6216<code>sudo python3<\/code>\uff0c\u7cfb\u7edf\u4f1a\u63d0\u793a\u60a8\u8f93\u5165\u5bc6\u7801\u3002\u8fd9\u6837\uff0c\u60a8\u5c06\u4ee5root\u7528\u6237\u7684\u8eab\u4efd\u8fd0\u884cPython\uff0c\u80fd\u591f\u8bbf\u95ee\u7cfb\u7edf\u4e2d\u7684\u6240\u6709\u6587\u4ef6\u548c\u8d44\u6e90\u3002<\/p>\n<p><strong>\u5982\u4f55\u89e3\u51b3\u5728\u7ba1\u7406\u5458\u754c\u9762\u6253\u5f00Python\u65f6\u9047\u5230\u7684\u6743\u9650\u95ee\u9898\uff1f<\/strong><br \/>\u5982\u679c\u5728\u7ba1\u7406\u5458\u754c\u9762\u6253\u5f00Python\u65f6\u9047\u5230\u6743\u9650\u95ee\u9898\uff0c\u786e\u4fdd\u60a8\u4f7f\u7528\u7684\u8d26\u6237\u5177\u6709\u7ba1\u7406\u5458\u6743\u9650\u3002\u60a8\u53ef\u4ee5\u5728\u7528\u6237\u8d26\u6237\u63a7\u5236\uff08UAC\uff09\u8bbe\u7f6e\u4e2d\u68c0\u67e5\u6216\u66f4\u6539\u8d26\u6237\u7c7b\u578b\u3002\u6b64\u5916\uff0c\u68c0\u67e5Python\u7684\u5b89\u88c5\u76ee\u5f55\u548c\u76f8\u5173\u6587\u4ef6\u7684\u6743\u9650\u8bbe\u7f6e\uff0c\u786e\u4fdd\u5b83\u4eec\u5bf9\u60a8\u7684\u7528\u6237\u8d26\u6237\u662f\u53ef\u8bbf\u95ee\u7684\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5f00\u5934\u6bb5\u843d: \u7ba1\u7406\u5458\u754c\u9762\u6253\u5f00Python\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u3001Windows PowerShell\u3001Jupy [&hellip;]","protected":false},"author":3,"featured_media":1077346,"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\/1077340"}],"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=1077340"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1077340\/revisions"}],"predecessor-version":[{"id":1077351,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1077340\/revisions\/1077351"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1077346"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1077340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1077340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1077340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}