{"id":931495,"date":"2024-12-26T17:37:43","date_gmt":"2024-12-26T09:37:43","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/931495.html"},"modified":"2024-12-26T17:37:44","modified_gmt":"2024-12-26T09:37:44","slug":"python-shell-%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/931495.html","title":{"rendered":"python shell \u5982\u4f55\u4f7f\u7528"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25065807\/e0c85cc0-ed3a-4965-9fc6-7d0aa78054ca.webp\" alt=\"python shell \u5982\u4f55\u4f7f\u7528\" \/><\/p>\n<p><p> <strong>Python shell\u7684\u4f7f\u7528\u65b9\u6cd5\u4e3b\u8981\u5305\u62ec\uff1a\u6253\u5f00Python\u89e3\u91ca\u5668\u3001\u76f4\u63a5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165Python\u4ee3\u7801\u3001\u5b9e\u65f6\u67e5\u770b\u4ee3\u7801\u6267\u884c\u7ed3\u679c\u3002<\/strong> Python shell\u662f\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u7684\u7f16\u7a0b\u73af\u5883\uff0c\u5141\u8bb8\u7528\u6237\u76f4\u63a5\u8f93\u5165Python\u4ee3\u7801\u5e76\u7acb\u5373\u67e5\u770b\u7ed3\u679c\u3002\u5bf9\u4e8e\u521d\u5b66\u8005\u6765\u8bf4\uff0c\u8fd9\u662f\u4e00\u79cd\u5b66\u4e60\u548c\u6d4b\u8bd5\u4ee3\u7801\u7684\u4fbf\u6377\u65b9\u5f0f\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8Python shell\u7684\u4f7f\u7528\u65b9\u6cd5\u53ca\u5176\u4f18\u52bf\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u6253\u5f00PYTHON\u89e3\u91ca\u5668<\/p>\n<\/p>\n<p><p>Python shell\u662fPython\u89e3\u91ca\u5668\u7684\u4e00\u90e8\u5206\uff0c\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u6253\u5f00\u3002\u6700\u5e38\u89c1\u7684\u65b9\u6cd5\u662f\u5728\u547d\u4ee4\u884c\u754c\u9762\u4e2d\u8f93\u5165\u201cpython\u201d\u6216\u201cpython3\u201d\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u7cfb\u7edf\u7684Python\u7248\u672c\u3002\u6253\u5f00Python shell\u540e\uff0c\u7528\u6237\u4f1a\u770b\u5230\u4e00\u4e2a\u63d0\u793a\u7b26\uff08\u901a\u5e38\u662f\u201c&gt;&gt;&gt;\u201d\uff09\uff0c\u8868\u793a\u53ef\u4ee5\u8f93\u5165\u4ee3\u7801\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528\u547d\u4ee4\u884c\u6253\u5f00Python shell<\/strong><\/p>\n<\/p>\n<p><p>\u5728Windows\u3001macOS\u6216Linux\u4e0a\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u6253\u5f00Python shell\u3002\u9996\u5148\uff0c\u786e\u4fddPython\u5df2\u6b63\u786e\u5b89\u88c5\u5e76\u914d\u7f6e\u4e86\u73af\u5883\u53d8\u91cf\u3002\u7136\u540e\uff0c\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u201cpython\u201d\u6216\u201cpython3\u201d\u5373\u53ef\u542f\u52a8Python\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u4e2d\u7684Python shell<\/strong><\/p>\n<\/p>\n<p><p>\u8bb8\u591aIDE\uff0c\u5982PyCharm\u3001Visual Studio Code\u548cAnaconda\uff0c\u63d0\u4f9b\u5185\u7f6e\u7684Python shell\u3002\u901a\u8fc7\u8fd9\u4e9bIDE\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u7f16\u5199\u4ee3\u7801\u7684\u540c\u65f6\u65b9\u4fbf\u5730\u6d4b\u8bd5\u5c0f\u6bb5\u4ee3\u7801\u3002\u6253\u5f00IDE\u540e\uff0c\u901a\u5e38\u53ef\u4ee5\u5728\u5de5\u5177\u680f\u6216\u83dc\u5355\u4e2d\u627e\u5230Python shell\u9009\u9879\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165PYTHON\u4ee3\u7801<\/p>\n<\/p>\n<p><p>Python shell\u7684\u6838\u5fc3\u529f\u80fd\u662f\u5141\u8bb8\u7528\u6237\u76f4\u63a5\u8f93\u5165\u548c\u6267\u884cPython\u4ee3\u7801\u3002\u7528\u6237\u53ef\u4ee5\u8f93\u5165\u4efb\u4f55\u6709\u6548\u7684Python\u8bed\u53e5\uff0c\u5e76\u7acb\u5373\u67e5\u770b\u7ed3\u679c\u3002\u8fd9\u4f7f\u5f97Python shell\u6210\u4e3a\u6d4b\u8bd5\u548c\u8c03\u8bd5\u4ee3\u7801\u7684\u5f3a\u5927\u5de5\u5177\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8f93\u5165\u7b80\u5355\u7684Python\u8bed\u53e5<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python shell\u4e2d\uff0c\u7528\u6237\u53ef\u4ee5\u8f93\u5165\u7b80\u5355\u7684Python\u8868\u8fbe\u5f0f\uff0c\u4f8b\u5982\u6570\u5b66\u8fd0\u7b97\u3001\u53d8\u91cf\u8d4b\u503c\u6216\u5b57\u7b26\u4e32\u64cd\u4f5c\u3002\u8f93\u5165\u5b8c\u6bd5\u540e\uff0c\u6309\u4e0b\u201cEnter\u201d\u952e\u5373\u53ef\u7acb\u5373\u67e5\u770b\u7ed3\u679c\u3002\u4f8b\u5982\uff0c\u8f93\u5165\u201cprint(&#39;Hello, World!&#39;)\u201d\u5e76\u56de\u8f66\uff0cshell\u4f1a\u8f93\u51fa\u201cHello, World!\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9010\u6b65\u6d4b\u8bd5\u590d\u6742\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u590d\u6742\u7684\u4ee3\u7801\u6216\u51fd\u6570\uff0c\u7528\u6237\u53ef\u4ee5\u5728shell\u4e2d\u9010\u6b65\u8f93\u5165\u548c\u6d4b\u8bd5\u3002\u901a\u8fc7\u5206\u6b65\u6267\u884c\u4ee3\u7801\uff0c\u7528\u6237\u53ef\u4ee5\u66f4\u597d\u5730\u7406\u89e3\u7a0b\u5e8f\u7684\u6267\u884c\u6d41\u7a0b\uff0c\u5e76\u5feb\u901f\u53d1\u73b0\u548c\u4fee\u590d\u9519\u8bef\u3002\u4f8b\u5982\uff0c\u7528\u6237\u53ef\u4ee5\u5728shell\u4e2d\u5b9a\u4e49\u4e00\u4e2a\u51fd\u6570\uff0c\u7136\u540e\u8c03\u7528\u8be5\u51fd\u6570\u5e76\u67e5\u770b\u5176\u8f93\u51fa\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u5b9e\u65f6\u67e5\u770b\u4ee3\u7801\u6267\u884c\u7ed3\u679c<\/p>\n<\/p>\n<p><p>Python shell\u7684\u5b9e\u65f6\u4ea4\u4e92\u7279\u6027\u5141\u8bb8\u7528\u6237\u7acb\u5373\u67e5\u770b\u4ee3\u7801\u7684\u6267\u884c\u7ed3\u679c\u3002\u8fd9\u4e0d\u4ec5\u63d0\u9ad8\u4e86\u4ee3\u7801\u6d4b\u8bd5\u7684\u6548\u7387\uff0c\u8fd8\u5e2e\u52a9\u7528\u6237\u66f4\u76f4\u89c2\u5730\u7406\u89e3\u4ee3\u7801\u7684\u884c\u4e3a\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8c03\u8bd5\u548c\u4f18\u5316\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u8c03\u8bd5\u662f\u5fc5\u4e0d\u53ef\u5c11\u7684\u4e00\u73af\u3002Python shell\u5141\u8bb8\u7528\u6237\u5728\u8c03\u8bd5\u65f6\u5feb\u901f\u6d4b\u8bd5\u4e0d\u540c\u7684\u4ee3\u7801\u7247\u6bb5\uff0c\u627e\u51fa\u95ee\u9898\u6240\u5728\u3002\u901a\u8fc7\u5b9e\u65f6\u67e5\u770b\u7ed3\u679c\uff0c\u7528\u6237\u53ef\u4ee5\u66f4\u5feb\u5730\u4f18\u5316\u4ee3\u7801\u6027\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b66\u4e60\u548c\u5b9e\u8df5\u7f16\u7a0b<\/strong><\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u7f16\u7a0b\u521d\u5b66\u8005\u6765\u8bf4\uff0cPython shell\u662f\u4e00\u4e2a\u7406\u60f3\u7684\u5b66\u4e60\u5de5\u5177\u3002\u901a\u8fc7\u4e0d\u65ad\u8f93\u5165\u548c\u6267\u884c\u4ee3\u7801\uff0c\u521d\u5b66\u8005\u53ef\u4ee5\u66f4\u597d\u5730\u7406\u89e3Python\u7684\u8bed\u6cd5\u548c\u529f\u80fd\u3002\u6b64\u5916\uff0cPython shell\u63d0\u4f9b\u5373\u65f6\u53cd\u9988\uff0c\u6709\u52a9\u4e8e\u52a0\u6df1\u5bf9\u7f16\u7a0b\u6982\u5ff5\u7684\u7406\u89e3\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001PYTHON SHELL\u7684\u9ad8\u7ea7\u529f\u80fd<\/p>\n<\/p>\n<p><p>\u9664\u4e86\u57fa\u672c\u529f\u80fd\u5916\uff0cPython shell\u8fd8\u63d0\u4f9b\u4e86\u4e00\u4e9b\u9ad8\u7ea7\u529f\u80fd\uff0c\u4f7f\u5176\u6210\u4e3a\u5f00\u53d1\u8005\u624b\u4e2d\u7684\u5229\u5668\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4f7f\u7528\u5185\u7f6e\u6a21\u5757\u548c\u5e93<\/strong><\/p>\n<\/p>\n<p><p>Python shell\u5141\u8bb8\u7528\u6237\u5bfc\u5165\u548c\u4f7f\u7528Python\u7684\u5185\u7f6e\u6a21\u5757\u548c\u7b2c\u4e09\u65b9\u5e93\u3002\u8fd9\u4f7f\u5f97\u7528\u6237\u53ef\u4ee5\u5728shell\u4e2d\u6d4b\u8bd5\u5404\u79cd\u6a21\u5757\u7684\u529f\u80fd\u548c\u7528\u6cd5\u3002\u4f8b\u5982\uff0c\u7528\u6237\u53ef\u4ee5\u5bfc\u5165\u201cmath\u201d\u6a21\u5757\u5e76\u5728shell\u4e2d\u4f7f\u7528\u5176\u6570\u5b66\u51fd\u6570\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u81ea\u5b9a\u4e49\u914d\u7f6e\u548c\u811a\u672c<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u9ad8\u7ea7\u5e94\u7528\u4e2d\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u81ea\u5b9a\u4e49Python shell\u7684\u884c\u4e3a\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u201c.pythonrc.py\u201d\u6587\u4ef6\uff0c\u5b9a\u4e49\u4e00\u4e9b\u5e38\u7528\u7684\u8bbe\u7f6e\u548c\u51fd\u6570\u3002\u6bcf\u6b21\u542f\u52a8shell\u65f6\uff0c\u8fd9\u4e9b\u914d\u7f6e\u4f1a\u81ea\u52a8\u52a0\u8f7d\u3002\u6b64\u5916\uff0c\u7528\u6237\u8fd8\u53ef\u4ee5\u7f16\u5199\u811a\u672c\u5e76\u5728shell\u4e2d\u8fd0\u884c\uff0c\u4ee5\u5b9e\u73b0\u7279\u5b9a\u7684\u4efb\u52a1\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001PYTHON SHELL\u7684\u5c40\u9650\u6027\u548c\u66ff\u4ee3\u5de5\u5177<\/p>\n<\/p>\n<p><p>\u867d\u7136Python shell\u529f\u80fd\u5f3a\u5927\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u53ef\u80fd\u5e76\u4e0d\u662f\u6700\u4f73\u9009\u62e9\u3002\u4e86\u89e3\u5176\u5c40\u9650\u6027\u5e76\u63a2\u7d22\u66ff\u4ee3\u5de5\u5177\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u9009\u62e9\u6700\u9002\u5408\u5176\u9700\u6c42\u7684\u5de5\u5177\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5c40\u9650\u6027<\/strong><\/p>\n<\/p>\n<p><p>Python shell\u7684\u4e3b\u8981\u5c40\u9650\u6027\u5728\u4e8e\u5176\u4ea4\u4e92\u6027\u548c\u4e34\u65f6\u6027\u3002\u7531\u4e8e\u6bcf\u6b21\u9000\u51fashell\u65f6\uff0c\u6240\u6709\u5b9a\u4e49\u7684\u53d8\u91cf\u548c\u51fd\u6570\u90fd\u4f1a\u4e22\u5931\uff0c\u56e0\u6b64\u4e0d\u9002\u5408\u7528\u4e8e\u957f\u671f\u9879\u76ee\u5f00\u53d1\u3002\u6b64\u5916\uff0cshell\u4e0d\u652f\u6301\u56fe\u5f62\u754c\u9762\u548c\u590d\u6742\u7684\u7528\u6237\u4ea4\u4e92\uff0c\u8fd9\u9650\u5236\u4e86\u5176\u5728\u67d0\u4e9b\u5e94\u7528\u573a\u666f\u4e2d\u7684\u4f7f\u7528\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u66ff\u4ee3\u5de5\u5177<\/strong><\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u9700\u8981\u66f4\u590d\u6742\u529f\u80fd\u7684\u9879\u76ee\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528IDE\u6216Jupyter Notebook\u3002IDE\u63d0\u4f9b\u4e86\u66f4\u5f3a\u5927\u7684\u8c03\u8bd5\u5de5\u5177\u3001\u4ee3\u7801\u8865\u5168\u548c<a href=\"https:\/\/docs.pingcode.com\/blog\/project-management\/23316.html\" target=\"_blank\">\u9879\u76ee\u7ba1\u7406<\/a>\u529f\u80fd\u3002\u800cJupyter Notebook\u5219\u7ed3\u5408\u4e86\u4ee3\u7801\u3001\u6587\u672c\u548c\u53ef\u89c6\u5316\uff0c\u662f\u6570\u636e\u79d1\u5b66\u548c\u6559\u5b66\u9886\u57df\u7684\u7406\u60f3\u9009\u62e9\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001PYTHON SHELL\u5728\u4e0d\u540c\u64cd\u4f5c\u7cfb\u7edf\u4e0a\u7684\u4f7f\u7528<\/p>\n<\/p>\n<p><p>\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u7684\u4e0d\u540c\uff0cPython shell\u7684\u4f7f\u7528\u4e5f\u7565\u6709\u5dee\u5f02\u3002\u5728\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u4e0a\uff0c\u4e86\u89e3\u5982\u4f55\u5b89\u88c5\u548c\u4f7f\u7528Python shell\u53ef\u4ee5\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>Windows\u7cfb\u7edf<\/strong><\/p>\n<\/p>\n<p><p>\u5728Windows\u4e0a\uff0c\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26\uff08cmd\uff09\u6216Windows PowerShell\u6253\u5f00Python shell\u3002\u5728\u5b89\u88c5Python\u65f6\uff0c\u786e\u4fdd\u52fe\u9009\u201c\u6dfb\u52a0Python\u5230PATH\u201d\u9009\u9879\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u76f4\u63a5\u8c03\u7528Python\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>macOS\u548cLinux\u7cfb\u7edf<\/strong><\/p>\n<\/p>\n<p><p>\u5bf9\u4e8emacOS\u548cLinux\u7528\u6237\uff0c\u53ef\u4ee5\u901a\u8fc7\u7ec8\u7aef\u8bbf\u95eePython shell\u3002\u5728\u8fd9\u4e9b\u7cfb\u7edf\u4e0a\uff0cPython\u901a\u5e38\u5df2\u7ecf\u9884\u88c5\uff0c\u4f46\u5efa\u8bae\u7528\u6237\u5b89\u88c5\u6700\u65b0\u7248\u672c\u3002\u901a\u8fc7Homebrew\uff08macOS\uff09\u6216\u5305\u7ba1\u7406\u5668\uff08Linux\uff09\uff0c\u53ef\u4ee5\u65b9\u4fbf\u5730\u5b89\u88c5\u548c\u7ba1\u7406Python\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e03\u3001PYTHON SHELL\u7684\u6700\u4f73\u5b9e\u8df5<\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u66f4\u9ad8\u6548\u5730\u4f7f\u7528Python shell\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u9075\u5faa\u4e00\u4e9b\u6700\u4f73\u5b9e\u8df5\u3002\u8fd9\u4e9b\u5b9e\u8df5\u6709\u52a9\u4e8e\u63d0\u9ad8\u4ee3\u7801\u8d28\u91cf\u548c\u5f00\u53d1\u6548\u7387\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4fdd\u6301\u4ee3\u7801\u7b80\u6d01<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python shell\u4e2d\u8f93\u5165\u4ee3\u7801\u65f6\uff0c\u4fdd\u6301\u4ee3\u7801\u7b80\u6d01\u548c\u6613\u8bfb\u662f\u5173\u952e\u3002\u901a\u8fc7\u4f7f\u7528\u6ce8\u91ca\u548c\u5408\u7406\u7684\u547d\u540d\uff0c\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b9a\u671f\u4fdd\u5b58\u4ee3\u7801<\/strong><\/p>\n<\/p>\n<p><p>\u7531\u4e8ePython shell\u4e2d\u7684\u4ee3\u7801\u5728\u9000\u51fa\u540e\u4f1a\u4e22\u5931\uff0c\u56e0\u6b64\u5efa\u8bae\u5b9a\u671f\u5c06\u91cd\u8981\u7684\u4ee3\u7801\u7247\u6bb5\u4fdd\u5b58\u5230\u6587\u4ef6\u4e2d\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u590d\u5236\u4ee3\u7801\u5e76\u7c98\u8d34\u5230\u6587\u672c\u7f16\u8f91\u5668\u4e2d\u6765\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u603b\u7ed3\u6765\u8bf4\uff0cPython shell\u662f\u4e00\u4e2a\u529f\u80fd\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u9002\u5408\u7528\u4e8e\u5feb\u901f\u6d4b\u8bd5\u548c\u8c03\u8bd5\u4ee3\u7801\u3002\u901a\u8fc7\u638c\u63e1\u5176\u4f7f\u7528\u65b9\u6cd5\u548c\u6700\u4f73\u5b9e\u8df5\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u63d0\u9ad8\u7f16\u7a0b\u6548\u7387\uff0c\u5e76\u5728\u5b66\u4e60\u548c\u9879\u76ee\u5f00\u53d1\u4e2d\u53d7\u76ca\u532a\u6d45\u3002\u65e0\u8bba\u662f\u521d\u5b66\u8005\u8fd8\u662f\u7ecf\u9a8c\u4e30\u5bcc\u7684\u5f00\u53d1\u8005\uff0cPython shell\u90fd\u80fd\u63d0\u4f9b\u4fbf\u5229\u548c\u652f\u6301\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u6211\u7684\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5Python Shell\uff1f<\/strong><br \/>\u8981\u5728\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5Python Shell\uff0c\u53ef\u4ee5\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff0c\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u6216\u7ec8\u7aef\u8f93\u5165\u201cpython\u201d\u6216\u201cpython3\u201d\u6765\u542f\u52a8Python Shell\u3002\u6b64\u5916\uff0c\u786e\u4fdd\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u9009\u4e2d\u201c\u6dfb\u52a0\u5230PATH\u201d\u7684\u9009\u9879\uff0c\u4ee5\u4fbf\u4e8e\u5728\u4efb\u4f55\u76ee\u5f55\u4e0b\u8c03\u7528Python\u3002<\/p>\n<p><strong>Python Shell\u9002\u5408\u7528\u4e8e\u54ea\u4e9b\u7c7b\u578b\u7684\u7f16\u7a0b\u4efb\u52a1\uff1f<\/strong><br \/>Python Shell\u975e\u5e38\u9002\u5408\u8fdb\u884c\u5feb\u901f\u5b9e\u9a8c\u548c\u8c03\u8bd5\u5c0f\u6bb5\u4ee3\u7801\u3002\u5b83\u5141\u8bb8\u7528\u6237\u9010\u884c\u8f93\u5165\u547d\u4ee4\u5e76\u7acb\u5373\u67e5\u770b\u7ed3\u679c\uff0c\u8fd9\u5bf9\u4e8e\u5b66\u4e60\u548c\u6d4b\u8bd5Python\u5e93\u3001\u51fd\u6570\u6216\u8bed\u6cd5\u975e\u5e38\u6709\u5e2e\u52a9\u3002\u6b64\u5916\uff0c\u4f7f\u7528Python Shell\u53ef\u4ee5\u5feb\u901f\u8fdb\u884c\u6570\u636e\u5904\u7406\u548c\u8ba1\u7b97\uff0c\u800c\u65e0\u9700\u521b\u5efa\u5b8c\u6574\u7684\u811a\u672c\u6587\u4ef6\u3002<\/p>\n<p><strong>\u6211\u80fd\u5728Python Shell\u4e2d\u4f7f\u7528\u54ea\u4e9b\u529f\u80fd\u548c\u547d\u4ee4\uff1f<\/strong><br \/>\u5728Python Shell\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u51e0\u4e4e\u6240\u6709Python\u7684\u5185\u7f6e\u51fd\u6570\u548c\u5e93\u3002\u7528\u6237\u53ef\u4ee5\u5b9a\u4e49\u53d8\u91cf\u3001\u7f16\u5199\u7b80\u5355\u7684\u51fd\u6570\u3001\u6267\u884c\u6570\u5b66\u8fd0\u7b97\u3001\u5bfc\u5165\u6a21\u5757\u4ee5\u53ca\u8fdb\u884c\u6570\u636e\u7ed3\u6784\u64cd\u4f5c\u7b49\u3002\u540c\u65f6\uff0cPython Shell\u8fd8\u652f\u6301\u81ea\u52a8\u5b8c\u6210\u548c\u5386\u53f2\u8bb0\u5f55\u529f\u80fd\uff0c\u4fbf\u4e8e\u7528\u6237\u5feb\u901f\u627e\u5230\u4e4b\u524d\u8f93\u5165\u8fc7\u7684\u547d\u4ee4\u3002<\/p>\n<p><strong>\u5982\u4f55\u63d0\u9ad8\u5728Python Shell\u4e2d\u7684\u7f16\u7a0b\u6548\u7387\uff1f<\/strong><br \/>\u63d0\u9ad8\u5728Python Shell\u4e2d\u7684\u7f16\u7a0b\u6548\u7387\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\u3002\u4f7f\u7528\u5feb\u6377\u952e\u53ef\u4ee5\u52a0\u5feb\u8f93\u5165\u901f\u5ea6\uff0c\u4e86\u89e3\u5e38\u7528\u547d\u4ee4\u548c\u51fd\u6570\u80fd\u591f\u51cf\u5c11\u53cd\u590d\u67e5\u8be2\u7684\u65f6\u95f4\u3002\u6b64\u5916\uff0c\u5229\u7528Python\u7684\u6a21\u5757\u7cfb\u7edf\uff0c\u53ef\u4ee5\u5feb\u901f\u5bfc\u5165\u9700\u8981\u7684\u5e93\uff0c\u907f\u514d\u91cd\u590d\u7f16\u5199\u4ee3\u7801\u3002\u6700\u540e\uff0c\u5efa\u8bae\u5b9a\u671f\u4fdd\u5b58\u6709\u7528\u7684\u4ee3\u7801\u7247\u6bb5\uff0c\u4ee5\u4fbf\u4e0b\u6b21\u5feb\u901f\u8c03\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python shell\u7684\u4f7f\u7528\u65b9\u6cd5\u4e3b\u8981\u5305\u62ec\uff1a\u6253\u5f00Python\u89e3\u91ca\u5668\u3001\u76f4\u63a5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165Python\u4ee3\u7801\u3001\u5b9e\u65f6\u67e5 [&hellip;]","protected":false},"author":3,"featured_media":931496,"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\/931495"}],"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=931495"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/931495\/revisions"}],"predecessor-version":[{"id":931497,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/931495\/revisions\/931497"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/931496"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=931495"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=931495"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=931495"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}