{"id":1127855,"date":"2025-01-08T20:14:27","date_gmt":"2025-01-08T12:14:27","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1127855.html"},"modified":"2025-01-08T20:14:27","modified_gmt":"2025-01-08T12:14:27","slug":"python8%e5%ae%89%e8%a3%85%e5%ae%8c%e6%88%90%e5%90%8e%e5%a6%82%e4%bd%95%e6%89%93%e5%bc%80-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1127855.html","title":{"rendered":"python8\u5b89\u88c5\u5b8c\u6210\u540e\u5982\u4f55\u6253\u5f00"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25094733\/a3a47ec2-a50f-4ab4-b60b-ff072d19db69.webp\" alt=\"python8\u5b89\u88c5\u5b8c\u6210\u540e\u5982\u4f55\u6253\u5f00\" \/><\/p>\n<p><p> <strong>\u5728Python 8\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00Python\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5982\u901a\u8fc7\u547d\u4ee4\u884c\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6216\u6587\u672c\u7f16\u8f91\u5668\u7b49\u3002\u8fd9\u4e9b\u65b9\u6cd5\u5305\u62ec\uff1a\u5728\u547d\u4ee4\u63d0\u793a\u7b26\uff08CMD\uff09\u6216\u7ec8\u7aef\u4e2d\u4f7f\u7528python\u547d\u4ee4\u3001\u901a\u8fc7IDLE\u6216\u5176\u4ed6IDE\u8fdb\u884c\u7f16\u7a0b\u3001\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u7f16\u5199\u5e76\u8fd0\u884cPython\u811a\u672c\u3002<\/strong>\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\u6253\u5f00Python\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u901a\u8fc7\u547d\u4ee4\u884c\u6216\u7ec8\u7aef<\/p>\n<\/p>\n<p><p>\u5728\u5927\u591a\u6570\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u547d\u4ee4\u884c\u6216\u7ec8\u7aef\u662f\u6253\u5f00\u548c\u8fd0\u884cPython\u7684\u6700\u76f4\u63a5\u65b9\u6cd5\u3002\u4ee5\u4e0b\u662f\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>Windows\u7cfb\u7edf<\/strong><\/li>\n<\/ol>\n<p><p>\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u63d0\u793a\u7b26\uff08CMD\uff09\u6765\u6253\u5f00Python\u3002<\/p>\n<\/p>\n<ul>\n<li>\u6309\u4e0b<code>Win + R<\/code>\u6253\u5f00\u8fd0\u884c\u7a97\u53e3\uff0c\u8f93\u5165<code>cmd<\/code>\uff0c\u7136\u540e\u6309\u4e0b\u56de\u8f66\u952e\uff0c\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u3002<\/li>\n<li>\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165<code>python<\/code>\uff0c\u5982\u679cPython\u5df2\u6b63\u786e\u5b89\u88c5\u548c\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u547d\u4ee4\u63d0\u793a\u7b26\u5c06\u8fdb\u5165Python\u4ea4\u4e92\u6a21\u5f0f\uff08REPL\uff09\uff0c\u663e\u793aPython\u7248\u672c\u548c\u63d0\u793a\u7b26<code>&gt;&gt;&gt;<\/code>\u3002<\/li>\n<\/ul>\n<p><p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u5f0f\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u4e2d\u8f93\u5165Python\u547d\u4ee4\u5e76\u67e5\u770b\u7ed3\u679c\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>MacOS\u7cfb\u7edf<\/strong><\/li>\n<\/ol>\n<p><p>\u5728MacOS\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u7ec8\u7aef\u6765\u6253\u5f00Python\u3002<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00<code>Finder<\/code>\uff0c\u5bfc\u822a\u5230<code>\u5e94\u7528\u7a0b\u5e8f<\/code> &gt; <code>\u5b9e\u7528\u5de5\u5177<\/code>\uff0c\u7136\u540e\u53cc\u51fb<code>\u7ec8\u7aef<\/code>\u3002<\/li>\n<li>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python3<\/code>\uff08\u6216\u8005<code>python<\/code>\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u4f60\u5b89\u88c5\u7684\u7248\u672c\uff09\uff0c\u5982\u679cPython\u5df2\u6b63\u786e\u5b89\u88c5\uff0c\u7ec8\u7aef\u5c06\u8fdb\u5165Python\u4ea4\u4e92\u6a21\u5f0f\uff0c\u663e\u793aPython\u7248\u672c\u548c\u63d0\u793a\u7b26<code>&gt;&gt;&gt;<\/code>\u3002<\/li>\n<\/ul>\n<ol start=\"3\">\n<li><strong>Linux\u7cfb\u7edf<\/strong><\/li>\n<\/ol>\n<p><p>\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u7ec8\u7aef\u6765\u6253\u5f00Python\u3002<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00\u7ec8\u7aef\uff0c\u53ef\u4ee5\u901a\u8fc7\u684c\u9762\u73af\u5883\u4e2d\u7684\u5e94\u7528\u7a0b\u5e8f\u83dc\u5355\u6216\u8005\u5feb\u6377\u952e\uff08\u901a\u5e38\u662f<code>Ctrl + Alt + T<\/code>\uff09\u3002<\/li>\n<li>\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python3<\/code>\uff08\u6216\u8005<code>python<\/code>\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u4f60\u5b89\u88c5\u7684\u7248\u672c\uff09\uff0c\u5982\u679cPython\u5df2\u6b63\u786e\u5b89\u88c5\uff0c\u7ec8\u7aef\u5c06\u8fdb\u5165Python\u4ea4\u4e92\u6a21\u5f0f\uff0c\u663e\u793aPython\u7248\u672c\u548c\u63d0\u793a\u7b26<code>&gt;&gt;&gt;<\/code>\u3002<\/li>\n<\/ul>\n<p><p>\u4e8c\u3001\u901a\u8fc7IDLE\u6216\u5176\u4ed6IDE<\/p>\n<\/p>\n<p><p>Python\u81ea\u5e26\u7684\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDLE\uff09\u662f\u4e00\u4e2a\u4fbf\u4e8e\u521d\u5b66\u8005\u4f7f\u7528\u7684\u5de5\u5177\uff0c\u540c\u65f6\u4e5f\u652f\u6301\u8bb8\u591a\u9ad8\u7ea7\u529f\u80fd\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>IDLE<\/strong><\/li>\n<\/ol>\n<p><p>IDLE\u662fPython\u81ea\u5e26\u7684IDE\uff0c\u5b89\u88c5Python\u65f6\u901a\u5e38\u4f1a\u81ea\u52a8\u5b89\u88c5IDLE\u3002<\/p>\n<\/p>\n<ul>\n<li>\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u5728\u5f00\u59cb\u83dc\u5355\u4e2d\u627e\u5230<code>IDLE\uff08Python 3.x\uff09<\/code>\uff0c\u70b9\u51fb\u5373\u53ef\u6253\u5f00\u3002<\/li>\n<li>\u5728MacOS\u548cLinux\u7cfb\u7edf\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u7ec8\u7aef\u8f93\u5165<code>idle3<\/code>\uff08\u5177\u4f53\u53d6\u51b3\u4e8e\u5b89\u88c5\u7684\u7248\u672c\uff09\u6765\u6253\u5f00IDLE\u3002<\/li>\n<\/ul>\n<p><p>IDLE\u63d0\u4f9b\u4e86\u4e00\u4e2a\u4ea4\u4e92\u5f0f\u7684\u7f16\u7a0b\u73af\u5883\uff0c\u652f\u6301\u8bed\u6cd5\u9ad8\u4eae\u3001\u81ea\u52a8\u8865\u5168\u548c\u8c03\u8bd5\u529f\u80fd\uff0c\u662f\u521d\u5b66\u8005\u5b66\u4e60Python\u7684\u7406\u60f3\u5de5\u5177\u3002<\/p>\n<\/p>\n<ol start=\"2\">\n<li><strong>\u5176\u4ed6IDE<\/strong><\/li>\n<\/ol>\n<p><p>\u9664\u4e86IDLE\uff0c\u8fd8\u6709\u8bb8\u591a\u6d41\u884c\u7684IDE\u652f\u6301Python\u7f16\u7a0b\uff0c\u5982PyCharm\u3001Visual Studio Code\u3001Jupyter Notebook\u7b49\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>PyCharm<\/strong>\uff1a\u4e0b\u8f7d\u5e76\u5b89\u88c5PyCharm\u540e\uff0c\u6253\u5f00PyCharm\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u9879\u76ee\uff0c\u7136\u540e\u5728\u9879\u76ee\u4e2d\u521b\u5efa\u4e00\u4e2aPython\u6587\u4ef6\uff08.py\uff09\u3002\u5728\u6587\u4ef6\u4e2d\u7f16\u5199Python\u4ee3\u7801\u5e76\u70b9\u51fb\u8fd0\u884c\u6309\u94ae\u5373\u53ef\u3002<\/li>\n<li><strong>Visual Studio Code<\/strong>\uff1a\u5b89\u88c5VS Code\u540e\uff0c\u5b89\u88c5Python\u6269\u5c55\uff0c\u6253\u5f00VS Code\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u6587\u4ef6\uff0c\u5728\u6587\u4ef6\u4e2d\u7f16\u5199Python\u4ee3\u7801\u5e76\u70b9\u51fb\u8fd0\u884c\u6309\u94ae\u5373\u53ef\u3002<\/li>\n<li><strong>Jupyter Notebook<\/strong>\uff1a\u5b89\u88c5Anaconda\u540e\uff0c\u6253\u5f00Anaconda Navigator\uff0c\u542f\u52a8Jupyter Notebook\uff0c\u5728\u6d4f\u89c8\u5668\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Notebook\uff0c\u7136\u540e\u5728\u5355\u5143\u683c\u4e2d\u7f16\u5199Python\u4ee3\u7801\u5e76\u6267\u884c\u3002<\/li>\n<\/ul>\n<p><p>\u4e09\u3001\u901a\u8fc7\u6587\u672c\u7f16\u8f91\u5668\u7f16\u5199\u5e76\u8fd0\u884cPython\u811a\u672c<\/p>\n<\/p>\n<p><p>\u9664\u4e86\u901a\u8fc7\u4ea4\u4e92\u5f0f\u73af\u5883\u8fd0\u884cPython\u4ee3\u7801\uff0c\u4f60\u8fd8\u53ef\u4ee5\u4f7f\u7528\u6587\u672c\u7f16\u8f91\u5668\u7f16\u5199Python\u811a\u672c\u5e76\u8fd0\u884c\u3002<\/p>\n<\/p>\n<ol>\n<li><strong>\u9009\u62e9\u6587\u672c\u7f16\u8f91\u5668<\/strong><\/li>\n<\/ol>\n<p><p>\u8bb8\u591a\u6587\u672c\u7f16\u8f91\u5668\u652f\u6301Python\u7f16\u7a0b\uff0c\u5982Sublime Text\u3001Atom\u3001Notepad++\u7b49\u3002<\/p>\n<\/p>\n<ul>\n<li><strong>Sublime Text<\/strong>\uff1a\u6253\u5f00Sublime Text\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\uff0c\u7f16\u5199Python\u4ee3\u7801\u5e76\u4fdd\u5b58\u4e3a<code>.py<\/code>\u6587\u4ef6\u3002\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\uff0c\u5bfc\u822a\u5230\u6587\u4ef6\u6240\u5728\u76ee\u5f55\uff0c\u8f93\u5165<code>python \u6587\u4ef6\u540d.py<\/code>\u8fd0\u884c\u811a\u672c\u3002<\/li>\n<li><strong>Atom<\/strong>\uff1a\u6253\u5f00Atom\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\uff0c\u7f16\u5199Python\u4ee3\u7801\u5e76\u4fdd\u5b58\u4e3a<code>.py<\/code>\u6587\u4ef6\u3002\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\uff0c\u5bfc\u822a\u5230\u6587\u4ef6\u6240\u5728\u76ee\u5f55\uff0c\u8f93\u5165<code>python \u6587\u4ef6\u540d.py<\/code>\u8fd0\u884c\u811a\u672c\u3002<\/li>\n<li><strong>Notepad++<\/strong>\uff1a\u6253\u5f00Notepad++\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\uff0c\u7f16\u5199Python\u4ee3\u7801\u5e76\u4fdd\u5b58\u4e3a<code>.py<\/code>\u6587\u4ef6\u3002\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\uff0c\u5bfc\u822a\u5230\u6587\u4ef6\u6240\u5728\u76ee\u5f55\uff0c\u8f93\u5165<code>python \u6587\u4ef6\u540d.py<\/code>\u8fd0\u884c\u811a\u672c\u3002<\/li>\n<\/ul>\n<p><p>\u901a\u8fc7\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u4f60\u53ef\u4ee5\u5728Python 8\u5b89\u88c5\u5b8c\u6210\u540e\u987a\u5229\u6253\u5f00\u548c\u8fd0\u884cPython\u4ee3\u7801\u3002\u65e0\u8bba\u662f\u901a\u8fc7\u547d\u4ee4\u884c\u3001IDLE\u3001\u5176\u4ed6IDE\u8fd8\u662f\u6587\u672c\u7f16\u8f91\u5668\uff0c\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u72ec\u7279\u7684\u4f18\u52bf\u548c\u9002\u7528\u573a\u666f\u3002\u6839\u636e\u4f60\u7684\u9700\u6c42\u548c\u4e60\u60ef\u9009\u62e9\u6700\u9002\u5408\u4f60\u7684\u65b9\u5f0f\u5373\u53ef\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u68c0\u67e5\u6211\u7684Python 8\u5b89\u88c5\u662f\u5426\u6210\u529f\uff1f<\/strong><br \/>\u53ef\u4ee5\u901a\u8fc7\u5728\u547d\u4ee4\u884c\u6216\u7ec8\u7aef\u4e2d\u8f93\u5165<code>python --version<\/code>\u6765\u68c0\u67e5Python 8\u662f\u5426\u6210\u529f\u5b89\u88c5\u3002\u5982\u679c\u5b89\u88c5\u6210\u529f\uff0c\u7cfb\u7edf\u4f1a\u663e\u793a\u5f53\u524d\u5b89\u88c5\u7684Python\u7248\u672c\u3002\u5982\u679c\u672a\u663e\u793a\u7248\u672c\u4fe1\u606f\uff0c\u53ef\u80fd\u9700\u8981\u68c0\u67e5\u5b89\u88c5\u8fc7\u7a0b\u662f\u5426\u6709\u9519\u8bef\u3002<\/p>\n<p><strong>\u5728Windows\u4e0a\u5982\u4f55\u6253\u5f00Python 8\uff1f<\/strong><br \/>\u5728Windows\u4e0a\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u6b65\u9aa4\u6253\u5f00Python 8\uff1a\u70b9\u51fb\u201c\u5f00\u59cb\u201d\u83dc\u5355\uff0c\u641c\u7d22\u201cPython 8\u201d\u5e76\u70b9\u51fb\u56fe\u6807\u542f\u52a8\u7a0b\u5e8f\u3002\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u8f93\u5165<code>python<\/code>\u5e76\u6309\u4e0bEnter\u952e\uff0c\u8fd9\u5c06\u542f\u52a8Python\u89e3\u91ca\u5668\u3002<\/p>\n<p><strong>\u6211\u53ef\u4ee5\u901a\u8fc7\u54ea\u4e9bIDE\u6216\u6587\u672c\u7f16\u8f91\u5668\u4f7f\u7528Python 8\uff1f<\/strong><br \/>Python 8\u53ef\u4ee5\u4e0e\u591a\u79cd\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u548c\u6587\u672c\u7f16\u8f91\u5668\u517c\u5bb9\u3002\u4f8b\u5982\uff0cPyCharm\u3001Visual Studio Code\u548cJupyter Notebook\u90fd\u662f\u6d41\u884c\u7684\u9009\u62e9\u3002\u9009\u62e9\u9002\u5408\u81ea\u5df1\u9700\u6c42\u7684IDE\u53ef\u4ee5\u63d0\u9ad8\u7f16\u7a0b\u6548\u7387\uff0c\u5e76\u63d0\u4f9b\u66f4\u597d\u7684\u4ee3\u7801\u7ba1\u7406\u548c\u8c03\u8bd5\u529f\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python 8\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6253\u5f00Python\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5982\u901a\u8fc7\u547d\u4ee4\u884c\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u6216\u6587\u672c\u7f16\u8f91\u5668\u7b49 [&hellip;]","protected":false},"author":3,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1127855"}],"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=1127855"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1127855\/revisions"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1127855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1127855"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1127855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}