{"id":13406,"date":"2023-12-25T15:44:00","date_gmt":"2023-12-25T07:44:00","guid":{"rendered":"https:\/\/www.yimenyun.cn\/emen\/?p=13406"},"modified":"2023-12-25T15:44:00","modified_gmt":"2023-12-25T07:44:00","slug":"thonny%e6%89%93%e5%8c%85exe%e6%93%8d%e4%bd%9c%e6%b5%81%e7%a8%8b%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/www.yimenyun.cn\/emen\/13406\/","title":{"rendered":"thonny\u6253\u5305exe\u64cd\u4f5c\u6d41\u7a0b\u4ecb\u7ecd"},"content":{"rendered":"

Thonny\u662f\u4e00\u6b3ePython IDE\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u65b9\u4fbf\u7684\u6253\u5305\u5de5\u5177\uff0c\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u6253\u5305\u6210exe\u6587\u4ef6\u3002\u8fd9\u4f7f\u5f97Python\u7a0b\u5e8f\u53ef\u4ee5\u5728\u6ca1\u6709Python\u73af\u5883\u7684\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884c\uff0c\u800c\u65e0\u9700\u5b89\u88c5Python\u89e3\u91ca\u5668\u3002\u5728\u672c\u6587\u4e2d\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528Thonny\u6253\u5305Python\u7a0b\u5e8f\u6210exe\u6587\u4ef6\u3002<\/p>\n

1. \u5b89\u88c5Thonny<\/p>\n

\u9996\u5148\uff0c\u4f60\u9700\u8981\u5b89\u88c5Thonny\u3002\u4f60\u53ef\u4ee5\u5728\u5b98\u65b9\u7f51\u7ad9\u4e0a\u4e0b\u8f7d\u9002\u5408\u4f60\u64cd\u4f5c\u7cfb\u7edf\u7684\u7248\u672c\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u542f\u52a8Thonny\u3002<\/p>\n

2. \u7f16\u5199Python\u7a0b\u5e8f<\/p>\n

\u5728Thonnwindows\u5982\u4f55\u6253\u5305<\/a>y\u4e2d\u7f16\u5199\u4f60\u7684Python\u7a0b\u5e8f\u3002\u786e\u4fdd\u4f60\u7684\u7a0b\u5e8f\u53ef\u4ee5\u5728Thonny\u4e2d\u6b63\u5e38\u8fd0\u884c\u3002\u5982\u679c\u4f60\u9700\u8981\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\uff0c\u4f60\u9700\u8981\u5728\u4f60\u7684\u7a0b\u5e8f\u4e2d\u5bfc\u5165\u5b83\u4eec\uff0c\u786e\u4fdd\u5b83\u4eec\u53ef\u4ee5\u6b63\u5e38\u5de5\u4f5c\u3002<\/p>\n

3. \u5b89\u88c5pyinstaller<\/p>\n

\u6253\u5305exe\u6587\u4ef6\u9700\u8981\u4f7f\u7528pyinstaller\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528pip\u547d\u4ee4\u6765\u5b89\u88c5\u5b83\u3002\u5728Thonny\u4e2d\u6253\u5f00\u7ec8\u7aef\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n

“`<\/p>\n

pip install pyinstaller<\/p>\n

“`<\/p>\n

4. \u6253\u5305Python\u7a0b\u5e8f<\/p>\n

\u5728Thonny\u4e2d\u6253\u5f00\u4f60\u7684Python\u7a0b\u5e8f\uff0c\u5e76\u70b9\u51fb\u83dc\u5355\u680f\u4e2d\u7684\u201cTools\u201d\u9009\u9879\uff0c\u9009\u62e9\u201cMake Standalone Executable\u201d\u3002<\/p>\n

\u5728\u5f39\u51fa\u7684\u5bf9\u8bdd\u6846\u4e2d\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9exe\u6587\u4ef6\u7684\u8f93\u51fa\u8def\u5f84\u548c\u540d\u79f0\uff0c\u4f60\u53ef\u4ee5\u8c03\u6574\u4e00\u4e9b\u9009\u9879\uff0c\u4f8b\u5982\u662f\u5426\u9690\u85cf\u63a7\u5236\u53f0\u7a97\u53e3\u3002\u70b9\u51fb\u201cCreate\u201d\u6309\u94ae\u5f00\u59cb\u6253\u5305\u3002<\/p>\n

5. \u8fd0\u884cexe\u6587\u7535\u8111\u600e\u4e48\u6253\u5305\u8f6f\u4ef6<\/a>\u4ef6<\/p>\n

\u6253\u5305\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\u6307\u5b9a\u7684\u8f93\u51fa\u8def\u5f84\u4e2d\u627e\u5230exe\u6587\u4ef6\u3002\u5c06exe\u6587\u4ef6\u590d\u5236\u5230\u6ca1\u6709Python\u73af\u5883\u7684\u8ba1\u7b97\u673a\u4e0a\uff0c\u53cc<\/p>\n

<\/figure>\n<\/p>\n

\u51fb\u8fd0\u884c\u5373\u53ef\u3002<\/p>\n

\u603b\u7ed3<\/p>\n

Thonny\u63d0\u4f9b\u4e86\u4e00\u4e2a\u65b9\u4fbf\u7684\u6253\u5305\u5de5\u5177\uff0c\u53ef\u4ee5\u5c06Python\u7a0b\u5e8f\u6253\u5305\u6210exe\u6587\u4ef6\uff0c\u4f7f\u5f97\u7a0b\u5e8f\u53ef\u4ee5\u5728\u6ca1\u6709Python\u73af\u5883\u7684\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884c\u3002\u6253\u5305\u8fc7\u7a0b\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u8981\u51e0\u4e2a\u6b65\u9aa4\u5373\u53ef\u5b8c\u6210\u3002\u5982\u679c\u4f60\u662f\u4e00\u4e2aPython\u7a0b\u5e8f\u5458\uff0c\u5efa\u8bae\u4f60\u5c1d\u8bd5\u4f7f\u7528Thonny\u6253\u5305\u4f60\u7684\u7a0b\u5e8f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

Thonny\u662f\u4e00\u6b3ePython IDE\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2a\u65b9\u4fbf\u7684\u6253\u5305\u5de5\u5177\uff0c\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u6253\u5305\u6210exe\u6587\u4ef6\u3002\u8fd9\u4f7f\u5f97Python\u7a0b\u5e8f\u53ef\u4ee5\u5728\u6ca1\u6709Python\u73af\u5883\u7684\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884c\uff0c\u800c\u65e0\u9700\u5b89\u88c5Python\u89e3\u91ca<\/p>\n","protected":false},"author":9,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[2377,27,18086,16,89],"topic":[],"class_list":["post-13406","post","type-post","status-publish","format-standard","hentry","category-exekf","tag-windows","tag-27","tag-exe","tag-16","tag-89"],"_links":{"self":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/13406","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/comments?post=13406"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/13406\/revisions"}],"predecessor-version":[{"id":13497,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/posts\/13406\/revisions\/13497"}],"wp:attachment":[{"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/media?parent=13406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/categories?post=13406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/tags?post=13406"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.yimenyun.cn\/emen\/wp-json\/wp\/v2\/topic?post=13406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}