{"id":309170,"date":"2024-05-20T21:19:25","date_gmt":"2024-05-20T13:19:25","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/309170.html"},"modified":"2024-05-20T21:19:34","modified_gmt":"2024-05-20T13:19:34","slug":"windows10%e6%80%8e%e4%b9%88%e5%ae%89%e8%a3%85easygui","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/309170.html","title":{"rendered":"Windows10\u600e\u4e48\u5b89\u88c5easygui"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26225619\/5bb8610c-3d74-4c65-a1b5-210bd4b1b3af.webp\" alt=\"Windows10\u600e\u4e48\u5b89\u88c5easygui\" \/><\/p>\n<p><p>\u5b89\u88c5EasyGUI\u5728Windows 10\u4e0a\u4e3b\u8981\u6d89\u53ca\u51e0\u4e2a\u7b80\u5355\u6b65\u9aa4\uff1a<strong>\u4e0b\u8f7dPython\u3001\u5b89\u88c5Python\u3001\u5b89\u88c5EasyGUI<\/strong>\u3002<strong>\u9996\u5148<\/strong>\uff0c\u786e\u4fdd\u4f60\u7684\u7535\u8111\u4e0a\u5b89\u88c5\u4e86Python\uff0c\u56e0\u4e3aEasyGUI\u662f\u4e00\u4e2aPython\u5e93\uff0c\u7528\u4e8e\u7b80\u5316GUI\u7f16\u7a0b\uff0c\u4f7f\u4e4b\u66f4\u52a0\u7528\u6237\u53cb\u597d\u3002\u82e5\u4f60\u7684\u7535\u8111\u672a\u5b89\u88c5Python, \u4f60\u9700\u8981\u4ecePython\u5b98\u7f51\u4e0b\u8f7d\u5e76\u5b89\u88c5\u5b83\u3002\u5b89\u88c5Python\u65f6\uff0c\u786e\u4fdd\u9009\u62e9\u4e86\u201cAdd Python to PATH\u201d\u9009\u9879\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u4efb\u610f\u4f4d\u7f6e\u901a\u8fc7\u7ec8\u7aef\u6216\u547d\u4ee4\u63d0\u793a\u7b26\u8fd0\u884cPython\u3002<\/p>\n<\/p>\n<p><p><strong>\u63a5\u4e0b\u6765<\/strong>\uff0c\u5b89\u88c5EasyGUI\u3002\u8fd9\u4e00\u6b65\u975e\u5e38\u76f4\u63a5\u2014\u2014\u901a\u8fc7\u8fd0\u884c\u4e00\u4e2a\u7b80\u5355\u7684pip\u5b89\u88c5\u547d\u4ee4\u6765\u5b8c\u6210\u3002pip\u662fPython\u7684\u5305\u5b89\u88c5\u7a0b\u5e8f\uff0c\u5b83\u5141\u8bb8\u7528\u6237\u5feb\u901f\u5b89\u88c5\u548c\u7ba1\u7406Python\u5e93\u3002\u6b64\u8fc7\u7a0b\u786e\u4fdd\u4f60\u80fd\u591f\u5728Windows 10\u7684\u73af\u5883\u4e0b\uff0c\u65e0\u7f1d\u5730\u4f7f\u7528EasyGUI\u6765\u521b\u5efa\u56fe\u5f62\u7528\u6237\u754c\u9762\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u786e\u8ba4\u7cfb\u7edf\u5df2\u5b89\u88c5PYTHON<\/h3>\n<\/p>\n<p><p>\u5728\u5b89\u88c5EasyGUI\u4e4b\u524d\uff0c\u52a1\u5fc5\u786e\u8ba4\u4f60\u7684Windows 10\u7cfb\u7edf\u4e2d\u5df2\u5b89\u88c5\u4e86Python\u3002\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u786e\u8ba4Python\u7248\u672c\uff1a<\/p>\n<\/p>\n<p><pre><code>python --version<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u7cfb\u7edf\u663e\u793a\u4e86Python\u7684\u7248\u672c\u53f7\uff0c\u8868\u660e\u5df2\u6210\u529f\u5b89\u88c5Python\u3002\u5982\u679c\u6ca1\u5b89\u88c5\uff0c\u4f60\u9700\u8981\u8bbf\u95eePython\u7684\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/www.python.org\/%EF%BC%89%E4%B8%8B%E8%BD%BD%E5%B9%B6%E5%AE%89%E8%A3%85Python%E3%80%82%E4%B8%8B%E8%BD%BDPython%E5%AE%89%E8%A3%85%E5%8C%85%E5%90%8E%EF%BC%8C%E8%BF%9B%E8%A1%8C%E6%A0%87%E5%87%86%E5%AE%89%E8%A3%85%EF%BC%8C%E5%B9%B6%E7%A1%AE%E4%BF%9D%E5%9C%A8%E5%AE%89%E8%A3%85%E8%BF%87%E7%A8%8B%E4%B8%AD%E9%80%89%E6%8B%A9%E2%80%9CAdd\">https:\/\/www.python.org\/\uff09\u4e0b\u8f7d\u5e76\u5b89\u88c5Python\u3002\u4e0b\u8f7dPython\u5b89\u88c5\u5305\u540e\uff0c\u8fdb\u884c\u6807\u51c6\u5b89\u88c5\uff0c\u5e76\u786e\u4fdd\u5728\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u9009\u62e9\u201cAdd<\/a> Python to PATH\u201d\u9009\u9879\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528PIP\u5b89\u88c5EASYGUI<\/h3>\n<\/p>\n<p><p>\u5b89\u88c5EasyGUI\u6700\u7b80\u5355\u5feb\u6377\u7684\u65b9\u6cd5\u662f\u4f7f\u7528pip\u3002\u5728\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\u4e2d\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code>pip install easygui<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u6b64\u547d\u4ee4\u4f1a\u81ea\u52a8\u4ecePython Package Index\uff08PyPI\uff09\u4e0b\u8f7dEasyGUI\u5e76\u5b8c\u6210\u5b89\u88c5\u3002\u5b89\u88c5\u6210\u529f\u540e\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u7f16\u5199\u4e00\u4e2a\u7b80\u5355\u7684\u811a\u672c\u6d4b\u8bd5EasyGUI\u662f\u5426\u6b63\u786e\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import easygui<\/p>\n<p>easygui.msgbox(&quot;Hello, EasyGUI!&quot;, title=&quot;\u6d4b\u8bd5&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u80fd\u591f\u770b\u5230\u4e00\u4e2a\u542b\u6709\u201cHello, EasyGUI!\u201d\u6d88\u606f\u7684\u5bf9\u8bdd\u6846\uff0c\u606d\u559c\u4f60\uff0c\u5df2\u7ecf\u6210\u529f\u5b89\u88c5\u4e86EasyGUI\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u521d\u8bc6EASYGUI\u7684\u4f7f\u7528<\/h3>\n<\/p>\n<p><p>EasyGUI\u63d0\u4f9b\u4e86\u8bb8\u591a\u51fd\u6570\u6765\u521b\u5efa\u5404\u79cd\u56fe\u5f62\u754c\u9762\u5143\u7d20\uff0c\u4f8b\u5982\u6d88\u606f\u76d2\u5b50\u3001\u6309\u94ae\u3001\u8f93\u5165\u6846\u7b49\uff0c\u800c\u4e14\u4e0d\u9700\u8981\u50cf\u5176\u4ed6GUI\u5e93\u90a3\u6837\u4e86\u89e3\u4e8b\u4ef6\u9a71\u52a8\u7f16\u7a0b\u3002\u8fd9\u4f7f\u5f97\u521d\u5b66\u8005\u80fd\u591f\u5feb\u901f\u4e0a\u624bGUI\u7f16\u7a0b\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u65e6\u5b89\u88c5\u4e86EasyGUI\uff0c\u5728\u4f60\u7684Python\u811a\u672c\u4e2d\u5bfc\u5165\u5e93\u5373\u53ef\u5f00\u59cb\u4f7f\u7528\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import easygui<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4f7f\u7528EasyGUI\u63d0\u4f9b\u7684\u51fd\u6570\uff0c\u4f60\u53ef\u4ee5\u5feb\u901f\u521b\u5efaGUI\u5bf9\u8bdd\u6846\u3002\u4f8b\u5982\uff0c\u4f7f\u7528<code>choicebox<\/code>\u51fd\u6570\u6765\u8ba9\u7528\u6237\u4ece\u4e00\u4e2a\u5217\u8868\u4e2d\u9009\u62e9\u4e00\u4e2a\u9879\u76ee\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import easygui<\/p>\n<p>choices = [&quot;\u9009\u98791&quot;, &quot;\u9009\u98792&quot;, &quot;\u9009\u98793&quot;]<\/p>\n<p>choice = easygui.choicebox(&quot;\u8bf7\u9009\u62e9\u4e00\u9879\uff1a&quot;, choices=choices)<\/p>\n<p>easygui.msgbox(&quot;\u4f60\u9009\u62e9\u4e86: &quot; + str(choice), title=&quot;\u9009\u9879\u7ed3\u679c&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u63a2\u7d22EASYGUI\u7684\u9ad8\u7ea7\u529f\u80fd<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u57fa\u672c\u7684\u6d88\u606f\u6846\u3001\u8f93\u5165\u6846\u548c\u9009\u62e9\u6846\u4e4b\u5916\uff0cEasyGUI\u8fd8\u63d0\u4f9b\u4e86\u4e00\u7cfb\u5217\u66f4\u590d\u6742\u7684GUI\u5143\u7d20\u548c\u529f\u80fd\uff0c\u6bd4\u5982\u591a\u9009\u5bf9\u8bdd\u6846\u3001\u6587\u4ef6\u6d4f\u89c8\u6846\u7b49\u3002\u901a\u8fc7\u5b66\u4e60\u4f7f\u7528\u8fd9\u4e9b\u9ad8\u7ea7\u529f\u80fd\uff0c\u4f60\u53ef\u4ee5\u521b\u5efa\u66f4\u52a0\u4e30\u5bcc\u548c\u4ea4\u4e92\u5f0f\u7684GUI\u5e94\u7528\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u4f7f\u7528<code>multchoicebox<\/code>\u51fd\u6570\u5141\u8bb8\u7528\u6237\u4ece\u4e00\u4e2a\u5217\u8868\u4e2d\u9009\u62e9\u591a\u4e2a\u9879\u76ee\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import easygui<\/p>\n<p>choices = [&quot;\u9879\u76ee1&quot;, &quot;\u9879\u76ee2&quot;, &quot;\u9879\u76ee3&quot;, &quot;\u9879\u76ee4&quot;]<\/p>\n<p>selected = easygui.multchoicebox(&quot;\u8bf7\u9009\u62e9\u4efb\u610f\u591a\u9879\uff1a&quot;, choices=choices)<\/p>\n<p>easygui.msgbox(&quot;\u4f60\u9009\u62e9\u4e86: &quot; + str(selected), title=&quot;\u9009\u9879\u7ed3\u679c&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e94\u3001\u9047\u5230\u95ee\u9898\u65f6\u7684\u89e3\u51b3\u7b56\u7565<\/h3>\n<\/p>\n<p><p>\u5728\u5b89\u88c5\u6216\u4f7f\u7528EasyGUI\u8fc7\u7a0b\u4e2d\u53ef\u80fd\u4f1a\u9047\u5230\u5404\u79cd\u95ee\u9898\uff0c\u5982\u5b89\u88c5\u5931\u8d25\u3001\u51fd\u6570\u4e0d\u5de5\u4f5c\u7b49\u3002\u6b64\u65f6\uff0c\u67e5\u770bEasyGUI\u7684\u5b98\u65b9\u6587\u6863\u3001\u53c2\u8003Stack Overflow\u4e0a\u7684\u76f8\u5173\u95ee\u9898\u6216\u52a0\u5165Python\u793e\u533a\u8ba8\u8bba\u90fd\u662f\u5f88\u597d\u7684\u89e3\u51b3\u7b56\u7565\u3002<\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u786e\u4fddpip\u547d\u4ee4\u66f4\u65b0\u81f3\u6700\u65b0\u7248\u672c\uff0c\u6709\u65f6\u5b89\u88c5\u95ee\u9898\u4ec5\u4ec5\u662f\u56e0\u4e3apip\u8fc7\u65e7\u3002\u5176\u6b21\uff0c\u9605\u8bfb\u5b98\u65b9\u6587\u6863\u53ef\u4ee5\u5e2e\u52a9\u4f60\u7406\u89e3\u5404\u4e2a\u51fd\u6570\u7684\u7528\u6cd5\u548c\u53c2\u6570\u3002\u6700\u540e\uff0c\u52a0\u5165Python\u76f8\u5173\u7684\u5728\u7ebf\u793e\u533a\u6216\u8bba\u575b\uff0c\u90a3\u91cc\u6709\u8bb8\u591a\u7ecf\u9a8c\u4e30\u5bcc\u7684\u5f00\u53d1\u8005\u548c\u7231\u597d\u8005\u613f\u610f\u5e2e\u52a9\u89e3\u7b54\u4f60\u7684\u95ee\u9898\u3002<\/p>\n<\/p>\n<p><p>\u4ee5EasyGUI\u4e3a\u4f8b\uff0c\u5f00\u59cb\u4f60\u7684GUI\u7f16\u7a0b\u4e4b\u65c5\u4e0d\u4ec5\u53ef\u4ee5\u52a0\u6df1\u4f60\u5bf9Python\u7684\u7406\u89e3\uff0c\u540c\u65f6\u4e5f\u4e3a\u6df1\u5165\u5b66\u4e60\u5176\u4ed6\u66f4\u590d\u6742\u7684GUI\u6846\u67b6\u5982Tkinter\u3001PyQt\u7b49\u6253\u4e0b\u826f\u597d\u57fa\u7840\u3002Python\u793e\u533a\u4e30\u5bcc\u7684\u8d44\u6e90\u548c\u53cb\u597d\u7684\u6c1b\u56f4\u5c06\u52a9\u529b\u4f60\u5728\u7f16\u7a0b\u9053\u8def\u4e0a\u4e0d\u65ad\u524d\u8fdb\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>\u4ec0\u4e48\u662feasygui?<\/strong><br \/>\nEasygui\u662f\u4e00\u4e2apython\u5e93\uff0c\u7528\u4e8e\u521b\u5efa\u56fe\u5f62\u7528\u6237\u754c\u9762(GUI)\u5e94\u7528\u7a0b\u5e8f\u3002\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u7b80\u5355\u800c\u76f4\u89c2\u7684\u754c\u9762\uff0c\u4f7f\u5f97\u5f00\u53d1\u8005\u80fd\u591f\u8f7b\u677e\u5730\u521b\u5efa\u7528\u6237\u53cb\u597d\u7684\u7a0b\u5e8f\u3002<\/p>\n<p><strong>\u5982\u4f55\u5b89\u88c5easygui?<\/strong><br \/>\n\u8981\u5728Windows10\u4e0a\u5b89\u88c5easygui\uff0c\u60a8\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\uff1a<\/p>\n<ol>\n<li>\u9996\u5148\uff0c\u786e\u4fdd\u60a8\u7684\u8ba1\u7b97\u673a\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86Python\u89e3\u91ca\u5668\u3002\u5982\u679c\u5c1a\u672a\u5b89\u88c5\uff0c\u5219\u53ef\u4ee5\u4ecePython\u5b98\u65b9\u7f51\u7ad9\u4e0b\u8f7d\u5e76\u5b89\u88c5\u3002<\/li>\n<li>\u6253\u5f00\u547d\u4ee4\u63d0\u793a\u7b26\u7a97\u53e3\uff0c\u901a\u8fc7\u8fd0\u884c\u201cpip install easygui\u201d\u547d\u4ee4\u6765\u5b89\u88c5easygui\u3002pip\u662fPython\u7684\u5305\u7ba1\u7406\u5668\uff0c\u5b83\u4f1a\u81ea\u52a8\u4ecePython\u8f6f\u4ef6\u5305\u7d22\u5f15\u4e2d\u4e0b\u8f7d\u5e76\u5b89\u88c5easygui\u3002<\/li>\n<li>\u7b49\u5f85\u5b89\u88c5\u5b8c\u6210\u3002\u4e00\u65e6\u5b89\u88c5\u5b8c\u6210\uff0c\u60a8\u5c06\u80fd\u591f\u5728\u60a8\u7684\u4ee3\u7801\u4e2d\u4f7f\u7528easygui\u5e93\u6765\u521b\u5efaGUI\u5e94\u7528\u7a0b\u5e8f\u3002<\/li>\n<\/ol>\n<p><strong>\u5982\u4f55\u4f7f\u7528easygui\u521b\u5efaGUI\u5e94\u7528\u7a0b\u5e8f?<\/strong><br \/>\n\u4e00\u65e6\u60a8\u6210\u529f\u5b89\u88c5\u4e86easygui\uff0c\u60a8\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u4f7f\u7528\u5b83\u521b\u5efaGUI\u5e94\u7528\u7a0b\u5e8f\uff1a<\/p>\n<ol>\n<li>\u5bfc\u5165easygui\u6a21\u5757\u5230\u60a8\u7684Python\u4ee3\u7801\u4e2d\uff0c\u4f7f\u7528\u201cimport easygui\u201d\u8bed\u53e5\u3002<\/li>\n<li>\u4f7f\u7528easygui\u63d0\u4f9b\u7684\u51fd\u6570\u6765\u521b\u5efa\u7a97\u53e3\u3001\u6309\u94ae\u3001\u6587\u672c\u6846\u7b49GUI\u5143\u7d20\uff0c\u5e76\u8bbe\u7f6e\u5b83\u4eec\u7684\u5c5e\u6027\u548c\u4e8b\u4ef6\u5904\u7406\u7a0b\u5e8f\u3002<\/li>\n<li>\u5c06\u60a8\u7684\u4ee3\u7801\u4fdd\u5b58\u4e3a.py\u6587\u4ef6\uff0c\u5e76\u8fd0\u884c\u5b83\uff0c\u4ee5\u67e5\u770b\u60a8\u521b\u5efa\u7684GUI\u5e94\u7528\u7a0b\u5e8f\u7684\u6548\u679c\u3002<\/li>\n<\/ol>\n<p>\u5e0c\u671b\u4e0a\u8ff0\u4fe1\u606f\u5bf9\u60a8\u6709\u6240\u5e2e\u52a9\u3002\u5982\u679c\u60a8\u6709\u4efb\u4f55\u8fdb\u4e00\u6b65\u7684\u95ee\u9898\uff0c\u8bf7\u968f\u65f6\u63d0\u95ee\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5b89\u88c5EasyGUI\u5728Windows 10\u4e0a\u4e3b\u8981\u6d89\u53ca\u51e0\u4e2a\u7b80\u5355\u6b65\u9aa4\uff1a\u4e0b\u8f7dPython\u3001\u5b89\u88c5Python\u3001\u5b89\u88c5Eas [&hellip;]","protected":false},"author":3,"featured_media":309181,"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\/309170"}],"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=309170"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/309170\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/309181"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=309170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=309170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=309170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}