{"id":978558,"date":"2024-12-27T06:38:49","date_gmt":"2024-12-26T22:38:49","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/978558.html"},"modified":"2024-12-27T06:38:51","modified_gmt":"2024-12-26T22:38:51","slug":"%e5%a6%82%e4%bd%95%e6%89%93%e5%bc%80python%e5%91%bd%e4%bb%a4%e7%aa%97%e5%8f%a3","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/978558.html","title":{"rendered":"\u5982\u4f55\u6253\u5f00python\u547d\u4ee4\u7a97\u53e3"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24203508\/fd74f29d-8339-46a8-8013-5a5a1a7454fb.webp\" alt=\"\u5982\u4f55\u6253\u5f00python\u547d\u4ee4\u7a97\u53e3\" \/><\/p>\n<p><p> <strong>\u6253\u5f00Python\u547d\u4ee4\u7a97\u53e3\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528\u7ec8\u7aef\u3001\u547d\u4ee4\u63d0\u793a\u7b26\uff08cmd\uff09\u3001Anaconda Prompt\u7b49\uff0c\u5177\u4f53\u65b9\u6cd5\u53d6\u51b3\u4e8e\u64cd\u4f5c\u7cfb\u7edf\u548cPython\u5b89\u88c5\u65b9\u5f0f\u3002<\/strong> \u5728Windows\u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u3001PowerShell\u6216Anaconda Prompt\u3002\u5728Mac\u548cLinux\u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528\u7ec8\u7aef\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26\u7684\u8be6\u7ec6\u6b65\u9aa4\uff1a\u9996\u5148\uff0c\u786e\u4fddPython\u5df2\u6b63\u786e\u5b89\u88c5\u5e76\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u7136\u540e\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165<code>python<\/code>\u4ee5\u542f\u52a8Python\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001WINDOWS\u7cfb\u7edf\u4e0a\u6253\u5f00PYTHON\u547d\u4ee4\u7a97\u53e3  <\/p>\n<\/p>\n<p><p>\u5728Windows\u7cfb\u7edf\u4e0a\uff0c\u6253\u5f00Python\u547d\u4ee4\u7a97\u53e3\u7684\u6700\u5e38\u7528\u65b9\u5f0f\u662f\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26\uff08Command Prompt\uff09\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528\u547d\u4ee4\u63d0\u793a\u7b26<\/strong><\/p>\n<\/p>\n<p><p>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u53ef\u4ee5\u901a\u8fc7\u6309\u4e0b\u201cWin + R\u201d\u952e\uff0c\u7136\u540e\u5728\u201c\u8fd0\u884c\u201d\u5bf9\u8bdd\u6846\u4e2d\u8f93\u5165<code>cmd<\/code>\u5e76\u6309\u4e0b\u201cEnter\u201d\u3002\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u7a97\u53e3\u4e2d\uff0c\u8f93\u5165<code>python<\/code>\u5e76\u6309\u4e0b\u201cEnter\u201d\u3002\u5982\u679cPython\u5df2\u6b63\u786e\u5b89\u88c5\uff0c\u4f60\u5c06\u770b\u5230Python\u89e3\u91ca\u5668\u7684\u542f\u52a8\u4fe1\u606f\u548c\u63d0\u793a\u7b26<code>&gt;&gt;&gt;<\/code>\uff0c\u8fd9\u8868\u793aPython\u547d\u4ee4\u7a97\u53e3\u5df2\u6210\u529f\u6253\u5f00\u3002<\/p>\n<\/p>\n<p><p>\u8981\u786e\u4fdd\u547d\u4ee4\u63d0\u793a\u7b26\u80fd\u591f\u8bc6\u522bPython\u547d\u4ee4\uff0c\u5fc5\u987b\u5728\u7cfb\u7edf\u7684\u201c\u73af\u5883\u53d8\u91cf\u201d\u4e2d\u6b63\u786e\u914d\u7f6ePython\u7684\u8def\u5f84\u3002\u901a\u5e38\uff0c\u5b89\u88c5Python\u65f6\u4f1a\u6709\u4e00\u4e2a\u9009\u9879\u201cAdd Python to PATH\u201d\uff0c\u9009\u4e2d\u8be5\u9009\u9879\u53ef\u81ea\u52a8\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528PowerShell<\/strong><\/p>\n<\/p>\n<p><p>Windows\u7cfb\u7edf\u7684PowerShell\u4e5f\u53ef\u4ee5\u7528\u6765\u542f\u52a8Python\u547d\u4ee4\u7a97\u53e3\u3002\u6253\u5f00PowerShell\u7684\u65b9\u6cd5\u4e0e\u547d\u4ee4\u63d0\u793a\u7b26\u76f8\u4f3c\uff0c\u6309\u4e0b\u201cWin + R\u201d\u952e\u540e\u8f93\u5165<code>powershell<\/code>\u5e76\u6309\u4e0b\u201cEnter\u201d\u3002\u5728PowerShell\u4e2d\uff0c\u540c\u6837\u8f93\u5165<code>python<\/code>\u5e76\u6309\u4e0b\u201cEnter\u201d\u4ee5\u542f\u52a8Python\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<p><p>PowerShell\u76f8\u8f83\u4e8e\u547d\u4ee4\u63d0\u793a\u7b26\u63d0\u4f9b\u4e86\u66f4\u5f3a\u5927\u7684\u529f\u80fd\u548c\u66f4\u53cb\u597d\u7684\u7528\u6237\u4f53\u9a8c\uff0c\u7279\u522b\u662f\u5728\u5904\u7406\u590d\u6742\u7684\u811a\u672c\u548c\u4efb\u52a1\u81ea\u52a8\u5316\u65f6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528Anaconda Prompt<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662fAnaconda\u53d1\u884c\u7248\u7684Python\uff0c\u90a3\u4e48\u53ef\u4ee5\u901a\u8fc7Anaconda Prompt\u6765\u6253\u5f00Python\u547d\u4ee4\u7a97\u53e3\u3002Anaconda Prompt\u662f\u4e13\u95e8\u4e3aAnaconda\u73af\u5883\u8bbe\u8ba1\u7684\u547d\u4ee4\u884c\u5de5\u5177\uff0c\u80fd\u591f\u81ea\u52a8\u7ba1\u7406\u548c\u6fc0\u6d3bAnaconda\u865a\u62df\u73af\u5883\u3002<\/p>\n<\/p>\n<p><p>\u6253\u5f00Anaconda Prompt\u7684\u65b9\u6cd5\u662f\u5728\u201c\u5f00\u59cb\u201d\u83dc\u5355\u4e2d\u627e\u5230\u201cAnaconda\u201d\u6587\u4ef6\u5939\uff0c\u7136\u540e\u9009\u62e9\u201cAnaconda Prompt\u201d\u3002\u5728Anaconda Prompt\u4e2d\u8f93\u5165<code>python<\/code>\u5e76\u6309\u4e0b\u201cEnter\u201d\u5373\u53ef\u542f\u52a8Python\u547d\u4ee4\u7a97\u53e3\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001MACOS\u7cfb\u7edf\u4e0a\u6253\u5f00PYTHON\u547d\u4ee4\u7a97\u53e3  <\/p>\n<\/p>\n<p><p>\u5728MacOS\u7cfb\u7edf\u4e0a\uff0c\u6253\u5f00Python\u547d\u4ee4\u7a97\u53e3\u4e3b\u8981\u901a\u8fc7\u7ec8\u7aef\uff08Terminal\uff09\u5b9e\u73b0\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528\u7ec8\u7aef<\/strong><\/p>\n<\/p>\n<p><p>\u6253\u5f00\u201c\u7ec8\u7aef\u201d\u5e94\u7528\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u901a\u8fc7\u5728\u201c\u5e94\u7528\u7a0b\u5e8f\u201d\u6587\u4ef6\u5939\u4e2d\u7684\u201c\u5b9e\u7528\u5de5\u5177\u201d\u4e0b\u627e\u5230\u201c\u7ec8\u7aef\u201d\u5e76\u53cc\u51fb\u6253\u5f00\u3002\u4e5f\u53ef\u4ee5\u4f7f\u7528Spotlight\u641c\u7d22\uff08\u6309\u4e0b\u201cCommand + Space\u201d\uff09\u5e76\u8f93\u5165\u201cTerminal\u201d\u6765\u5feb\u901f\u6253\u5f00\u3002<\/p>\n<\/p>\n<p><p>\u5728\u7ec8\u7aef\u4e2d\uff0c\u8f93\u5165<code>python3<\/code>\u5e76\u6309\u4e0b\u201cEnter\u201d\u4ee5\u542f\u52a8Python 3\u89e3\u91ca\u5668\uff08MacOS\u81ea\u5e26Python 2\u548cPython 3\uff0c\u5efa\u8bae\u4f7f\u7528Python 3\uff09\u3002\u5982\u679c\u5b89\u88c5\u4e86Homebrew\u7b49\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7<code>brew install python<\/code>\u6765\u5b89\u88c5\u548c\u7ba1\u7406Python\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u9047\u5230Python\u547d\u4ee4\u65e0\u6cd5\u8bc6\u522b\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u68c0\u67e5\u5e76\u914d\u7f6e\u7ec8\u7aef\u7684\u73af\u5883\u53d8\u91cf\u3002\u901a\u5e38\u9700\u8981\u7f16\u8f91\u7528\u6237\u4e3b\u76ee\u5f55\u4e0b\u7684<code>.bash_profile<\/code>\u6216<code>.zshrc<\/code>\u6587\u4ef6\uff08\u6839\u636e\u4f7f\u7528\u7684shell\u4e0d\u540c\uff09\uff0c\u6dfb\u52a0Python\u7684\u8def\u5f84\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">export PATH=&quot;\/usr\/local\/bin\/python3:$PATH&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4fdd\u5b58\u6587\u4ef6\u5e76\u5728\u7ec8\u7aef\u4e2d\u8fd0\u884c<code>source ~\/.bash_profile<\/code>\u6216<code>source ~\/.zshrc<\/code>\u4ee5\u5e94\u7528\u66f4\u6539\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001LINUX\u7cfb\u7edf\u4e0a\u6253\u5f00PYTHON\u547d\u4ee4\u7a97\u53e3  <\/p>\n<\/p>\n<p><p>\u5728Linux\u7cfb\u7edf\u4e0a\uff0c\u4f7f\u7528\u7ec8\u7aef\u662f\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u6765\u6253\u5f00Python\u547d\u4ee4\u7a97\u53e3\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528\u7ec8\u7aef<\/strong><\/p>\n<\/p>\n<p><p>\u6253\u5f00\u7ec8\u7aef\u7684\u65b9\u6cd5\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684Linux\u53d1\u884c\u7248\u548c\u684c\u9762\u73af\u5883\u3002\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7\u6309\u4e0b\u201cCtrl + Alt + T\u201d\u5feb\u6377\u952e\u6253\u5f00\u7ec8\u7aef\u3002\u5728\u7ec8\u7aef\u4e2d\uff0c\u8f93\u5165<code>python3<\/code>\u5e76\u6309\u4e0b\u201cEnter\u201d\u4ee5\u542f\u52a8Python 3\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<p><p>\u5927\u591a\u6570Linux\u53d1\u884c\u7248\u90fd\u9884\u88c5\u4e86Python 2\u548cPython 3\uff0c\u5982\u9700\u4f7f\u7528Python 3\uff0c\u5efa\u8bae\u660e\u786e\u4f7f\u7528<code>python3<\/code>\u547d\u4ee4\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177<\/strong><\/p>\n<\/p>\n<p><p>\u5728Linux\u4e0a\uff0cPython\u7684\u5b89\u88c5\u548c\u7ba1\u7406\u53ef\u4ee5\u901a\u8fc7\u5305\u7ba1\u7406\u5de5\u5177\u5982apt\u3001yum\u3001dnf\u7b49\u5b9e\u73b0\u3002\u4f8b\u5982\uff0c\u5728Debian\u6216Ubuntu\u4e0a\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u6765\u5b89\u88c5Python 3\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt update<\/p>\n<p>sudo apt install python3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u901a\u8fc7<code>python3<\/code>\u547d\u4ee4\u542f\u52a8Python\u547d\u4ee4\u7a97\u53e3\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u865a\u62df\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>Linux\u7cfb\u7edf\u4e0a\u4e5f\u53ef\u4ee5\u4f7f\u7528<code>venv<\/code>\u6a21\u5757\u521b\u5efa\u548c\u7ba1\u7406Python\u865a\u62df\u73af\u5883\u3002\u5728\u7ec8\u7aef\u4e2d\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">python3 -m venv myenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u5e76\u542f\u52a8Python\u89e3\u91ca\u5668\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source myenv\/bin\/activate<\/p>\n<p>python<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u865a\u62df\u73af\u5883\uff0c\u53ef\u4ee5\u9694\u79bb\u9879\u76ee\u7684Python\u4f9d\u8d56\uff0c\u907f\u514d\u4e0e\u7cfb\u7edf\u5168\u5c40\u73af\u5883\u7684\u51b2\u7a81\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u5e38\u89c1\u95ee\u9898\u53ca\u89e3\u51b3\u65b9\u6cd5  <\/p>\n<\/p>\n<p><p>\u5728\u6253\u5f00Python\u547d\u4ee4\u7a97\u53e3\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u5e38\u89c1\u95ee\u9898\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u95ee\u9898\u53ca\u5176\u89e3\u51b3\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>Python\u547d\u4ee4\u65e0\u6cd5\u8bc6\u522b<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u8f93\u5165<code>python<\/code>\u6216<code>python3<\/code>\u547d\u4ee4\u540e\u63d0\u793a\u201c\u547d\u4ee4\u65e0\u6cd5\u8bc6\u522b\u201d\uff0c\u53ef\u80fd\u662fPython\u672a\u6b63\u786e\u5b89\u88c5\u6216\u73af\u5883\u53d8\u91cf\u672a\u914d\u7f6e\u3002\u786e\u4fddPython\u5df2\u5b89\u88c5\uff0c\u5e76\u68c0\u67e5\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7248\u672c\u51b2\u7a81<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u540c\u4e00\u7cfb\u7edf\u4e2d\u53ef\u80fd\u5b89\u88c5\u4e86\u591a\u4e2a\u7248\u672c\u7684Python\uff0c\u4f7f\u7528\u65f6\u53ef\u80fd\u4f1a\u9047\u5230\u7248\u672c\u51b2\u7a81\u95ee\u9898\u3002\u53ef\u4ee5\u901a\u8fc7\u660e\u786e\u4f7f\u7528<code>python3<\/code>\u547d\u4ee4\u6765\u6307\u5b9aPython 3\uff0c\u6216\u8005\u4f7f\u7528<code>pyenv<\/code>\u7b49\u5de5\u5177\u6765\u7ba1\u7406\u591a\u4e2aPython\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6743\u9650\u95ee\u9898<\/strong><\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u6216\u8fd0\u884cPython\u65f6\u53ef\u80fd\u4f1a\u9047\u5230\u6743\u9650\u95ee\u9898\uff0c\u5c24\u5176\u662f\u5728Linux\u7cfb\u7edf\u4e0a\u8fdb\u884c\u7cfb\u7edf\u7ea7\u522b\u5b89\u88c5\u65f6\u3002\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528<code>sudo<\/code>\u547d\u4ee4\u63d0\u5347\u6743\u9650\u6765\u89e3\u51b3\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">sudo apt install python3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f9d\u8d56\u95ee\u9898<\/strong><\/p>\n<\/p>\n<p><p>\u6709\u65f6Python\u7a0b\u5e8f\u8fd0\u884c\u65f6\u53ef\u80fd\u4f1a\u9047\u5230\u4f9d\u8d56\u5e93\u7f3a\u5931\u7684\u95ee\u9898\uff0c\u53ef\u4ee5\u901a\u8fc7pip\u5305\u7ba1\u7406\u5de5\u5177\u5b89\u88c5\u6240\u9700\u4f9d\u8d56\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install &lt;package_name&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u65b9\u6cd5\u548c\u89e3\u51b3\u65b9\u6848\uff0c\u4f60\u5e94\u8be5\u80fd\u591f\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u6210\u529f\u6253\u5f00Python\u547d\u4ee4\u7a97\u53e3\uff0c\u5e76\u89e3\u51b3\u5e38\u89c1\u95ee\u9898\u3002\u65e0\u8bba\u662f\u521d\u5b66\u8005\u8fd8\u662f\u7ecf\u9a8c\u4e30\u5bcc\u7684\u5f00\u53d1\u8005\uff0c\u638c\u63e1\u8fd9\u4e9b\u57fa\u672c\u64cd\u4f5c\u90fd\u662f\u4f7f\u7528Python\u8fdb\u884c\u5f00\u53d1\u548c\u5b66\u4e60\u7684\u91cd\u8981\u57fa\u7840\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Windows\u7cfb\u7edf\u4e2d\u6253\u5f00Python\u547d\u4ee4\u7a97\u53e3\uff1f<\/strong><br \/>\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u6253\u5f00Python\u547d\u4ee4\u7a97\u53e3\u53ef\u4ee5\u901a\u8fc7\u51e0\u79cd\u65b9\u5f0f\u5b9e\u73b0\u3002\u6700\u7b80\u5355\u7684\u65b9\u6cd5\u662f\u4f7f\u7528\u201c\u547d\u4ee4\u63d0\u793a\u7b26\u201d\u3002\u60a8\u53ef\u4ee5\u6309\u4e0b\u201cWindows\u952e + R\u201d\uff0c\u7136\u540e\u8f93\u5165\u201ccmd\u201d\u5e76\u56de\u8f66\uff0c\u63a5\u7740\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165\u201cpython\u201d\u6216\u201cpy\u201d\u6765\u542f\u52a8Python\u89e3\u91ca\u5668\u3002\u5982\u679c\u60a8\u5df2\u7ecf\u5b89\u88c5\u4e86Anaconda\uff0c\u4e5f\u53ef\u4ee5\u901a\u8fc7Anaconda Prompt\u542f\u52a8Python\u3002<\/p>\n<p><strong>\u5728Mac\u6216Linux\u7cfb\u7edf\u4e2d\u5982\u4f55\u8bbf\u95eePython\u547d\u4ee4\u884c\uff1f<\/strong><br \/>\u5bf9\u4e8eMac\u6216Linux\u7528\u6237\uff0c\u53ef\u4ee5\u901a\u8fc7\u7ec8\u7aef\u5e94\u7528\u7a0b\u5e8f\u8bbf\u95eePython\u547d\u4ee4\u884c\u3002\u627e\u5230\u5e76\u6253\u5f00\u7ec8\u7aef\uff0c\u7136\u540e\u8f93\u5165\u201cpython3\u201d\u6216\u201cpython\u201d\u6765\u542f\u52a8Python\u89e3\u91ca\u5668\u3002\u786e\u4fdd\u60a8\u7684\u7cfb\u7edf\u4e2d\u5df2\u7ecf\u5b89\u88c5\u4e86Python\uff0c\u5e76\u4e14\u60a8\u4f7f\u7528\u7684\u547d\u4ee4\u4e0e\u5b89\u88c5\u7684\u7248\u672c\u76f8\u5bf9\u5e94\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u73af\u5883\u4e2d\u6267\u884c\u7b80\u5355\u7684\u547d\u4ee4\uff1f<\/strong><br \/>\u4e00\u65e6\u60a8\u6253\u5f00\u4e86Python\u547d\u4ee4\u7a97\u53e3\uff0c\u53ef\u4ee5\u76f4\u63a5\u8f93\u5165Python\u4ee3\u7801\u8fdb\u884c\u6267\u884c\u3002\u4f8b\u5982\uff0c\u8f93\u5165<code>print(&quot;Hello, World!&quot;)<\/code>\u540e\u6309\u4e0b\u56de\u8f66\uff0c\u60a8\u5c06\u770b\u5230\u8f93\u51fa\u7ed3\u679c\u3002\u60a8\u8fd8\u53ef\u4ee5\u8fdb\u884c\u6570\u5b66\u8fd0\u7b97\uff0c\u5982\u8f93\u5165<code>2 + 3<\/code>\u5e76\u6309\u56de\u8f66\uff0c\u5c06\u663e\u793a\u7ed3\u679c5\u3002\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u60a8\u53ef\u4ee5\u5b9e\u65f6\u6d4b\u8bd5\u548c\u8fd0\u884cPython\u4ee3\u7801\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u6253\u5f00Python\u547d\u4ee4\u7a97\u53e3\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u4f7f\u7528\u7ec8\u7aef\u3001\u547d\u4ee4\u63d0\u793a\u7b26\uff08cmd\uff09\u3001Anaconda Prompt\u7b49\uff0c\u5177 [&hellip;]","protected":false},"author":3,"featured_media":978564,"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\/978558"}],"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=978558"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/978558\/revisions"}],"predecessor-version":[{"id":978566,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/978558\/revisions\/978566"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/978564"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=978558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=978558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=978558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}