{"id":999758,"date":"2024-12-27T09:44:11","date_gmt":"2024-12-27T01:44:11","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/999758.html"},"modified":"2024-12-27T09:44:16","modified_gmt":"2024-12-27T01:44:16","slug":"%e5%a6%82%e4%bd%95%e5%90%91pycharm%e6%b7%bb%e5%8a%a0python","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/999758.html","title":{"rendered":"\u5982\u4f55\u5411pycharm\u6dfb\u52a0python"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25074638\/7d19db82-376e-49e0-bdee-24eaae0b26f7.webp\" alt=\"\u5982\u4f55\u5411pycharm\u6dfb\u52a0python\" \/><\/p>\n<p><p> <strong>\u8981\u5728PyCharm\u4e2d\u6dfb\u52a0Python\uff0c\u9996\u5148\u8981\u786e\u4fdd\u5df2\u5728\u7cfb\u7edf\u4e2d\u5b89\u88c5Python\u89e3\u91ca\u5668\u3002\u53ef\u4ee5\u901a\u8fc7\u6253\u5f00\u547d\u4ee4\u884c\u5e76\u8f93\u5165\u201cpython &#8211;version\u201d\u6765\u68c0\u67e5\u3002\u5982\u679c\u672a\u5b89\u88c5\uff0c\u8bf7\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002\u63a5\u4e0b\u6765\uff0c\u5728PyCharm\u4e2d\u6253\u5f00\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cSettings\u201d\u6216\u201cPreferences\u201d\uff0c\u7136\u540e\u5728\u201cProject: [project name]\u201d\u4e0b\u9009\u62e9\u201cPython Interpreter\u201d\u3002\u70b9\u51fb\u201cAdd Interpreter\u201d\uff0c\u7136\u540e\u9009\u62e9\u201cSystem Interpreter\u201d\u5e76\u9009\u62e9\u5df2\u5b89\u88c5\u7684Python\u7248\u672c\u3002\u6700\u540e\uff0c\u70b9\u51fb\u201cOK\u201d\u4fdd\u5b58\u66f4\u6539\u3002<\/strong><\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5\u5e76\u914d\u7f6ePython<\/p>\n<\/p>\n<p><p>\u5728\u4f7f\u7528PyCharm\u4e4b\u524d\uff0c\u5fc5\u987b\u786e\u4fdd\u5df2\u7ecf\u5728\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86Python\u89e3\u91ca\u5668\u3002Python\u7684\u5b89\u88c5\u8fc7\u7a0b\u76f8\u5bf9\u7b80\u5355\uff0c\u53ea\u9700\u4ecePython\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/www.python.org\/%EF%BC%89%E4%B8%8B%E8%BD%BD%E9%80%82%E5%90%88%E6%82%A8%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%AE%89%E8%A3%85%E5%8C%85%EF%BC%8C%E5%B9%B6%E6%8C%89%E7%85%A7%E6%8F%90%E7%A4%BA%E8%BF%9B%E8%A1%8C%E5%AE%89%E8%A3%85%E3%80%82%E5%AE%89%E8%A3%85%E5%AE%8C%E6%88%90%E5%90%8E%EF%BC%8C%E5%8F%AF%E4%BB%A5%E9%80%9A%E8%BF%87%E5%91%BD%E4%BB%A4%E8%A1%8C%E8%BE%93%E5%85%A5%E2%80%9Cpython\">https:\/\/www.python.org\/\uff09\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\uff0c\u5e76\u6309\u7167\u63d0\u793a\u8fdb\u884c\u5b89\u88c5\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8f93\u5165\u201cpython<\/a> &#8211;version\u201d\u6765\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7dPython\u5b89\u88c5\u5305<\/strong><\/p>\n<\/p>\n<p><p>\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u9002\u5408\u60a8\u64cd\u4f5c\u7cfb\u7edf\u7684Python\u7248\u672c\u3002\u5efa\u8bae\u4e0b\u8f7d\u6700\u65b0\u7684\u7a33\u5b9a\u7248\u672c\uff0c\u4ee5\u4fbf\u83b7\u5f97\u6700\u65b0\u7684\u529f\u80fd\u548c\u5b89\u5168\u8865\u4e01\u3002\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u8fd0\u884c\u5b89\u88c5\u7a0b\u5e8f\u3002\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u81ea\u5b9a\u4e49\u5b89\u88c5\u76ee\u5f55\u548c\u5176\u4ed6\u9009\u9879\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/strong><\/p>\n<\/p>\n<p><p>\u5728Windows\u64cd\u4f5c\u7cfb\u7edf\u4e2d\uff0c\u5b89\u88c5\u7a0b\u5e8f\u901a\u5e38\u4f1a\u81ea\u52a8\u914d\u7f6e\u73af\u5883\u53d8\u91cf\uff0c\u4f7f\u5f97Python\u547d\u4ee4\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u5168\u5c40\u4f7f\u7528\u3002\u7136\u800c\uff0c\u4e3a\u786e\u4fdd\u65e0\u8bef\uff0c\u60a8\u53ef\u4ee5\u624b\u52a8\u68c0\u67e5\u73af\u5883\u53d8\u91cf\u8bbe\u7f6e\u3002\u53f3\u952e\u5355\u51fb\u201c\u6211\u7684\u7535\u8111\u201d\u6216\u201c\u6b64\u7535\u8111\u201d\uff0c\u9009\u62e9\u201c\u5c5e\u6027\u201d-&gt;\u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d-&gt;\u201c\u73af\u5883\u53d8\u91cf\u201d\u3002\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u4e2d\uff0c\u627e\u5230\u201cPath\u201d\u5e76\u7f16\u8f91\uff0c\u786e\u4fddPython\u5b89\u88c5\u76ee\u5f55\u548cScripts\u76ee\u5f55\u90fd\u5df2\u6dfb\u52a0\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u6253\u5f00\u547d\u4ee4\u884c\uff08Windows\u7528\u6237\u53ef\u4ee5\u4f7f\u7528CMD\u6216PowerShell\uff0cmacOS\u548cLinux\u7528\u6237\u53ef\u4ee5\u4f7f\u7528Terminal\uff09\uff0c\u8f93\u5165\u201cpython &#8211;version\u201d\u5e76\u6309\u4e0b\u56de\u8f66\u952e\u3002\u5982\u679c\u5b89\u88c5\u6b63\u786e\uff0c\u60a8\u5c06\u770b\u5230Python\u7248\u672c\u53f7\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u5728PyCharm\u4e2d\u6dfb\u52a0Python\u89e3\u91ca\u5668<\/p>\n<\/p>\n<p><p>\u5b8c\u6210Python\u7684\u5b89\u88c5\u548c\u914d\u7f6e\u540e\uff0c\u63a5\u4e0b\u6765\u9700\u8981\u5728PyCharm\u4e2d\u6dfb\u52a0Python\u89e3\u91ca\u5668\u3002PyCharm\u652f\u6301\u591a\u79cdPython\u89e3\u91ca\u5668\uff0c\u5305\u62ec\u7cfb\u7edf\u89e3\u91ca\u5668\u3001\u865a\u62df\u73af\u5883\u3001conda\u73af\u5883\u7b49\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u542f\u52a8PyCharm<\/strong><\/p>\n<\/p>\n<p><p>\u6253\u5f00PyCharm\u5e76\u8fdb\u5165\u9879\u76ee\u7a97\u53e3\u3002\u5982\u679c\u662f\u7b2c\u4e00\u6b21\u4f7f\u7528PyCharm\uff0c\u53ef\u80fd\u4f1a\u8981\u6c42\u60a8\u521b\u5efa\u6216\u5bfc\u5165\u9879\u76ee\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8fdb\u5165\u8bbe\u7f6e\u83dc\u5355<\/strong><\/p>\n<\/p>\n<p><p>\u5728Windows\u548cLinux\u4e0a\uff0c\u70b9\u51fb\u9876\u90e8\u83dc\u5355\u4e2d\u7684\u201cFile\u201d\uff0c\u9009\u62e9\u201cSettings\u201d\uff1b\u5728macOS\u4e0a\uff0c\u70b9\u51fb\u201cPyCharm\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cPreferences\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9009\u62e9Python Interpreter<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u8bbe\u7f6e\u7a97\u53e3\u4e2d\uff0c\u627e\u5230\u201cProject: [project name]\u201d\u5e76\u5c55\u5f00\uff0c\u9009\u62e9\u201cPython Interpreter\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6dfb\u52a0\u89e3\u91ca\u5668<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python Interpreter\u8bbe\u7f6e\u9875\u9762\uff0c\u70b9\u51fb\u53f3\u4fa7\u7684\u9f7f\u8f6e\u56fe\u6807\uff0c\u9009\u62e9\u201cAdd Interpreter\u201d\u3002\u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\uff0c\u9009\u62e9\u201cSystem Interpreter\u201d\uff0c\u7136\u540e\u4ece\u4e0b\u62c9\u5217\u8868\u4e2d\u9009\u62e9\u5df2\u5b89\u88c5\u7684Python\u7248\u672c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4fdd\u5b58\u8bbe\u7f6e<\/strong><\/p>\n<\/p>\n<p><p>\u9009\u62e9\u5b8cPython\u89e3\u91ca\u5668\u540e\uff0c\u70b9\u51fb\u201cOK\u201d\u4ee5\u4fdd\u5b58\u8bbe\u7f6e\u3002\u6b64\u65f6\uff0cPyCharm\u5c06\u4f7f\u7528\u60a8\u9009\u62e9\u7684Python\u89e3\u91ca\u5668\u6765\u8fd0\u884c\u9879\u76ee\u4ee3\u7801\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u4f7f\u7528\u865a\u62df\u73af\u5883<\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1Python\u9879\u76ee\u65f6\uff0c\u4f7f\u7528\u865a\u62df\u73af\u5883\u662f\u4e00\u4e2a\u6700\u4f73\u5b9e\u8df5\u3002\u865a\u62df\u73af\u5883\u5141\u8bb8\u60a8\u5728\u9694\u79bb\u7684\u73af\u5883\u4e2d\u7ba1\u7406\u9879\u76ee\u7684\u4f9d\u8d56\u5173\u7cfb\uff0c\u907f\u514d\u4e0e\u5176\u4ed6\u9879\u76ee\u4e4b\u95f4\u7684\u51b2\u7a81\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u521b\u5efa\u865a\u62df\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528Python\u81ea\u5e26\u7684\u201cvenv\u201d\u6a21\u5757\u6765\u521b\u5efa\u865a\u62df\u73af\u5883\u3002\u5728\u547d\u4ee4\u884c\u4e2d\uff0c\u5bfc\u822a\u5230\u9879\u76ee\u76ee\u5f55\uff0c\u7136\u540e\u8fd0\u884c\u201cpython -m venv [env_name]\u201d\uff0c\u5176\u4e2d\u201c[env_name]\u201d\u662f\u60a8\u4e3a\u865a\u62df\u73af\u5883\u9009\u62e9\u7684\u540d\u79f0\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6fc0\u6d3b\u865a\u62df\u73af\u5883<\/strong><\/p>\n<\/p>\n<p><p>\u5728Windows\u4e0a\uff0c\u8fd0\u884c\u201c[env_name]\\Scripts\\activate.bat\u201d\u4ee5\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u3002\u5728macOS\u548cLinux\u4e0a\uff0c\u8fd0\u884c\u201csource [env_name]\/bin\/activate\u201d\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6dfb\u52a0\u865a\u62df\u73af\u5883\u5230PyCharm<\/strong><\/p>\n<\/p>\n<p><p>\u5728PyCharm\u4e2d\uff0c\u6309\u7167\u524d\u8ff0\u6b65\u9aa4\u8fdb\u5165\u201cPython Interpreter\u201d\u8bbe\u7f6e\u9875\u9762\uff0c\u70b9\u51fb\u9f7f\u8f6e\u56fe\u6807\u5e76\u9009\u62e9\u201cAdd Interpreter\u201d\u3002\u9009\u62e9\u201cVirtualenv Environment\u201d\uff0c\u7136\u540e\u9009\u62e9\u201cExisting environment\u201d\uff0c\u5e76\u6d4f\u89c8\u5230\u865a\u62df\u73af\u5883\u7684Python\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u7ba1\u7406\u9879\u76ee\u4f9d\u8d56<\/p>\n<\/p>\n<p><p>\u5728\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u5b89\u88c5\u5404\u79cd\u7b2c\u4e09\u65b9\u5e93\u548c\u5305\u3002\u5728\u865a\u62df\u73af\u5883\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528pip\u547d\u4ee4\u6765\u7ba1\u7406\u8fd9\u4e9b\u4f9d\u8d56\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5\u5305<\/strong><\/p>\n<\/p>\n<p><p>\u6fc0\u6d3b\u865a\u62df\u73af\u5883\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528\u201cpip install [package_name]\u201d\u6765\u5b89\u88c5\u6240\u9700\u7684\u5305\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u51bb\u7ed3\u4f9d\u8d56<\/strong><\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u8bb0\u5f55\u5f53\u524d\u73af\u5883\u4e2d\u5b89\u88c5\u7684\u6240\u6709\u5305\u53ca\u5176\u7248\u672c\uff0c\u53ef\u4ee5\u4f7f\u7528\u201cpip freeze &gt; requirements.txt\u201d\u547d\u4ee4\u751f\u6210\u4e00\u4e2arequirements.txt\u6587\u4ef6\u3002\u6b64\u6587\u4ef6\u53ef\u4ee5\u7528\u4e8e\u5728\u5176\u4ed6\u73af\u5883\u4e2d\u91cd\u73b0\u76f8\u540c\u7684\u4f9d\u8d56\u5173\u7cfb\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5\u4f9d\u8d56<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u65b0\u7684\u73af\u5883\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u201cpip install -r requirements.txt\u201d\u547d\u4ee4\u6765\u5b89\u88c5requirements.txt\u6587\u4ef6\u4e2d\u5217\u51fa\u7684\u6240\u6709\u4f9d\u8d56\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001\u8c03\u8bd5\u548c\u8fd0\u884c\u4ee3\u7801<\/p>\n<\/p>\n<p><p>\u5728PyCharm\u4e2d\uff0c\u60a8\u53ef\u4ee5\u8f7b\u677e\u5730\u8c03\u8bd5\u548c\u8fd0\u884cPython\u4ee3\u7801\u3002PyCharm\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u8c03\u8bd5\u5de5\u5177\uff0c\u5e2e\u52a9\u60a8\u5feb\u901f\u53d1\u73b0\u548c\u4fee\u590d\u4ee3\u7801\u4e2d\u7684\u95ee\u9898\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8bbe\u7f6e\u65ad\u70b9<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u4ee3\u7801\u7f16\u8f91\u5668\u4e2d\uff0c\u70b9\u51fb\u884c\u53f7\u5de6\u4fa7\u7684\u7a7a\u767d\u533a\u57df\u8bbe\u7f6e\u65ad\u70b9\u3002\u65ad\u70b9\u7528\u4e8e\u6682\u505c\u7a0b\u5e8f\u7684\u6267\u884c\uff0c\u4ee5\u4fbf\u60a8\u68c0\u67e5\u7a0b\u5e8f\u72b6\u6001\u548c\u53d8\u91cf\u503c\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u542f\u52a8\u8c03\u8bd5<\/strong><\/p>\n<\/p>\n<p><p>\u70b9\u51fb\u5de5\u5177\u680f\u4e0a\u7684\u201cDebug\u201d\u6309\u94ae\u542f\u52a8\u8c03\u8bd5\u6a21\u5f0f\u3002\u7a0b\u5e8f\u5c06\u8fd0\u884c\u5230\u7b2c\u4e00\u4e2a\u65ad\u70b9\u5904\u6682\u505c\uff0c\u60a8\u53ef\u4ee5\u9010\u6b65\u6267\u884c\u4ee3\u7801\u5e76\u68c0\u67e5\u53d8\u91cf\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u68c0\u67e5\u53d8\u91cf\u548c\u8868\u8fbe\u5f0f<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u8c03\u8bd5\u9762\u677f\u4e2d\uff0c\u60a8\u53ef\u4ee5\u67e5\u770b\u6240\u6709\u53d8\u91cf\u7684\u5f53\u524d\u503c\uff0c\u5e76\u5728\u201cEvaluate Expression\u201d\u7a97\u53e3\u4e2d\u8f93\u5165\u8868\u8fbe\u5f0f\u8fdb\u884c\u8bc4\u4f30\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u60a8\u53ef\u4ee5\u5728PyCharm\u4e2d\u987a\u5229\u6dfb\u52a0Python\u89e3\u91ca\u5668\uff0c\u5e76\u5229\u7528\u865a\u62df\u73af\u5883\u548c\u8c03\u8bd5\u5de5\u5177\u6765\u63d0\u5347\u5f00\u53d1\u6548\u7387\u3002\u65e0\u8bba\u662f\u521d\u5b66\u8005\u8fd8\u662f\u7ecf\u9a8c\u4e30\u5bcc\u7684\u5f00\u53d1\u8005\uff0cPyCharm\u90fd\u63d0\u4f9b\u4e86\u76f4\u89c2\u4e14\u5f3a\u5927\u7684\u529f\u80fd\u6765\u7b80\u5316Python\u5f00\u53d1\u8fc7\u7a0b\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728PyCharm\u4e2d\u914d\u7f6ePython\u89e3\u91ca\u5668\uff1f<\/strong><br \/>\u5728PyCharm\u4e2d\u914d\u7f6ePython\u89e3\u91ca\u5668\u975e\u5e38\u7b80\u5355\u3002\u6253\u5f00PyCharm\u540e\uff0c\u8fdb\u5165\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cSettings\u201d\uff08\u5728Mac\u4e0a\u4e3a\u201cPreferences\u201d\uff09\u3002\u5728\u5de6\u4fa7\u7684\u83dc\u5355\u4e2d\u627e\u5230\u201cProject: [\u4f60\u7684\u9879\u76ee\u540d]\u201d\u4e0b\u7684\u201cPython Interpreter\u201d\u3002\u70b9\u51fb\u53f3\u4fa7\u7684\u9f7f\u8f6e\u56fe\u6807\uff0c\u9009\u62e9\u201cAdd\u201d\u6765\u6dfb\u52a0\u65b0\u7684Python\u89e3\u91ca\u5668\u3002\u4f60\u53ef\u4ee5\u9009\u62e9\u7cfb\u7edf\u4e2d\u7684Python\u5b89\u88c5\uff0c\u6216\u8005\u521b\u5efa\u65b0\u7684\u865a\u62df\u73af\u5883\u3002\u5b8c\u6210\u540e\uff0c\u70b9\u51fb\u201cOK\u201d\u5373\u53ef\u3002<\/p>\n<p><strong>\u6211\u8be5\u9009\u62e9\u54ea\u79cdPython\u89e3\u91ca\u5668\uff1f<\/strong><br \/>\u9009\u62e9Python\u89e3\u91ca\u5668\u65f6\uff0c\u901a\u5e38\u6709\u51e0\u79cd\u9009\u62e9\uff1a\u7cfb\u7edf\u89e3\u91ca\u5668\u3001\u865a\u62df\u73af\u5883\u548cConda\u73af\u5883\u3002\u5982\u679c\u4f60\u5e0c\u671b\u9879\u76ee\u62e5\u6709\u72ec\u7acb\u7684\u4f9d\u8d56\u5e93\uff0c\u5efa\u8bae\u4f7f\u7528\u865a\u62df\u73af\u5883\u3002\u5bf9\u4e8e\u6570\u636e\u79d1\u5b66\u9879\u76ee\uff0cConda\u73af\u5883\u4e5f\u5f88\u53d7\u6b22\u8fce\uff0c\u56e0\u4e3a\u5b83\u80fd\u66f4\u597d\u5730\u7ba1\u7406\u5e93\u548c\u4f9d\u8d56\u5173\u7cfb\u3002\u9009\u62e9\u65f6\u8003\u8651\u9879\u76ee\u7684\u9700\u6c42\u548c\u56e2\u961f\u7684\u5de5\u4f5c\u6d41\u7a0b\u3002<\/p>\n<p><strong>\u5982\u4f55\u5728PyCharm\u4e2d\u5b89\u88c5Python\u5305\uff1f<\/strong><br \/>\u5728PyCharm\u4e2d\u5b89\u88c5Python\u5305\uff0c\u53ef\u4ee5\u901a\u8fc7\u5185\u7f6e\u7684\u5305\u7ba1\u7406\u5668\u5b9e\u73b0\u3002\u9996\u5148\uff0c\u786e\u4fdd\u4f60\u5df2\u7ecf\u914d\u7f6e\u4e86\u6b63\u786e\u7684Python\u89e3\u91ca\u5668\u3002\u8fdb\u5165\u201cFile\u201d\u83dc\u5355\uff0c\u9009\u62e9\u201cSettings\u201d\uff0c\u518d\u627e\u5230\u201cProject: [\u4f60\u7684\u9879\u76ee\u540d]\u201d\u4e0b\u7684\u201cPython Interpreter\u201d\u3002\u5728\u53f3\u4fa7\u7684\u7a97\u53e3\u4e2d\uff0c\u4f60\u4f1a\u770b\u5230\u5f53\u524d\u73af\u5883\u4e2d\u7684\u6240\u6709\u5305\u3002\u70b9\u51fb\u201c+\u201d\u6309\u94ae\uff0c\u641c\u7d22\u9700\u8981\u7684\u5305\uff0c\u9009\u62e9\u540e\u70b9\u51fb\u201cInstall Package\u201d\u5373\u53ef\u5b8c\u6210\u5b89\u88c5\u3002\u4e5f\u53ef\u4ee5\u76f4\u63a5\u5728\u9879\u76ee\u7684\u7ec8\u7aef\u4e2d\u4f7f\u7528pip\u547d\u4ee4\u6765\u5b89\u88c5\u5305\uff0c\u6548\u679c\u76f8\u540c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5728PyCharm\u4e2d\u6dfb\u52a0Python\uff0c\u9996\u5148\u8981\u786e\u4fdd\u5df2\u5728\u7cfb\u7edf\u4e2d\u5b89\u88c5Python\u89e3\u91ca\u5668\u3002\u53ef\u4ee5\u901a\u8fc7\u6253\u5f00\u547d\u4ee4\u884c\u5e76\u8f93\u5165\u201cp [&hellip;]","protected":false},"author":3,"featured_media":999773,"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\/999758"}],"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=999758"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/999758\/revisions"}],"predecessor-version":[{"id":999776,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/999758\/revisions\/999776"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/999773"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=999758"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=999758"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=999758"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}