{"id":1177800,"date":"2025-01-15T18:02:27","date_gmt":"2025-01-15T10:02:27","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1177800.html"},"modified":"2025-01-15T18:02:30","modified_gmt":"2025-01-15T10:02:30","slug":"python3-5-4%e5%a6%82%e4%bd%95%e8%bf%90%e8%a1%8c%e4%bb%a3%e7%a0%81","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1177800.html","title":{"rendered":"python3.5.4\u5982\u4f55\u8fd0\u884c\u4ee3\u7801"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25112609\/8f934d4d-a76d-4d93-bd81-86ef8845733a.webp\" alt=\"python3.5.4\u5982\u4f55\u8fd0\u884c\u4ee3\u7801\" \/><\/p>\n<p><p> <strong>\u8981\u5728Python 3.5.4\u4e2d\u8fd0\u884c\u4ee3\u7801\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528Python\u89e3\u91ca\u5668\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u3001\u6587\u672c\u7f16\u8f91\u5668\u3001\u547d\u4ee4\u884c\u7ec8\u7aef\u7b49\u65b9\u5f0f\u3002<\/strong> \u5728\u8fd9\u4e9b\u65b9\u5f0f\u4e2d\uff0c\u6700\u5e38\u89c1\u7684\u8fd8\u662f\u901a\u8fc7\u547d\u4ee4\u884c\u7ec8\u7aef\u4ee5\u53caIDE\u6765\u8fd0\u884cPython\u4ee3\u7801\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9\u4e9b\u65b9\u5f0f\u7684\u4f7f\u7528\u65b9\u6cd5\u548c\u6ce8\u610f\u4e8b\u9879\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u547d\u4ee4\u884c\u7ec8\u7aef<\/p>\n<\/p>\n<p><p>1\u3001Windows\u64cd\u4f5c\u7cfb\u7edf<\/p>\n<\/p>\n<p><p>\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4\u884c\u7ec8\u7aef\uff08Command Prompt\uff09\u6765\u8fd0\u884cPython\u4ee3\u7801\u3002\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684\u7cfb\u7edf\u4e2d\u5df2\u7ecf\u5b89\u88c5\u4e86Python 3.5.4\uff0c\u5e76\u4e14\u5df2\u7ecf\u5c06Python\u7684\u5b89\u88c5\u8def\u5f84\u6dfb\u52a0\u5230\u4e86\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00\u547d\u4ee4\u884c\u7ec8\u7aef\uff1a\u6309\u4e0b\u952e\u76d8\u4e0a\u7684\u201cWindows\u952e + R\u201d\uff0c\u7136\u540e\u8f93\u5165\u201ccmd\u201d\uff0c\u6309\u4e0b\u56de\u8f66\u952e\u3002<\/li>\n<li>\u8fdb\u5165Python\u6587\u4ef6\u6240\u5728\u7684\u76ee\u5f55\uff1a\u5728\u547d\u4ee4\u884c\u7ec8\u7aef\u4e2d\u4f7f\u7528\u201ccd\u201d\u547d\u4ee4\u8fdb\u5165\u4fdd\u5b58Python\u811a\u672c\u7684\u76ee\u5f55\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u7684Python\u811a\u672c\u4fdd\u5b58\u5728\u201cC:\\Users\\YourName\\Documents\\PythonScripts\u201d\u76ee\u5f55\u4e2d\uff0c\u53ef\u4ee5\u8f93\u5165\uff1a\n<pre><code class=\"language-shell\">cd C:\\Users\\YourName\\Documents\\PythonScripts<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u8fd0\u884cPython\u811a\u672c\uff1a\u5728\u547d\u4ee4\u884c\u7ec8\u7aef\u4e2d\u8f93\u5165\u201cpython script_name.py\u201d\u5e76\u6309\u4e0b\u56de\u8f66\u952e\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u7684Python\u811a\u672c\u540d\u4e3a\u201cexample.py\u201d\uff0c\u53ef\u4ee5\u8f93\u5165\uff1a\n<pre><code class=\"language-shell\">python example.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>2\u3001macOS\u548cLinux\u64cd\u4f5c\u7cfb\u7edf<\/p>\n<\/p>\n<p><p>\u5728macOS\u548cLinux\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u7ec8\u7aef\uff08Terminal\uff09\u6765\u8fd0\u884cPython\u4ee3\u7801\u3002\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u7684\u7cfb\u7edf\u4e2d\u5df2\u7ecf\u5b89\u88c5\u4e86Python 3.5.4\uff0c\u5e76\u4e14\u4f60\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8bbf\u95eePython\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00\u7ec8\u7aef\uff1a\u5728macOS\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u6309\u4e0b\u201cCommand + Space\u201d\u952e\uff0c\u7136\u540e\u8f93\u5165\u201cTerminal\u201d\u5e76\u6309\u4e0b\u56de\u8f66\u952e\u6765\u6253\u5f00\u7ec8\u7aef\u3002\u5728Linux\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u6309\u4e0b\u201cCtrl + Alt + T\u201d\u952e\u6765\u6253\u5f00\u7ec8\u7aef\u3002<\/li>\n<li>\u8fdb\u5165Python\u6587\u4ef6\u6240\u5728\u7684\u76ee\u5f55\uff1a\u5728\u7ec8\u7aef\u4e2d\u4f7f\u7528\u201ccd\u201d\u547d\u4ee4\u8fdb\u5165\u4fdd\u5b58Python\u811a\u672c\u7684\u76ee\u5f55\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u7684Python\u811a\u672c\u4fdd\u5b58\u5728\u201c\/home\/yourname\/Documents\/PythonScripts\u201d\u76ee\u5f55\u4e2d\uff0c\u53ef\u4ee5\u8f93\u5165\uff1a\n<pre><code class=\"language-shell\">cd \/home\/yourname\/Documents\/PythonScripts<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\u8fd0\u884cPython\u811a\u672c\uff1a\u5728\u7ec8\u7aef\u4e2d\u8f93\u5165\u201cpython3 script_name.py\u201d\u5e76\u6309\u4e0b\u56de\u8f66\u952e\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u7684Python\u811a\u672c\u540d\u4e3a\u201cexample.py\u201d\uff0c\u53ef\u4ee5\u8f93\u5165\uff1a\n<pre><code class=\"language-shell\">python3 example.py<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>\u4e8c\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09<\/p>\n<\/p>\n<p><p>1\u3001PyCharm<\/p>\n<\/p>\n<p><p>PyCharm\u662f\u4e00\u4e2a\u6d41\u884c\u7684Python\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff0c\u652f\u6301Python 3.5.4\u3002\u4f7f\u7528PyCharm\u8fd0\u884cPython\u4ee3\u7801\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5b89\u88c5\u5e76\u6253\u5f00PyCharm\uff1a\u4ece\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5PyCharm\uff0c\u7136\u540e\u6253\u5f00\u5b83\u3002<\/li>\n<li>\u521b\u5efa\u6216\u6253\u5f00\u4e00\u4e2a\u9879\u76ee\uff1a\u5728PyCharm\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee\u6216\u6253\u5f00\u4e00\u4e2a\u73b0\u6709\u7684\u9879\u76ee\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2aPython\u811a\u672c\uff1a\u5728\u9879\u76ee\u6587\u4ef6\u5939\u4e2d\u53f3\u952e\u70b9\u51fb\u201cNew\u201d\uff0c\u9009\u62e9\u201cPython File\u201d\uff0c\u7136\u540e\u8f93\u5165\u811a\u672c\u7684\u540d\u79f0\u3002<\/li>\n<li>\u7f16\u5199\u4ee3\u7801\u5e76\u8fd0\u884c\uff1a\u5728\u7f16\u8f91\u5668\u4e2d\u7f16\u5199Python\u4ee3\u7801\uff0c\u7136\u540e\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u7eff\u8272\u8fd0\u884c\u6309\u94ae\uff0c\u6216\u8005\u6309\u4e0b\u201cShift + F10\u201d\u952e\u6765\u8fd0\u884c\u811a\u672c\u3002<\/li>\n<\/ul>\n<p><p>2\u3001Visual Studio Code<\/p>\n<\/p>\n<p><p>Visual Studio Code\u662f\u4e00\u4e2a\u6d41\u884c\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u5305\u62ecPython\u3002\u4f7f\u7528Visual Studio Code\u8fd0\u884cPython\u4ee3\u7801\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5b89\u88c5\u5e76\u6253\u5f00Visual Studio Code\uff1a\u4ece\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5Visual Studio Code\uff0c\u7136\u540e\u6253\u5f00\u5b83\u3002<\/li>\n<li>\u5b89\u88c5Python\u6269\u5c55\uff1a\u5728Visual Studio Code\u7684\u6269\u5c55\u5e02\u573a\u4e2d\u641c\u7d22\u201cPython\u201d\uff0c\u7136\u540e\u5b89\u88c5\u7531Microsoft\u63d0\u4f9b\u7684Python\u6269\u5c55\u3002<\/li>\n<li>\u6253\u5f00\u6216\u521b\u5efa\u4e00\u4e2aPython\u6587\u4ef6\uff1a\u5728Visual Studio Code\u4e2d\u6253\u5f00\u4e00\u4e2a\u73b0\u6709\u7684Python\u6587\u4ef6\uff0c\u6216\u8005\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u6587\u4ef6\u3002<\/li>\n<li>\u8fd0\u884cPython\u4ee3\u7801\uff1a\u5728\u7f16\u8f91\u5668\u4e2d\u7f16\u5199Python\u4ee3\u7801\uff0c\u7136\u540e\u53f3\u952e\u70b9\u51fb\u7f16\u8f91\u5668\u4e2d\u7684\u4ee3\u7801\uff0c\u9009\u62e9\u201cRun Python File in Terminal\u201d\uff0c\u6216\u8005\u6309\u4e0b\u201cF5\u201d\u952e\u6765\u8fd0\u884c\u811a\u672c\u3002<\/li>\n<\/ul>\n<p><p>\u4e09\u3001\u6587\u672c\u7f16\u8f91\u5668<\/p>\n<\/p>\n<p><p>1\u3001Sublime Text<\/p>\n<\/p>\n<p><p>Sublime Text\u662f\u4e00\u4e2a\u6d41\u884c\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u652f\u6301Python\u4ee3\u7801\u7684\u7f16\u5199\u548c\u8fd0\u884c\u3002\u4f7f\u7528Sublime Text\u8fd0\u884cPython\u4ee3\u7801\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5b89\u88c5\u5e76\u6253\u5f00Sublime Text\uff1a\u4ece\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5Sublime Text\uff0c\u7136\u540e\u6253\u5f00\u5b83\u3002<\/li>\n<li>\u5b89\u88c5Python\u63d2\u4ef6\uff1a\u5728Sublime Text\u7684\u83dc\u5355\u680f\u4e2d\u9009\u62e9\u201cTools\u201d\uff0c\u7136\u540e\u9009\u62e9\u201cInstall Package Control\u201d\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u6309\u4e0b\u201cCtrl + Shift + P\u201d\u6253\u5f00\u547d\u4ee4\u9762\u677f\uff0c\u8f93\u5165\u201cInstall Package\u201d\uff0c\u6309\u4e0b\u56de\u8f66\u952e\uff0c\u7136\u540e\u641c\u7d22\u5e76\u5b89\u88c5\u201cAnaconda\u201d\u63d2\u4ef6\u3002<\/li>\n<li>\u7f16\u5199\u4ee3\u7801\u5e76\u8fd0\u884c\uff1a\u5728Sublime Text\u4e2d\u6253\u5f00\u4e00\u4e2aPython\u6587\u4ef6\uff0c\u6216\u8005\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u6587\u4ef6\u3002\u5728\u7f16\u8f91\u5668\u4e2d\u7f16\u5199Python\u4ee3\u7801\uff0c\u7136\u540e\u6309\u4e0b\u201cCtrl + B\u201d\u952e\u6765\u8fd0\u884c\u811a\u672c\u3002<\/li>\n<\/ul>\n<p><p>2\u3001Atom<\/p>\n<\/p>\n<p><p>Atom\u662f\u4e00\u4e2a\u5f00\u6e90\u7684\u6587\u672c\u7f16\u8f91\u5668\uff0c\u652f\u6301Python\u4ee3\u7801\u7684\u7f16\u5199\u548c\u8fd0\u884c\u3002\u4f7f\u7528Atom\u8fd0\u884cPython\u4ee3\u7801\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u5b89\u88c5\u5e76\u6253\u5f00Atom\uff1a\u4ece\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5Atom\uff0c\u7136\u540e\u6253\u5f00\u5b83\u3002<\/li>\n<li>\u5b89\u88c5Python\u63d2\u4ef6\uff1a\u5728Atom\u7684\u83dc\u5355\u680f\u4e2d\u9009\u62e9\u201cFile\u201d\uff0c\u7136\u540e\u9009\u62e9\u201cSettings\u201d\u3002\u5728\u8bbe\u7f6e\u7a97\u53e3\u4e2d\u9009\u62e9\u201cInstall\u201d\uff0c\u641c\u7d22\u5e76\u5b89\u88c5\u201cscript\u201d\u63d2\u4ef6\u3002<\/li>\n<li>\u7f16\u5199\u4ee3\u7801\u5e76\u8fd0\u884c\uff1a\u5728Atom\u4e2d\u6253\u5f00\u4e00\u4e2aPython\u6587\u4ef6\uff0c\u6216\u8005\u521b\u5efa\u4e00\u4e2a\u65b0\u7684Python\u6587\u4ef6\u3002\u5728\u7f16\u8f91\u5668\u4e2d\u7f16\u5199Python\u4ee3\u7801\uff0c\u7136\u540e\u6309\u4e0b\u201cCtrl + Shift + B\u201d\u952e\u6765\u8fd0\u884c\u811a\u672c\u3002<\/li>\n<\/ul>\n<p><p>\u56db\u3001\u5728\u7ebf\u7f16\u8bd1\u5668<\/p>\n<\/p>\n<p><p>1\u3001Repl.it<\/p>\n<\/p>\n<p><p>Repl.it\u662f\u4e00\u4e2a\u6d41\u884c\u7684\u5728\u7ebf\u7f16\u7a0b\u5e73\u53f0\uff0c\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u5305\u62ecPython\u3002\u4f7f\u7528Repl.it\u8fd0\u884cPython\u4ee3\u7801\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00Repl.it\u7f51\u7ad9\uff1a\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00Repl.it\u5b98\u65b9\u7f51\u7ad9\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee\uff1a\u5728Repl.it\u4e2d\u70b9\u51fb\u201cNew Repl\u201d\uff0c\u9009\u62e9\u201cPython\u201d\uff0c\u7136\u540e\u70b9\u51fb\u201cCreate Repl\u201d\u3002<\/li>\n<li>\u7f16\u5199\u4ee3\u7801\u5e76\u8fd0\u884c\uff1a\u5728\u7f16\u8f91\u5668\u4e2d\u7f16\u5199Python\u4ee3\u7801\uff0c\u7136\u540e\u70b9\u51fb\u53f3\u4e0a\u89d2\u7684\u7eff\u8272\u8fd0\u884c\u6309\u94ae\u6765\u8fd0\u884c\u811a\u672c\u3002<\/li>\n<\/ul>\n<p><p>2\u3001Google Colab<\/p>\n<\/p>\n<p><p>Google Colab\u662f\u4e00\u4e2a\u5728\u7ebf\u7684Jupyter Notebook\u73af\u5883\uff0c\u652f\u6301Python\u4ee3\u7801\u7684\u7f16\u5199\u548c\u8fd0\u884c\u3002\u4f7f\u7528Google Colab\u8fd0\u884cPython\u4ee3\u7801\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00Google Colab\u7f51\u7ad9\uff1a\u5728\u6d4f\u89c8\u5668\u4e2d\u6253\u5f00Google Colab\u5b98\u65b9\u7f51\u7ad9\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2a\u65b0\u7b14\u8bb0\u672c\uff1a\u5728Google Colab\u4e2d\u70b9\u51fb\u201cFile\u201d\uff0c\u7136\u540e\u9009\u62e9\u201cNew Notebook\u201d\u3002<\/li>\n<li>\u7f16\u5199\u4ee3\u7801\u5e76\u8fd0\u884c\uff1a\u5728\u4ee3\u7801\u5355\u5143\u683c\u4e2d\u7f16\u5199Python\u4ee3\u7801\uff0c\u7136\u540e\u70b9\u51fb\u5355\u5143\u683c\u5de6\u4fa7\u7684\u8fd0\u884c\u6309\u94ae\u6765\u8fd0\u884c\u811a\u672c\u3002<\/li>\n<\/ul>\n<p><p>\u4e94\u3001\u8fd0\u884cPython 3.5.4\u4ee3\u7801\u7684\u6ce8\u610f\u4e8b\u9879<\/p>\n<\/p>\n<p><p>1\u3001\u517c\u5bb9\u6027\u95ee\u9898<\/p>\n<\/p>\n<p><p>Python 3.5.4\u5df2\u7ecf\u4e0d\u518d\u662f\u6700\u65b0\u7248\u672c\uff0c\u56e0\u6b64\u67d0\u4e9b\u7b2c\u4e09\u65b9\u5e93\u53ef\u80fd\u4e0d\u518d\u652f\u6301\u8be5\u7248\u672c\u3002\u5728\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u5e93\u7684\u517c\u5bb9\u6027\u95ee\u9898\u3002\u5982\u679c\u9047\u5230\u517c\u5bb9\u6027\u95ee\u9898\uff0c\u53ef\u4ee5\u8003\u8651\u5347\u7ea7\u5230\u66f4\u65b0\u7684Python\u7248\u672c\u3002<\/p>\n<\/p>\n<p><p>2\u3001\u865a\u62df\u73af\u5883<\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u907f\u514d\u5e93\u7684\u517c\u5bb9\u6027\u95ee\u9898\u548c\u4f9d\u8d56\u51b2\u7a81\uff0c\u5efa\u8bae\u5728\u9879\u76ee\u4e2d\u4f7f\u7528\u865a\u62df\u73af\u5883\u3002\u865a\u62df\u73af\u5883\u53ef\u4ee5\u9694\u79bb\u9879\u76ee\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u4f7f\u4e0d\u540c\u9879\u76ee\u4e4b\u95f4\u7684\u5e93\u7248\u672c\u4e0d\u4f1a\u4e92\u76f8\u5e72\u6270\u3002\u521b\u5efa\u548c\u4f7f\u7528\u865a\u62df\u73af\u5883\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p>\u521b\u5efa\u865a\u62df\u73af\u5883\uff1a\u5728\u547d\u4ee4\u884c\u7ec8\u7aef\u4e2d\u8fdb\u5165\u9879\u76ee\u76ee\u5f55\uff0c\u7136\u540e\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u521b\u5efa\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">python -m venv venv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5176\u4e2d\uff0c\u201cvenv\u201d\u662f\u865a\u62df\u73af\u5883\u7684\u540d\u79f0\uff0c\u53ef\u4ee5\u6839\u636e\u9700\u8981\u8fdb\u884c\u4fee\u6539\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff1a\u5728\u547d\u4ee4\u884c\u7ec8\u7aef\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u6fc0\u6d3b\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<ul>\n<li>Windows\u64cd\u4f5c\u7cfb\u7edf\uff1a\n<pre><code class=\"language-shell\">venv\\Scripts\\activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>macOS\u548cLinux\u64cd\u4f5c\u7cfb\u7edf\uff1a\n<pre><code class=\"language-shell\">source venv\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u5b89\u88c5\u4f9d\u8d56\u5e93\uff1a\u5728\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u201cpip\u201d\u547d\u4ee4\u6765\u5b89\u88c5\u9879\u76ee\u6240\u9700\u7684\u4f9d\u8d56\u5e93\u3002\u4f8b\u5982\uff0c\u5b89\u88c5requests\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">pip install requests<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u8fd0\u884cPython\u4ee3\u7801\uff1a\u5728\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u540e\uff0c\u53ef\u4ee5\u6309\u7167\u524d\u9762\u4ecb\u7ecd\u7684\u65b9\u6cd5\u8fd0\u884cPython\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u9000\u51fa\u865a\u62df\u73af\u5883\uff1a\u5728\u5b8c\u6210\u9879\u76ee\u5f00\u53d1\u540e\uff0c\u53ef\u4ee5\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u6765\u9000\u51fa\u865a\u62df\u73af\u5883\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-shell\">deactivate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>3\u3001\u8c03\u8bd5\u4ee3\u7801<\/p>\n<\/p>\n<p><p>\u5728\u7f16\u5199\u548c\u8fd0\u884cPython\u4ee3\u7801\u65f6\uff0c\u96be\u514d\u4f1a\u9047\u5230\u9519\u8bef\u548c\u95ee\u9898\u3002\u4e3a\u4e86\u66f4\u597d\u5730\u8c03\u8bd5\u4ee3\u7801\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u51e0\u79cd\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p>\u4f7f\u7528print\u8bed\u53e5\uff1a\u5728\u4ee3\u7801\u4e2d\u63d2\u5165print\u8bed\u53e5\uff0c\u8f93\u51fa\u53d8\u91cf\u7684\u503c\u548c\u72b6\u6001\uff0c\u5e2e\u52a9\u5b9a\u4f4d\u95ee\u9898\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">x = 10<\/p>\n<p>print(&quot;x =&quot;, x)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u8c03\u8bd5\u5668\uff1a\u5927\u591a\u6570IDE\u548c\u6587\u672c\u7f16\u8f91\u5668\u90fd\u5185\u7f6e\u4e86\u8c03\u8bd5\u5668\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u65ad\u70b9\u3001\u5355\u6b65\u6267\u884c\u4ee3\u7801\u3001\u67e5\u770b\u53d8\u91cf\u503c\u7b49\u3002\u4f7f\u7528\u8c03\u8bd5\u5668\u53ef\u4ee5\u66f4\u65b9\u4fbf\u5730\u6392\u67e5\u95ee\u9898\u3002\u4f8b\u5982\uff0c\u5728PyCharm\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u70b9\u51fb\u4ee3\u7801\u884c\u53f7\u5de6\u4fa7\u7684\u7a7a\u767d\u533a\u57df\u6765\u8bbe\u7f6e\u65ad\u70b9\uff0c\u7136\u540e\u70b9\u51fb\u8c03\u8bd5\u6309\u94ae\uff08\u7c7b\u4f3c\u4e8e\u64ad\u653e\u6309\u94ae\u7684\u56fe\u6807\uff09\u6765\u542f\u52a8\u8c03\u8bd5\u6a21\u5f0f\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u67e5\u770b\u9519\u8bef\u4fe1\u606f\uff1a\u5f53\u4ee3\u7801\u8fd0\u884c\u51fa\u9519\u65f6\uff0cPython\u89e3\u91ca\u5668\u4f1a\u8f93\u51fa\u9519\u8bef\u4fe1\u606f\u3002\u4ed4\u7ec6\u9605\u8bfb\u9519\u8bef\u4fe1\u606f\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5b9a\u4f4d\u95ee\u9898\u6240\u5728\u3002\u4f8b\u5982\uff0c\u5982\u679c\u9047\u5230\u201cNameError: name &#39;x&#39; is not defined\u201d\u9519\u8bef\uff0c\u53ef\u4ee5\u68c0\u67e5\u4ee3\u7801\u4e2d\u662f\u5426\u5b58\u5728\u672a\u5b9a\u4e49\u7684\u53d8\u91cf\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>\u516d\u3001Python 3.5.4\u7684\u7279\u70b9\u548c\u4f7f\u7528\u6280\u5de7<\/p>\n<\/p>\n<p><p>1\u3001Python 3.5.4\u7684\u65b0\u7279\u6027<\/p>\n<\/p>\n<p><p>Python 3.5.4\u76f8\u8f83\u4e8e\u4e4b\u524d\u7684\u7248\u672c\uff0c\u5f15\u5165\u4e86\u4e00\u4e9b\u65b0\u7279\u6027\u548c\u6539\u8fdb\uff0c\u5176\u4e2d\u4e00\u4e9b\u91cd\u8981\u7684\u65b0\u7279\u6027\u5305\u62ec\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p>\u5f02\u6b65\u7f16\u7a0b\uff1aPython 3.5.4\u5f15\u5165\u4e86\u201casync\u201d\u548c\u201caw<a href=\"https:\/\/docs.pingcode.com\/blog\/59162.html\" target=\"_blank\">AI<\/a>t\u201d\u5173\u952e\u5b57\uff0c\u652f\u6301\u5f02\u6b65\u7f16\u7a0b\u3002\u8fd9\u4e9b\u5173\u952e\u5b57\u53ef\u4ee5\u7528\u4e8e\u5b9a\u4e49\u5f02\u6b65\u51fd\u6570\u548c\u7b49\u5f85\u5f02\u6b65\u64cd\u4f5c\u7684\u5b8c\u6210\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import asyncio<\/p>\n<p>async def async_function():<\/p>\n<p>    await asyncio.sleep(1)<\/p>\n<p>    return &quot;Hello, Async!&quot;<\/p>\n<p>loop = asyncio.get_event_loop()<\/p>\n<p>result = loop.run_until_complete(async_function())<\/p>\n<p>print(result)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u7c7b\u578b\u63d0\u793a\uff1aPython 3.5.4\u5f15\u5165\u4e86\u7c7b\u578b\u63d0\u793a\uff0c\u53ef\u4ee5\u5728\u51fd\u6570\u5b9a\u4e49\u4e2d\u4f7f\u7528\u201c-&gt;\u201d\u548c\u201c:\u201d\u8bed\u6cd5\u6765\u6307\u5b9a\u53c2\u6570\u548c\u8fd4\u56de\u503c\u7684\u7c7b\u578b\u3002\u8fd9\u6709\u52a9\u4e8e\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u53ef\u7ef4\u62a4\u6027\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def add(a: int, b: int) -&gt; int:<\/p>\n<p>    return a + b<\/p>\n<p>result = add(1, 2)<\/p>\n<p>print(result)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u89e3\u5305\u64cd\u4f5c\uff1aPython 3.5.4\u589e\u5f3a\u4e86\u89e3\u5305\u64cd\u4f5c\uff0c\u5141\u8bb8\u5728\u5217\u8868\u3001\u5143\u7ec4\u3001\u5b57\u5178\u7b49\u6570\u636e\u7ed3\u6784\u4e2d\u4f7f\u7528\u89e3\u5305\u64cd\u4f5c\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">a, b, *c = [1, 2, 3, 4, 5]<\/p>\n<p>print(a, b, c)  # \u8f93\u51fa\uff1a1 2 [3, 4, 5]<\/p>\n<p>d = {&#39;x&#39;: 1, &#39;y&#39;: 2}<\/p>\n<p>e = {&#39;z&#39;: 3, d}<\/p>\n<p>print(e)  # \u8f93\u51fa\uff1a{&#39;z&#39;: 3, &#39;x&#39;: 1, &#39;y&#39;: 2}<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>2\u3001\u4f7f\u7528\u6280\u5de7<\/p>\n<\/p>\n<p><p>\u5728\u4f7f\u7528Python 3.5.4\u7f16\u5199\u548c\u8fd0\u884c\u4ee3\u7801\u65f6\uff0c\u53ef\u4ee5\u53c2\u8003\u4ee5\u4e0b\u4e00\u4e9b\u4f7f\u7528\u6280\u5de7\uff0c\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u8d28\u91cf\u548c\u5f00\u53d1\u6548\u7387\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p>\u9075\u5faaPEP 8\u89c4\u8303\uff1aPEP 8\u662fPython\u7684\u7f16\u7801\u98ce\u683c\u6307\u5357\uff0c\u5efa\u8bae\u5728\u7f16\u5199\u4ee3\u7801\u65f6\u9075\u5faaPEP 8\u89c4\u8303\uff0c\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u4e00\u81f4\u6027\u3002\u53ef\u4ee5\u4f7f\u7528\u4ee3\u7801\u68c0\u67e5\u5de5\u5177\uff08\u5982pylint\u3001flake8\uff09\u6765\u68c0\u67e5\u4ee3\u7801\u662f\u5426\u7b26\u5408PEP 8\u89c4\u8303\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\uff1a\u4e0a\u4e0b\u6587\u7ba1\u7406\u5668\u53ef\u4ee5\u7b80\u5316\u8d44\u6e90\u7684\u7ba1\u7406\uff0c\u4f8b\u5982\u6587\u4ef6\u7684\u6253\u5f00\u548c\u5173\u95ed\u3002\u4f7f\u7528\u201cwith\u201d\u8bed\u53e5\u53ef\u4ee5\u81ea\u52a8\u5904\u7406\u8d44\u6e90\u7684\u91ca\u653e\uff0c\u907f\u514d\u8d44\u6e90\u6cc4\u6f0f\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">with open(&#39;example.txt&#39;, &#39;r&#39;) as file:<\/p>\n<p>    content = file.read()<\/p>\n<p>    print(content)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u5217\u8868\u63a8\u5bfc\u5f0f\uff1a\u5217\u8868\u63a8\u5bfc\u5f0f\u662f\u4e00\u79cd\u7b80\u6d01\u7684\u521b\u5efa\u5217\u8868\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u8bfb\u6027\u548c\u6548\u7387\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">squares = [x  2 for x in range(10)]<\/p>\n<p>print(squares)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u751f\u6210\u5668\uff1a\u751f\u6210\u5668\u662f\u4e00\u79cd\u60f0\u6027\u6c42\u503c\u7684\u8fed\u4ee3\u5668\uff0c\u53ef\u4ee5\u8282\u7701\u5185\u5b58\uff0c\u63d0\u9ad8\u6027\u80fd\u3002\u53ef\u4ee5\u4f7f\u7528\u201cyield\u201d\u5173\u952e\u5b57\u5b9a\u4e49\u751f\u6210\u5668\u51fd\u6570\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def fibonacci(n):<\/p>\n<p>    a, b = 0, 1<\/p>\n<p>    for _ in range(n):<\/p>\n<p>        yield a<\/p>\n<p>        a, b = b, a + b<\/p>\n<p>for num in fibonacci(10):<\/p>\n<p>    print(num)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u88c5\u9970\u5668\uff1a\u88c5\u9970\u5668\u662f\u4e00\u79cd\u4fee\u6539\u51fd\u6570\u6216\u65b9\u6cd5\u884c\u4e3a\u7684\u9ad8\u7ea7\u5de5\u5177\uff0c\u53ef\u4ee5\u7528\u4e8e\u5b9e\u73b0\u65e5\u5fd7\u8bb0\u5f55\u3001\u6743\u9650\u68c0\u67e5\u3001\u7f13\u5b58\u7b49\u529f\u80fd\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">def log(func):<\/p>\n<p>    def wrapper(*args, kwargs):<\/p>\n<p>        print(f&quot;Calling {func.__name__}&quot;)<\/p>\n<p>        result = func(*args, kwargs)<\/p>\n<p>        print(f&quot;{func.__name__} returned {result}&quot;)<\/p>\n<p>        return result<\/p>\n<p>    return wrapper<\/p>\n<p>@log<\/p>\n<p>def add(a, b):<\/p>\n<p>    return a + b<\/p>\n<p>result = add(1, 2)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u6807\u51c6\u5e93\uff1aPython\u7684\u6807\u51c6\u5e93\u5305\u542b\u4e86\u4e30\u5bcc\u7684\u6a21\u5757\u548c\u51fd\u6570\uff0c\u53ef\u4ee5\u7528\u4e8e\u5b9e\u73b0\u5404\u79cd\u5e38\u89c1\u7684\u529f\u80fd\u3002\u5728\u7f16\u5199\u4ee3\u7801\u65f6\uff0c\u4f18\u5148\u8003\u8651\u4f7f\u7528\u6807\u51c6\u5e93\u4e2d\u7684\u6a21\u5757\uff0c\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u7ef4\u62a4\u6027\u548c\u79fb\u690d\u6027\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u201cdatetime\u201d\u6a21\u5757\u5904\u7406\u65e5\u671f\u548c\u65f6\u95f4\uff0c\u4f7f\u7528\u201cjson\u201d\u6a21\u5757\u5904\u7406JSON\u6570\u636e\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>\u4e03\u3001Python 3.5.4\u7684\u5c40\u9650\u6027\u548c\u66ff\u4ee3\u65b9\u6848<\/p>\n<\/p>\n<p><p>\u867d\u7136Python 3.5.4\u5728\u8bb8\u591a\u65b9\u9762\u90fd\u8868\u73b0\u51fa\u8272\uff0c\u4f46\u5b83\u5df2\u7ecf\u4e0d\u518d\u662f\u6700\u65b0\u7248\u672c\uff0c\u5b58\u5728\u4e00\u4e9b\u5c40\u9650\u6027\u3002\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0c\u8003\u8651\u5347\u7ea7\u5230\u66f4\u65b0\u7248\u672c\u7684Python\u53ef\u80fd\u662f\u66f4\u597d\u7684\u9009\u62e9\u3002<\/p>\n<\/p>\n<p><p>1\u3001\u6027\u80fd\u95ee\u9898<\/p>\n<\/p>\n<p><p>Python 3.5.4\u7684\u89e3\u91ca\u5668\u6027\u80fd\u76f8\u5bf9\u8f83\u4f4e\uff0c\u5728\u5904\u7406\u5927\u89c4\u6a21\u6570\u636e\u548c\u9ad8\u6027\u80fd\u8ba1\u7b97\u65f6\u53ef\u80fd\u4e0d\u591f\u7406\u60f3\u3002\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u4ee5\u4e0b\u51e0\u79cd\u66ff\u4ee3\u65b9\u6848\u6765\u63d0\u9ad8\u6027\u80fd\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p>\u4f7f\u7528Cython\uff1aCython\u662f\u4e00\u79cd\u5c06Python\u4ee3\u7801\u7f16\u8bd1\u4e3aC\u4ee3\u7801\u7684\u5de5\u5177\uff0c\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8Python\u4ee3\u7801\u7684\u6267\u884c\u6548\u7387\u3002\u53ef\u4ee5\u5728\u6027\u80fd\u5173\u952e\u7684\u90e8\u5206\u4f7f\u7528Cython\u8fdb\u884c\u4f18\u5316\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528NumPy\uff1aNumPy\u662f\u4e00\u4e2a\u9ad8\u6027\u80fd\u7684\u79d1\u5b66\u8ba1\u7b97\u5e93\uff0c\u63d0\u4f9b\u4e86\u9ad8\u6548\u7684\u6570\u7ec4\u64cd\u4f5c\u548c\u6570\u5b66\u51fd\u6570\u3002\u5728\u5904\u7406\u5927\u89c4\u6a21\u6570\u636e\u65f6\uff0c\u4f7f\u7528NumPy\u53ef\u4ee5\u663e\u8457\u63d0\u9ad8\u6027\u80fd\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u4f7f\u7528\u5e76\u884c\u8ba1\u7b97\uff1a\u53ef\u4ee5\u4f7f\u7528\u591a\u7ebf\u7a0b\u3001\u591a\u8fdb\u7a0b\u6216\u5206\u5e03\u5f0f\u8ba1\u7b97\u6765\u63d0\u9ad8\u6027\u80fd\u3002\u4f8b\u5982\uff0c\u4f7f\u7528\u201cconcurrent.futures\u201d\u6a21\u5757\u5b9e\u73b0\u5e76\u884c\u8ba1\u7b97\uff0c\u4f7f\u7528\u201cmultiprocessing\u201d\u6a21\u5757\u5b9e\u73b0\u591a\u8fdb\u7a0b\u8ba1\u7b97\uff0c\u4f7f\u7528\u201cdask\u201d\u5e93\u5b9e\u73b0\u5206\u5e03\u5f0f\u8ba1\u7b97\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>2\u3001\u5e93\u7684\u517c\u5bb9\u6027\u95ee\u9898<\/p>\n<\/p>\n<p><p>\u968f\u7740\u65f6\u95f4\u7684\u63a8\u79fb\uff0c\u8bb8\u591a\u7b2c\u4e09\u65b9\u5e93\u53ef\u80fd\u4e0d\u518d\u652f\u6301Python 3.5.4\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u8003\u8651\u5347\u7ea7\u5230\u66f4\u65b0\u7248\u672c\u7684Python\u3002\u4f8b\u5982\uff0cPython 3.6\u30013.7\u30013.8\u7b49\u7248\u672c\u5f15\u5165\u4e86\u8bb8\u591a\u65b0\u7279\u6027\u548c\u6539\u8fdb\uff0c\u5177\u6709\u66f4\u597d\u7684\u517c\u5bb9\u6027\u548c\u6027\u80fd\u3002<\/p>\n<\/p>\n<p><p>3\u3001\u793e\u533a\u652f\u6301<\/p>\n<\/p>\n<p><p>Python 3.5.4\u5df2\u7ecf\u4e0d\u518d\u662f\u6700\u65b0\u7248\u672c\uff0c\u793e\u533a\u7684\u652f\u6301\u529b\u5ea6\u53ef\u80fd\u9010\u6e10\u51cf\u5f31\u3002\u5728\u9047\u5230\u95ee\u9898\u65f6\uff0c\u53ef\u80fd\u96be\u4ee5\u627e\u5230\u6700\u65b0\u7684\u89e3\u51b3\u65b9\u6848\u548c\u8d44\u6e90\u3002\u53ef\u4ee5\u8003\u8651\u5347\u7ea7\u5230\u66f4\u65b0\u7248\u672c\u7684Python\uff0c\u4ee5\u83b7\u5f97\u66f4\u597d\u7684\u793e\u533a\u652f\u6301\u548c\u8d44\u6e90\u3002<\/p>\n<\/p>\n<p><p>\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5728Python 3.5.4\u4e2d\u8fd0\u884c\u4ee3\u7801\u7684\u591a\u79cd\u65b9\u6cd5\uff0c\u5305\u62ec\u547d\u4ee4\u884c\u7ec8\u7aef\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u3001\u6587\u672c\u7f16\u8f91\u5668\u548c\u5728\u7ebf\u7f16\u8bd1\u5668\u3002\u6211\u4eec\u8fd8\u8ba8\u8bba\u4e86\u8fd0\u884cPython\u4ee3\u7801\u65f6\u7684\u6ce8\u610f\u4e8b\u9879\u3001Python 3.5.4\u7684\u7279\u70b9\u548c\u4f7f\u7528\u6280\u5de7\uff0c\u4ee5\u53ca\u5176\u5c40\u9650\u6027\u548c\u66ff\u4ee3\u65b9\u6848\u3002\u5e0c\u671b\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u80fd\u591f\u5e2e\u52a9\u4f60\u66f4\u597d\u5730\u4f7f\u7528Python 3.5.4\u7f16\u5199\u548c\u8fd0\u884c\u4ee3\u7801\uff0c\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u548c\u4ee3\u7801\u8d28\u91cf\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python 3.5.4\u4e2d\u6267\u884c\u6211\u7684\u7b2c\u4e00\u4e2a\u7a0b\u5e8f\uff1f<\/strong><br \/>\u5728Python 3.5.4\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528IDLE\u6216\u547d\u4ee4\u884c\u754c\u9762\u6765\u8fd0\u884c\u4ee3\u7801\u3002\u6253\u5f00IDLE\uff0c\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u6587\u4ef6\u5e76\u8f93\u5165\u60a8\u7684\u4ee3\u7801\uff0c\u4fdd\u5b58\u540e\u9009\u62e9\u201c\u8fd0\u884c\u201d\u83dc\u5355\u4e2d\u7684\u201c\u8fd0\u884c\u6a21\u5757\u201d\u6765\u6267\u884c\u3002\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u5bfc\u822a\u5230\u5305\u542b\u60a8\u7684Python\u6587\u4ef6\u7684\u76ee\u5f55\uff0c\u4f7f\u7528\u547d\u4ee4<code>python filename.py<\/code>\u6765\u8fd0\u884c\u7a0b\u5e8f\u3002<\/p>\n<p><strong>Python 3.5.4\u662f\u5426\u652f\u6301\u6240\u6709\u5e38\u89c1\u7684\u5e93\u548c\u6846\u67b6\uff1f<\/strong><br \/>\u867d\u7136Python 3.5.4\u652f\u6301\u8bb8\u591a\u6d41\u884c\u7684\u5e93\u548c\u6846\u67b6\uff0c\u4f46\u8bf7\u6ce8\u610f\uff0c\u4e00\u4e9b\u8f83\u65b0\u7684\u5e93\u53ef\u80fd\u4e0d\u518d\u517c\u5bb9\u6b64\u7248\u672c\u3002\u5efa\u8bae\u67e5\u770b\u5404\u4e2a\u5e93\u7684\u6587\u6863\uff0c\u786e\u8ba4\u652f\u6301\u7684Python\u7248\u672c\uff0c\u4ee5\u786e\u4fdd\u60a8\u80fd\u591f\u987a\u5229\u4f7f\u7528\u6240\u9700\u7684\u529f\u80fd\u3002<\/p>\n<p><strong>\u6211\u53ef\u4ee5\u5728Python 3.5.4\u4e2d\u4f7f\u7528\u54ea\u4e9b\u5f00\u53d1\u5de5\u5177\u6765\u63d0\u9ad8\u7f16\u7a0b\u6548\u7387\uff1f<\/strong><br \/>\u5728Python 3.5.4\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u591a\u79cd\u5f00\u53d1\u5de5\u5177\u6765\u63d0\u9ad8\u7f16\u7a0b\u6548\u7387\u3002\u4f8b\u5982\uff0cPyCharm\u548cVisual Studio Code\u90fd\u662f\u975e\u5e38\u53d7\u6b22\u8fce\u7684IDE\uff0c\u63d0\u4f9b\u4ee3\u7801\u8865\u5168\u3001\u8c03\u8bd5\u548c\u7248\u672c\u63a7\u5236\u7b49\u529f\u80fd\u3002\u6b64\u5916\uff0cJupyter Notebook\u4e5f\u662f\u4e00\u4e2a\u5f88\u597d\u7684\u9009\u62e9\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>\u9879\u76ee\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5728Python 3.5.4\u4e2d\u8fd0\u884c\u4ee3\u7801\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528Python\u89e3\u91ca\u5668\u3001\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u3001\u6587\u672c\u7f16\u8f91\u5668\u3001\u547d\u4ee4 [&hellip;]","protected":false},"author":3,"featured_media":1177802,"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\/1177800"}],"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=1177800"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1177800\/revisions"}],"predecessor-version":[{"id":1177803,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1177800\/revisions\/1177803"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1177802"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1177800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1177800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1177800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}