{"id":968234,"date":"2024-12-27T05:05:09","date_gmt":"2024-12-26T21:05:09","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/968234.html"},"modified":"2024-12-27T05:05:11","modified_gmt":"2024-12-26T21:05:11","slug":"python%e5%a6%82%e4%bd%95%e6%b7%bb%e5%8a%a0%e8%a7%a3%e9%87%8a%e5%99%a8","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/968234.html","title":{"rendered":"python\u5982\u4f55\u6dfb\u52a0\u89e3\u91ca\u5668"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/24183116\/008b9d6b-8e47-40cc-b9db-b339432b551f.webp\" alt=\"python\u5982\u4f55\u6dfb\u52a0\u89e3\u91ca\u5668\" \/><\/p>\n<p><p> \u5728Python\u4e2d\u6dfb\u52a0\u89e3\u91ca\u5668\u7684\u8fc7\u7a0b\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5177\u4f53\u65b9\u6cd5\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u5f00\u53d1\u73af\u5883\u548c\u9700\u6c42\u3002<strong>\u9996\u5148\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u865a\u62df\u73af\u5883\uff08virtual environment\uff09\u7ba1\u7406\u548c\u6dfb\u52a0Python\u89e3\u91ca\u5668\u3001\u5176\u6b21\uff0c\u4f60\u53ef\u4ee5\u5728\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u4e2d\u914d\u7f6ePython\u89e3\u91ca\u5668\u3001\u6700\u540e\uff0c\u4f60\u53ef\u4ee5\u624b\u52a8\u4e0b\u8f7d\u548c\u5b89\u88c5\u65b0\u7684Python\u89e3\u91ca\u5668\uff0c\u5e76\u5c06\u5176\u8def\u5f84\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\u3002<\/strong>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u901a\u8fc7\u8fd9\u51e0\u79cd\u65b9\u5f0f\u6765\u6dfb\u52a0Python\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u4f7f\u7528\u865a\u62df\u73af\u5883\u6dfb\u52a0\u89e3\u91ca\u5668<\/h3>\n<\/p>\n<p><p>\u865a\u62df\u73af\u5883\u662fPython\u5f00\u53d1\u4e2d\u7684\u4e00\u4e2a\u91cd\u8981\u5de5\u5177\uff0c\u5b83\u5141\u8bb8\u4f60\u5728\u540c\u4e00\u53f0\u8ba1\u7b97\u673a\u4e0a\u4e3a\u4e0d\u540c\u7684\u9879\u76ee\u521b\u5efa\u9694\u79bb\u7684Python\u73af\u5883\u3002<\/p>\n<\/p>\n<p><h4>1. \u521b\u5efa\u865a\u62df\u73af\u5883<\/h4>\n<\/p>\n<p><p>\u8981\u521b\u5efa\u865a\u62df\u73af\u5883\uff0c\u9996\u5148\u9700\u8981\u786e\u4fdd\u5df2\u7ecf\u5b89\u88c5\u4e86<code>virtualenv<\/code>\u5de5\u5177\u3002\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install virtualenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\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\">python -m venv myenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u5c06\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a<code>myenv<\/code>\u7684\u76ee\u5f55\uff0c\u5176\u4e2d\u5305\u542bPython\u89e3\u91ca\u5668\u548c\u4e00\u4e2a\u672c\u5730\u7684<code>pip<\/code>\u5b9e\u4f8b\u3002<\/p>\n<\/p>\n<p><h4>2. \u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/h4>\n<\/p>\n<p><p>\u521b\u5efa\u865a\u62df\u73af\u5883\u540e\uff0c\u9700\u8981\u6fc0\u6d3b\u5b83\u3002\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u53ef\u4ee5\u786e\u4fdd\u6240\u6709\u7684Python\u547d\u4ee4\u90fd\u5728\u8fd9\u4e2a\u9694\u79bb\u7684\u73af\u5883\u4e2d\u8fd0\u884c\u3002\u6fc0\u6d3b\u65b9\u6cd5\u56e0\u64cd\u4f5c\u7cfb\u7edf\u800c\u5f02\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p>\u5728Windows\u4e0a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">myenv\\Scripts\\activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u5728Unix\u6216MacOS\u4e0a\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">source myenv\/bin\/activate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<p><p>\u6fc0\u6d3b\u540e\uff0c\u4f60\u4f1a\u770b\u5230\u547d\u4ee4\u63d0\u793a\u7b26\u524d\u9762\u51fa\u73b0\u4e86\u865a\u62df\u73af\u5883\u7684\u540d\u5b57\uff0c\u8868\u793a\u5f53\u524d\u5df2\u7ecf\u8fdb\u5165\u4e86\u8fd9\u4e2a\u865a\u62df\u73af\u5883\u3002<\/p>\n<\/p>\n<p><h4>3. \u5b89\u88c5\u5305\u548c\u7ba1\u7406\u89e3\u91ca\u5668<\/h4>\n<\/p>\n<p><p>\u5728\u6fc0\u6d3b\u7684\u865a\u62df\u73af\u5883\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528<code>pip<\/code>\u6765\u5b89\u88c5\u4efb\u4f55\u9700\u8981\u7684Python\u5305\uff0c\u8fd9\u4e9b\u5305\u53ea\u4f1a\u5bf9\u5f53\u524d\u865a\u62df\u73af\u5883\u751f\u6548\uff0c\u4e0d\u4f1a\u5f71\u54cd\u5168\u5c40\u73af\u5883\u3002<\/p>\n<\/p>\n<p><p>\u8981\u9000\u51fa\u865a\u62df\u73af\u5883\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">deactivate<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u5728IDE\u4e2d\u914d\u7f6ePython\u89e3\u91ca\u5668<\/h3>\n<\/p>\n<p><p>\u8bb8\u591a\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u90fd\u652f\u6301\u914d\u7f6e\u548c\u5207\u6362Python\u89e3\u91ca\u5668\uff0c\u5982PyCharm\u3001Visual Studio Code\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1. PyCharm\u4e2d\u914d\u7f6e\u89e3\u91ca\u5668<\/h4>\n<\/p>\n<p><p>PyCharm\u662f\u4e00\u4e2a\u6d41\u884c\u7684Python IDE\uff0c\u652f\u6301\u591a\u79cdPython\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00PyCharm\uff0c\u8fdb\u5165\u9879\u76ee\u8bbe\u7f6e\u3002<\/li>\n<li>\u5728\u201cProject Interpreter\u201d\u90e8\u5206\uff0c\u70b9\u51fb\u201cAdd Interpreter\u201d\u3002<\/li>\n<li>\u9009\u62e9\u201cVirtual Environment\u201d\u6216\u201cExisting Interpreter\u201d\u3002<\/li>\n<li>\u6839\u636e\u9700\u8981\u9009\u62e9\u6216\u521b\u5efa\u65b0\u7684\u865a\u62df\u73af\u5883\uff0c\u5e76\u70b9\u51fb\u201cOK\u201d\u3002<\/li>\n<\/ul>\n<p><p>PyCharm\u4f1a\u81ea\u52a8\u68c0\u6d4b\u5e76\u914d\u7f6e\u6240\u9009\u7684Python\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<p><h4>2. Visual Studio Code\u4e2d\u914d\u7f6e\u89e3\u91ca\u5668<\/h4>\n<\/p>\n<p><p>Visual Studio Code\uff08VSCode\uff09\u662f\u4e00\u4e2a\u8f7b\u91cf\u7ea7\u4e14\u5f3a\u5927\u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u652f\u6301Python\u6269\u5c55\u3002<\/p>\n<\/p>\n<ul>\n<li>\u5b89\u88c5Python\u6269\u5c55\uff08\u5982\u679c\u5c1a\u672a\u5b89\u88c5\uff09\u3002<\/li>\n<li>\u6253\u5f00\u547d\u4ee4\u9762\u677f\uff08Ctrl+Shift+P\uff09\uff0c\u8f93\u5165\u5e76\u9009\u62e9\u201cPython: Select Interpreter\u201d\u3002<\/li>\n<li>\u4ece\u5217\u8868\u4e2d\u9009\u62e9\u6240\u9700\u7684Python\u89e3\u91ca\u5668\uff0c\u6216\u6dfb\u52a0\u65b0\u7684\u89e3\u91ca\u5668\u8def\u5f84\u3002<\/li>\n<\/ul>\n<p><p>VSCode\u4f1a\u4f7f\u7528\u9009\u62e9\u7684\u89e3\u91ca\u5668\u6765\u8fd0\u884cPython\u4ee3\u7801\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u624b\u52a8\u6dfb\u52a0Python\u89e3\u91ca\u5668<\/h3>\n<\/p>\n<p><p>\u6709\u65f6\u9700\u8981\u624b\u52a8\u4e0b\u8f7d\u548c\u5b89\u88c5\u4e0d\u540c\u7248\u672c\u7684Python\u89e3\u91ca\u5668\uff0c\u5e76\u5c06\u5176\u6dfb\u52a0\u5230\u7cfb\u7edf\u8def\u5f84\u4e2d\u3002<\/p>\n<\/p>\n<p><h4>1. \u4e0b\u8f7d\u548c\u5b89\u88c5Python<\/h4>\n<\/p>\n<p><p>\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u6240\u9700\u7248\u672c\u7684Python\u5b89\u88c5\u5305\u3002\u6839\u636e\u64cd\u4f5c\u7cfb\u7edf\u9009\u62e9\u9002\u5408\u7684\u5b89\u88c5\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><h4>2. \u6dfb\u52a0\u89e3\u91ca\u5668\u5230\u73af\u5883\u53d8\u91cf<\/h4>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u9700\u8981\u5c06Python\u89e3\u91ca\u5668\u7684\u8def\u5f84\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u4ee5\u4fbf\u5728\u547d\u4ee4\u884c\u4e2d\u5168\u5c40\u8bbf\u95ee\u3002<\/p>\n<\/p>\n<ul>\n<li>\n<p>\u5728Windows\u4e0a\uff1a<\/p>\n<\/p>\n<ul>\n<li>\u6253\u5f00\u7cfb\u7edf\u5c5e\u6027\uff0c\u8fdb\u5165\u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\uff0c\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u4e2d\u627e\u5230\u5e76\u7f16\u8f91\u201cPath\u201d\u3002<\/li>\n<li>\u6dfb\u52a0Python\u5b89\u88c5\u76ee\u5f55\u53ca\u5176Scripts\u5b50\u76ee\u5f55\u7684\u8def\u5f84\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u5728Unix\u6216MacOS\u4e0a\uff1a<\/p>\n<\/p>\n<ul>\n<li>\n<p>\u6253\u5f00\u7ec8\u7aef\uff0c\u7f16\u8f91<code>~\/.bashrc<\/code>\u6216<code>~\/.zshrc<\/code>\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p>\u6dfb\u52a0\u4ee5\u4e0b\u884c\uff0c\u5c06<code>\/path\/to\/python<\/code>\u66ff\u6362\u4e3aPython\u89e3\u91ca\u5668\u7684\u5b9e\u9645\u8def\u5f84\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">export PATH=&quot;\/path\/to\/python:$PATH&quot;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u8fd0\u884c<code>source ~\/.bashrc<\/code>\u6216<code>source ~\/.zshrc<\/code>\u4ee5\u5e94\u7528\u66f4\u6539\u3002<\/p>\n<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><h3>\u56db\u3001\u4f7f\u7528\u591a\u7248\u672cPython\u89e3\u91ca\u5668<\/h3>\n<\/p>\n<p><p>\u5728\u540c\u4e00\u53f0\u8ba1\u7b97\u673a\u4e0a\uff0c\u6709\u65f6\u9700\u8981\u4f7f\u7528\u591a\u4e2a\u7248\u672c\u7684Python\u89e3\u91ca\u5668\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><h4>1. \u4f7f\u7528<code>pyenv<\/code>\u7ba1\u7406\u591a\u7248\u672cPython<\/h4>\n<\/p>\n<p><p><code>pyenv<\/code>\u662f\u4e00\u4e2a\u7528\u4e8e\u7ba1\u7406\u591a\u7248\u672cPython\u7684\u5de5\u5177\u3002<\/p>\n<\/p>\n<ul>\n<li>\n<p>\u5b89\u88c5<code>pyenv<\/code>\uff0c\u53ef\u4ee5\u901a\u8fc7<code>git<\/code>\u514b\u9686\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">git clone https:\/\/github.com\/pyenv\/pyenv.git ~\/.pyenv<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">echo &#39;export PYENV_ROOT=&quot;$HOME\/.pyenv&quot;&#39; &gt;&gt; ~\/.bashrc<\/p>\n<p>echo &#39;export PATH=&quot;$PYENV_ROOT\/bin:$PATH&quot;&#39; &gt;&gt; ~\/.bashrc<\/p>\n<p>echo &#39;eval &quot;$(pyenv init --path)&quot;&#39; &gt;&gt; ~\/.bashrc<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u5b89\u88c5\u6240\u9700\u7248\u672c\u7684Python\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyenv install 3.8.0<\/p>\n<p>pyenv install 3.9.0<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p>\u8bbe\u7f6e\u5168\u5c40\u6216\u672c\u5730Python\u7248\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pyenv global 3.8.0<\/p>\n<p>pyenv local 3.9.0<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<p><h4>2. \u5728\u4ee3\u7801\u4e2d\u6307\u5b9a\u89e3\u91ca\u5668<\/h4>\n<\/p>\n<p><p>\u5728Python\u811a\u672c\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7Shebang\uff08#!\uff09\u6307\u5b9a\u4f7f\u7528\u7684Python\u89e3\u91ca\u5668\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">#!\/usr\/bin\/env python3<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u8fd9\u884c\u4ee3\u7801\u4f1a\u5728\u8fd0\u884c\u811a\u672c\u65f6\u81ea\u52a8\u4f7f\u7528\u7cfb\u7edf\u9ed8\u8ba4\u7684Python 3\u89e3\u91ca\u5668\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7075\u6d3b\u5730\u5728\u4e0d\u540c\u73af\u5883\u4e2d\u6dfb\u52a0\u548c\u7ba1\u7406Python\u89e3\u91ca\u5668\uff0c\u4ee5\u6ee1\u8db3\u4e0d\u540c\u9879\u76ee\u7684\u9700\u6c42\u3002<strong>\u4f7f\u7528\u865a\u62df\u73af\u5883\u662f\u7ba1\u7406\u9879\u76ee\u4f9d\u8d56\u548c\u89e3\u91ca\u5668\u7684\u6700\u4f73\u5b9e\u8df5\u3001\u5728IDE\u4e2d\u914d\u7f6e\u89e3\u91ca\u5668\u53ef\u4ee5\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3001\u624b\u52a8\u6dfb\u52a0\u548c\u7ba1\u7406\u89e3\u91ca\u5668\u9002\u7528\u4e8e\u9ad8\u7ea7\u7528\u6237\u7684\u7279\u5b9a\u9700\u6c42<\/strong>\u3002\u6839\u636e\u9879\u76ee\u7684\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u5c06\u6709\u52a9\u4e8e\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u7684\u7075\u6d3b\u6027\u548c\u7a33\u5b9a\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5b89\u88c5\u65b0\u7684\u89e3\u91ca\u5668\uff1f<\/strong><br \/>\u8981\u5728Python\u4e2d\u5b89\u88c5\u65b0\u7684\u89e3\u91ca\u5668\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u901a\u8fc7\u5b98\u65b9Python\u7f51\u7ad9\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684Python\u7248\u672c\uff0c\u6216\u8005\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\uff08\u5982Homebrew\u3001apt-get\u7b49\uff09\u6765\u5b89\u88c5\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u786e\u4fdd\u5c06\u65b0\u7684Python\u89e3\u91ca\u5668\u8def\u5f84\u6dfb\u52a0\u5230\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u4ee5\u4fbf\u80fd\u591f\u5728\u547d\u4ee4\u884c\u4e2d\u8f7b\u677e\u8c03\u7528\u3002<\/p>\n<p><strong>\u5728\u591a\u4e2aPython\u7248\u672c\u4e4b\u95f4\u5207\u6362\u65f6\uff0c\u6709\u4ec0\u4e48\u63a8\u8350\u7684\u65b9\u6cd5\uff1f<\/strong><br \/>\u4f7f\u7528\u7248\u672c\u7ba1\u7406\u5de5\u5177\uff08\u5982pyenv\uff09\u53ef\u4ee5\u8ba9\u60a8\u8f7b\u677e\u5730\u5728\u591a\u4e2aPython\u7248\u672c\u4e4b\u95f4\u8fdb\u884c\u5207\u6362\u3002\u901a\u8fc7\u5b89\u88c5pyenv\uff0c\u60a8\u53ef\u4ee5\u5feb\u901f\u5b89\u88c5\u548c\u7ba1\u7406\u4e0d\u540c\u7248\u672c\u7684Python\uff0c\u5e76\u901a\u8fc7\u547d\u4ee4\u884c\u8f7b\u677e\u5207\u6362\u5230\u6240\u9700\u7248\u672c\u3002\u8fd9\u5bf9\u4e8e\u5f00\u53d1\u591a\u4e2a\u9879\u76ee\uff0c\u4e14\u5404\u81ea\u5bf9Python\u7248\u672c\u6709\u4e0d\u540c\u8981\u6c42\u7684\u60c5\u51b5\u5c24\u5176\u65b9\u4fbf\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728IDE\u4e2d\u914d\u7f6ePython\u89e3\u91ca\u5668\uff1f<\/strong><br \/>\u5728\u8bb8\u591a\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u4e2d\uff0c\u5982PyCharm\u3001Visual Studio Code\u7b49\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u9009\u9879\u6765\u9009\u62e9\u548c\u914d\u7f6ePython\u89e3\u91ca\u5668\u3002\u901a\u5e38\u5728IDE\u7684\u8bbe\u7f6e\u6216\u504f\u597d\u8bbe\u7f6e\u4e2d\uff0c\u53ef\u4ee5\u627e\u5230\u201cPython\u89e3\u91ca\u5668\u201d\u6216\u201c\u73af\u5883\u201d\u9009\u9879\uff0c\u901a\u8fc7\u6b64\u5904\u60a8\u53ef\u4ee5\u9009\u62e9\u5df2\u5b89\u88c5\u7684\u89e3\u91ca\u5668\u6216\u6dfb\u52a0\u65b0\u7684\u89e3\u91ca\u5668\u8def\u5f84\uff0c\u4ee5\u4fbf\u5728\u9879\u76ee\u4e2d\u4f7f\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728Python\u4e2d\u6dfb\u52a0\u89e3\u91ca\u5668\u7684\u8fc7\u7a0b\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5177\u4f53\u65b9\u6cd5\u53d6\u51b3\u4e8e\u6240\u4f7f\u7528\u7684\u5f00\u53d1\u73af\u5883\u548c\u9700\u6c42\u3002\u9996\u5148\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u865a [&hellip;]","protected":false},"author":3,"featured_media":968240,"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\/968234"}],"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=968234"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/968234\/revisions"}],"predecessor-version":[{"id":968243,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/968234\/revisions\/968243"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/968240"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=968234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=968234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=968234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}