{"id":979959,"date":"2024-12-27T06:50:40","date_gmt":"2024-12-26T22:50:40","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/979959.html"},"modified":"2024-12-27T06:50:42","modified_gmt":"2024-12-26T22:50:42","slug":"%e5%a6%82%e4%bd%95%e6%89%93%e5%bc%80python%e7%bc%96%e7%a8%8b%e7%8e%af%e5%a2%83","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/979959.html","title":{"rendered":"\u5982\u4f55\u6253\u5f00python\u7f16\u7a0b\u73af\u5883"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24205544\/d86e4bc1-c76a-4e1b-a488-afa1136eec58.webp\" alt=\"\u5982\u4f55\u6253\u5f00python\u7f16\u7a0b\u73af\u5883\" \/><\/p>\n<p><p> <strong>\u8981\u6253\u5f00Python\u7f16\u7a0b\u73af\u5883\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u3001\u6587\u672c\u7f16\u8f91\u5668\u3001\u547d\u4ee4\u884c\u6216\u5728\u7ebf\u7f16\u7a0b\u5e73\u53f0\u7b49\u65b9\u5f0f\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u60a8\u7684\u9700\u6c42\u548c\u504f\u597d\u3002<\/strong> \u9996\u5148\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u4e00\u4e2a\u9002\u5408\u7684IDE\u6216\u6587\u672c\u7f16\u8f91\u5668\uff0c\u5982PyCharm\u3001VSCode\u3001Jupyter Notebook\u7b49\uff0c\u5b83\u4eec\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\u548c\u63d2\u4ef6\u652f\u6301\uff0c\u975e\u5e38\u9002\u5408\u5f00\u53d1Python\u9879\u76ee\u3002\u5176\u6b21\uff0c\u901a\u8fc7\u547d\u4ee4\u884c\u4e5f\u662f\u4e00\u4e2a\u4e0d\u9519\u7684\u9009\u62e9\uff0c\u60a8\u53ef\u4ee5\u76f4\u63a5\u5728\u7ec8\u7aef\u8f93\u5165\u201cpython\u201d\u547d\u4ee4\u6765\u542f\u52a8Python\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u3002\u6700\u540e\uff0c\u5728\u7ebf\u5e73\u53f0\u5982Google Colab\u6216Repl.it\u4e5f\u662f\u5feb\u901f\u4e0a\u624bPython\u7f16\u7a0b\u7684\u597d\u9009\u62e9\u3002<\/p>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u662f\u8bb8\u591a\u5f00\u53d1\u8005\u7684\u9996\u9009\uff0c\u56e0\u4e3a\u5b83\u4eec\u63d0\u4f9b\u4e86\u5168\u9762\u7684\u5de5\u5177\u652f\u6301\u3002<strong>\u4ee5PyCharm\u4e3a\u4f8b<\/strong>\uff0c\u60a8\u53ef\u4ee5\u4eab\u53d7\u5230\u667a\u80fd\u4ee3\u7801\u8865\u5168\u3001\u8c03\u8bd5\u5de5\u5177\u3001\u7248\u672c\u63a7\u5236\u3001\u865a\u62df\u73af\u5883\u652f\u6301\u7b49\u529f\u80fd\uff0c\u8fd9\u4e9b\u90fd\u80fd\u591f\u6781\u5927\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002\u5b89\u88c5PyCharm\u540e\uff0c\u6253\u5f00\u8f6f\u4ef6\u5e76\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u9879\u76ee\uff0c\u60a8\u5c31\u53ef\u4ee5\u5f00\u59cb\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\u4e86\u3002PyCharm\u8fd8\u652f\u6301\u591a\u79cd\u63d2\u4ef6\uff0c\u53ef\u4ee5\u8fdb\u4e00\u6b65\u6269\u5c55\u5176\u529f\u80fd\uff0c\u6ee1\u8db3\u5404\u79cd\u7f16\u7a0b\u9700\u6c42\u3002<\/p>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8\u4f7f\u7528\u4e0d\u540c\u7684\u5de5\u5177\u548c\u65b9\u6cd5\u6765\u6253\u5f00Python\u7f16\u7a0b\u73af\u5883\u7684\u6b65\u9aa4\u548c\u6ce8\u610f\u4e8b\u9879\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09<\/h3>\n<\/p>\n<p><h4>PyCharm<\/h4>\n<\/p>\n<p><p>PyCharm\u662f\u7531JetBr<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>ns\u5f00\u53d1\u7684\u4e00\u6b3e\u5f3a\u5927\u7684Python IDE\uff0c\u6df1\u53d7\u4e13\u4e1a\u5f00\u53d1\u8005\u7684\u559c\u7231\u3002<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u5b89\u88c5PyCharm<\/strong>: \u9996\u5148\uff0c\u5728JetBrains\u5b98\u7f51\u4e0a\u4e0b\u8f7dPyCharm\u7684\u5b89\u88c5\u7a0b\u5e8f\uff0c\u6709\u793e\u533a\u7248\uff08\u514d\u8d39\uff09\u548c\u4e13\u4e1a\u7248\uff08\u4ed8\u8d39\uff09\u53ef\u9009\u3002\u793e\u533a\u7248\u5df2\u8db3\u591f\u5e94\u4ed8\u5927\u90e8\u5206Python\u5f00\u53d1\u9700\u6c42\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u521b\u5efa\u65b0\u9879\u76ee<\/strong>: \u6253\u5f00PyCharm\uff0c\u9009\u62e9\u201cCreate New Project\u201d\u3002\u9009\u62e9Python\u89e3\u91ca\u5668\u7248\u672c\uff0c\u5e76\u8bbe\u7f6e\u9879\u76ee\u8def\u5f84\u3002PyCharm\u4f1a\u81ea\u52a8\u521b\u5efa\u4e00\u4e2a\u865a\u62df\u73af\u5883\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199\u548c\u8fd0\u884c\u4ee3\u7801<\/strong>: \u5728\u9879\u76ee\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u6587\u4ef6\uff08\u5982<code>main.py<\/code>\uff09\uff0c\u7f16\u5199\u4ee3\u7801\u540e\uff0c\u70b9\u51fb\u8fd0\u884c\u6309\u94ae\u5373\u53ef\u6267\u884c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8c03\u8bd5\u4ee3\u7801<\/strong>: \u4f7f\u7528PyCharm\u7684\u8c03\u8bd5\u5de5\u5177\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u65ad\u70b9\uff0c\u9010\u6b65\u6267\u884c\u4ee3\u7801\uff0c\u67e5\u770b\u53d8\u91cf\u503c\uff0c\u5e2e\u52a9\u6392\u67e5\u95ee\u9898\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><h4>Visual Studio Code (VSCode)<\/h4>\n<\/p>\n<p><p>VSCode\u662f\u5fae\u8f6f\u63a8\u51fa\u7684\u8f7b\u91cf\u7ea7\u7f16\u8f91\u5668\uff0c\u51ed\u501f\u5176\u7075\u6d3b\u7684\u63d2\u4ef6\u7cfb\u7edf\u4e5f\u53ef\u4ee5\u6210\u4e3a\u4e00\u4e2a\u5f3a\u5927\u7684Python\u5f00\u53d1\u73af\u5883\u3002<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u5b89\u88c5VSCode<\/strong>: \u4eceVSCode\u5b98\u7f51\u4e0b\u8f7d\u5b89\u88c5\u5305\u5e76\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Python\u63d2\u4ef6<\/strong>: \u5728VSCode\u4e2d\u5b89\u88c5Python\u63d2\u4ef6\uff0c\u4ee5\u652f\u6301Python\u8bed\u6cd5\u9ad8\u4eae\u3001\u4ee3\u7801\u8865\u5168\u548c\u8c03\u8bd5\u529f\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6ePython\u73af\u5883<\/strong>: \u6253\u5f00\u547d\u4ee4\u9762\u677f\uff08Ctrl+Shift+P\uff09\uff0c\u8f93\u5165\u201cPython: Select Interpreter\u201d\u6765\u9009\u62e9Python\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199\u548c\u8fd0\u884c\u4ee3\u7801<\/strong>: \u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u6587\u4ef6\uff0c\u952e\u5165\u4ee3\u7801\uff0c\u4f7f\u7528\u7ec8\u7aef\u6216\u63d2\u4ef6\u5feb\u6377\u952e\u8fd0\u884c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><h3>\u4e8c\u3001\u6587\u672c\u7f16\u8f91\u5668<\/h3>\n<\/p>\n<p><h4>Sublime Text<\/h4>\n<\/p>\n<p><p>Sublime Text\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u6269\u5c55\u6027\u5f3a\u3002<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u5b89\u88c5Sublime Text<\/strong>: \u4e0b\u8f7dSublime Text\u5b89\u88c5\u5305\u5e76\u5b89\u88c5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5Package Control<\/strong>: \u901a\u8fc7Package Control\u5b89\u88c5\u201cAnaconda\u201d\u63d2\u4ef6\uff0c\u589e\u5f3aPython\u5f00\u53d1\u4f53\u9a8c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199\u4ee3\u7801<\/strong>: \u6253\u5f00\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\uff0c\u4fdd\u5b58\u4e3a<code>.py<\/code>\u683c\u5f0f\uff0c\u7f16\u5199Python\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884c\u4ee3\u7801<\/strong>: \u9700\u8981\u914d\u7f6e\u6784\u5efa\u7cfb\u7edf\u6216\u4f7f\u7528\u7ec8\u7aef\u6765\u8fd0\u884cPython\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><h4>Atom<\/h4>\n<\/p>\n<p><p>Atom\u662f\u7531GitHub\u5f00\u53d1\u7684\u5f00\u6e90\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u63d2\u4ef6\uff0c\u53ef\u4ee5\u81ea\u5b9a\u4e49\u4e3aPython\u5f00\u53d1\u73af\u5883\u3002<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u5b89\u88c5Atom<\/strong>: \u4eceAtom\u5b98\u7f51\u4e0b\u8f7d\u5b89\u88c5\u5305\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>Python\u63d2\u4ef6<\/strong>: \u5b89\u88c5\u201cide-python\u201d\u63d2\u4ef6\uff0c\u63d0\u4f9b\u4ee3\u7801\u8865\u5168\u3001\u9519\u8bef\u63d0\u793a\u7b49\u529f\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e\u73af\u5883<\/strong>: \u5728Atom\u4e2d\u8bbe\u7f6ePython\u7684\u89e3\u91ca\u5668\u8def\u5f84\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199\u548c\u8fd0\u884c\u4ee3\u7801<\/strong>: \u521b\u5efaPython\u6587\u4ef6\uff0c\u4f7f\u7528\u7ec8\u7aef\u6216\u63d2\u4ef6\u529f\u80fd\u8fd0\u884c\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><h3>\u4e09\u3001\u547d\u4ee4\u884c<\/h3>\n<\/p>\n<p><h4>Windows\u547d\u4ee4\u63d0\u793a\u7b26\u6216PowerShell<\/h4>\n<\/p>\n<ul>\n<li>\n<p><strong>\u5b89\u88c5Python<\/strong>: \u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5Python\uff0c\u786e\u4fdd\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26<\/strong>: \u4f7f\u7528Win+R\u5feb\u6377\u952e\uff0c\u8f93\u5165\u201ccmd\u201d\u6216\u201cpowershell\u201d\u6253\u5f00\u547d\u4ee4\u884c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884cPython<\/strong>: \u8f93\u5165<code>python<\/code>\u8fdb\u5165Python\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\uff0c\u53ef\u4ee5\u76f4\u63a5\u8f93\u5165Python\u4ee3\u7801\u8fdb\u884c\u6d4b\u8bd5\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6267\u884c\u811a\u672c\u6587\u4ef6<\/strong>: \u4f7f\u7528<code>python filename.py<\/code>\u547d\u4ee4\u8fd0\u884cPython\u811a\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><h4>macOS\u7ec8\u7aef<\/h4>\n<\/p>\n<ul>\n<li>\n<p><strong>\u5b89\u88c5Python<\/strong>: macOS\u81ea\u5e26Python\uff0c\u4f46\u5efa\u8bae\u4f7f\u7528<code>brew install python<\/code>\u5b89\u88c5\u6700\u65b0\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6253\u5f00\u7ec8\u7aef<\/strong>: \u4f7f\u7528Command+Space\u6253\u5f00Spotlight\uff0c\u8f93\u5165\u201cTerminal\u201d\u6253\u5f00\u7ec8\u7aef\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fd0\u884cPython<\/strong>: \u8f93\u5165<code>python3<\/code>\u8fdb\u5165Python\u4ea4\u4e92\u5f0f\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6267\u884c\u811a\u672c\u6587\u4ef6<\/strong>: \u4f7f\u7528<code>python3 filename.py<\/code>\u547d\u4ee4\u8fd0\u884cPython\u811a\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><h3>\u56db\u3001\u5728\u7ebf\u7f16\u7a0b\u5e73\u53f0<\/h3>\n<\/p>\n<p><h4>Google Colab<\/h4>\n<\/p>\n<p><p>Google Colab\u662f\u4e00\u4e2a\u57fa\u4e8e\u4e91\u7684Python\u7f16\u7a0b\u73af\u5883\uff0c\u7279\u522b\u9002\u5408\u6570\u636e\u79d1\u5b66\u548c<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u4efb\u52a1\u3002<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u4f7f\u7528Google\u8d26\u53f7\u767b\u5f55<\/strong>: \u6253\u5f00Google Colab\u7f51\u7ad9\uff0c\u4f7f\u7528Google\u8d26\u53f7\u767b\u5f55\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u521b\u5efa\u65b0\u7b14\u8bb0\u672c<\/strong>: \u70b9\u51fb\u201c\u65b0\u5efa\u7b14\u8bb0\u672c\u201d\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Colab\u7b14\u8bb0\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199\u548c\u8fd0\u884c\u4ee3\u7801<\/strong>: \u5728\u4ee3\u7801\u5355\u5143\u4e2d\u8f93\u5165Python\u4ee3\u7801\uff0c\u70b9\u51fb\u8fd0\u884c\u6309\u94ae\u6267\u884c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5229\u7528GPU<\/strong>: \u5728\u201c\u66f4\u6539\u8fd0\u884c\u65f6\u7c7b\u578b\u201d\u4e2d\u9009\u62e9GPU\uff0c\u4ee5\u52a0\u901f\u8ba1\u7b97\u4efb\u52a1\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><h4>Repl.it<\/h4>\n<\/p>\n<p><p>Repl.it\u662f\u4e00\u4e2a\u5728\u7ebf\u7f16\u7a0b\u5e73\u53f0\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u5305\u62ecPython\u3002<\/p>\n<\/p>\n<ul>\n<li>\n<p><strong>\u6ce8\u518c\u8d26\u53f7<\/strong>: \u5728Repl.it\u7f51\u7ad9\u6ce8\u518c\u5e76\u767b\u5f55\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u521b\u5efa\u65b0\u9879\u76ee<\/strong>: \u70b9\u51fb\u201cCreate Repl\u201d\uff0c\u9009\u62e9Python\u8bed\u8a00\uff0c\u521b\u5efa\u65b0\u9879\u76ee\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7f16\u5199\u548c\u8fd0\u884c\u4ee3\u7801<\/strong>: \u5728\u7f16\u8f91\u5668\u4e2d\u8f93\u5165Python\u4ee3\u7801\uff0c\u70b9\u51fb\u201cRun\u201d\u6309\u94ae\u6267\u884c\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u6253\u5f00Python\u7f16\u7a0b\u73af\u5883\u7684\u65b9\u5f0f\u591a\u79cd\u591a\u6837\uff0c\u6bcf\u79cd\u5de5\u5177\u90fd\u6709\u5176\u72ec\u7279\u7684\u4f18\u52bf\u548c\u9002\u7528\u573a\u666f\u3002\u9009\u62e9\u9002\u5408\u81ea\u5df1\u7684\u5de5\u5177\uff0c\u4e0d\u4ec5\u53ef\u4ee5\u63d0\u9ad8\u5de5\u4f5c\u6548\u7387\uff0c\u8fd8\u80fd\u63d0\u5347\u7f16\u7a0b\u4f53\u9a8c\u3002IDE\u5982PyCharm\u548cVSCode\u9002\u5408\u957f\u671f\u9879\u76ee\u5f00\u53d1\uff0c\u6587\u672c\u7f16\u8f91\u5668\u5982Sublime Text\u548cAtom\u9002\u5408\u8f7b\u91cf\u7ea7\u5f00\u53d1\uff0c\u547d\u4ee4\u884c\u9002\u5408\u5feb\u901f\u6d4b\u8bd5\u4ee3\u7801\uff0c\u5728\u7ebf\u5e73\u53f0\u5982Google Colab\u548cRepl.it\u5219\u9002\u5408\u968f\u65f6\u968f\u5730\u8fdb\u884c\u7f16\u7a0b\u7ec3\u4e60\u548c\u5206\u4eab\u3002\u5728\u5b9e\u9645\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u6839\u636e\u9879\u76ee\u9700\u6c42\u548c\u4e2a\u4eba\u4e60\u60ef\u7075\u6d3b\u9009\u62e9\u5408\u9002\u7684\u73af\u5883\uff0c\u624d\u80fd\u5145\u5206\u53d1\u6325Python\u8bed\u8a00\u7684\u5f3a\u5927\u529f\u80fd\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u9009\u62e9\u9002\u5408\u7684Python\u7f16\u7a0b\u73af\u5883\uff1f<\/strong><br \/>\u9009\u62e9Python\u7f16\u7a0b\u73af\u5883\u65f6\uff0c\u53ef\u4ee5\u8003\u8651\u591a\u79cd\u9009\u9879\uff0c\u5982IDLE\u3001PyCharm\u3001Visual Studio Code\u548cJupyter Notebook\u7b49\u3002IDLE\u662fPython\u81ea\u5e26\u7684\u7b80\u5355\u73af\u5883\uff0c\u9002\u5408\u521d\u5b66\u8005\uff1bPyCharm\u5219\u63d0\u4f9b\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u9002\u5408\u5927\u578b\u9879\u76ee\u5f00\u53d1\uff1b\u800cJupyter Notebook\u975e\u5e38\u9002\u5408\u6570\u636e\u79d1\u5b66\u548c\u673a\u5668\u5b66\u4e60\u9879\u76ee\uff0c\u56e0\u4e3a\u5b83\u5141\u8bb8\u9010\u6b65\u6267\u884c\u4ee3\u7801\u5e76\u53ef\u89c6\u5316\u7ed3\u679c\u3002\u6839\u636e\u4e2a\u4eba\u9700\u6c42\u548c\u9879\u76ee\u7c7b\u578b\u9009\u62e9\u6700\u5408\u9002\u7684\u73af\u5883\u3002<\/p>\n<p><strong>\u5728Windows\u548cMac\u4e0a\u5982\u4f55\u5b89\u88c5Python\u7f16\u7a0b\u73af\u5883\uff1f<\/strong><br \/>\u5728Windows\u4e0a\uff0c\u53ef\u4ee5\u8bbf\u95eePython\u5b98\u7f51\uff0c\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u7684\u5b89\u88c5\u5305\u3002\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u8981\u786e\u4fdd\u52fe\u9009\u201cAdd Python to PATH\u201d\u9009\u9879\u3002\u5bf9\u4e8eMac\u7528\u6237\uff0c\u53ef\u4ee5\u901a\u8fc7Homebrew\u8fdb\u884c\u5b89\u88c5\uff0c\u4f7f\u7528\u547d\u4ee4<code>brew install python<\/code>\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u901a\u8fc7\u547d\u4ee4\u884c\u6216\u7ec8\u7aef\u9a8c\u8bc1Python\u662f\u5426\u6210\u529f\u5b89\u88c5\uff0c\u8f93\u5165<code>python --version<\/code>\u6216<code>python3 --version<\/code>\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728Python\u73af\u5883\u4e2d\u5b89\u88c5\u7b2c\u4e09\u65b9\u5e93\uff1f<\/strong><br \/>\u5728Python\u73af\u5883\u4e2d\uff0c\u4f7f\u7528pip\u5de5\u5177\u53ef\u4ee5\u8f7b\u677e\u5b89\u88c5\u7b2c\u4e09\u65b9\u5e93\u3002\u6253\u5f00\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u8f93\u5165\u547d\u4ee4<code>pip install library_name<\/code>\uff08\u5c06<code>library_name<\/code>\u66ff\u6362\u4e3a\u60a8\u9700\u8981\u7684\u5e93\u540d\uff09\u3002\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662fPython 3\uff0c\u53ef\u80fd\u9700\u8981\u4f7f\u7528<code>pip3<\/code>\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5728Python\u811a\u672c\u4e2d\u5bfc\u5165\u8be5\u5e93\u5e76\u5f00\u59cb\u4f7f\u7528\u3002\u6b64\u5916\uff0c\u5efa\u8bae\u4f7f\u7528\u865a\u62df\u73af\u5883\uff08\u5982venv\u6216conda\uff09\u6765\u7ba1\u7406\u9879\u76ee\u7684\u4f9d\u8d56\uff0c\u4ee5\u907f\u514d\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u51b2\u7a81\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u6253\u5f00Python\u7f16\u7a0b\u73af\u5883\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u4f7f\u7528\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u3001\u6587\u672c\u7f16\u8f91\u5668\u3001\u547d\u4ee4\u884c\u6216\u5728\u7ebf\u7f16\u7a0b\u5e73\u53f0\u7b49\u65b9\u5f0f\uff0c\u5177\u4f53 [&hellip;]","protected":false},"author":3,"featured_media":979968,"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\/979959"}],"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=979959"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/979959\/revisions"}],"predecessor-version":[{"id":979970,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/979959\/revisions\/979970"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/979968"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=979959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=979959"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=979959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}