{"id":40041,"date":"2026-01-06T15:39:25","date_gmt":"2026-01-06T07:39:25","guid":{"rendered":"https:\/\/www.appbyme.cn\/myapp\/?p=40041"},"modified":"2026-01-06T15:39:25","modified_gmt":"2026-01-06T07:39:25","slug":"%e5%8f%af%e4%bb%a5%e5%88%b6%e4%bd%9cexe%e7%a8%8b%e5%ba%8f%e7%9a%84%e8%bd%af%e4%bb%b6%e6%8e%a8%e8%8d%90%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.appbyme.cn\/myapp\/2026\/40041\/","title":{"rendered":"\u53ef\u4ee5\u5236\u4f5cexe\u7a0b\u5e8f\u7684\u8f6f\u4ef6\u63a8\u8350\uff1f"},"content":{"rendered":"<p>\u5236\u4f5cexe\u7a0b\u5e8f\u662f\u4e00\u9879\u975e\u5e38\u91cd\u8981\u7684\u4efb\u52a1\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u5c06\u4f60\u7684\u4ee3\u7801\u8f6c\u5316\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u65b9\u4fbf\u5176\u4ed6\u4eba\u4f7f\u7528\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u4e00\u4e9b\u53ef\u4ee5\u7528\u6765\u5236\u4f5cexe\u7a0b\u5e8f\u7684\u8f6f\u4ef6\uff0c\u5e76\u4e14\u4f1a\u8be6\u7ec6\u4ecb\u7ecd\u5b83\u4eec\u7684\u539f\u7406\u548c\u4f7f\u7528\u65b9\u6cd5\u3002<\/p>\n<p>1. PyInstaller<\/p>\n<p>PyInstaller\u662f\u4e00\u4e2a\u514d\u8d39\u7684\u5f00\u6e90\u8f6f\u4ef6\uff0c\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002\u5b83\u652f\u6301Windows\u3001Mac OS X\u548cLinux\u7b49\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5e76\u4e14\u53ef\u4ee5\u5c06Python\u7a0b\u5e8f\u6253\u5305\u6210\u5355\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u65b9\u4fbf\u5176\u4ed6\u4eba\u4f7f\u7528\u3002<\/p>\n<p>\u4f7f\u7528PyInstaller\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\uff0c\u8f93\u5165\u201cpip install pyinstaller\u201d\u5b89\u88c5PyInstaller\uff0c\u7136\u540e\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u201cpyinstaller yourscript.py\u201d\u5373\u53ef\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<p>2. cx_Freeze<\/p>\n<p>cx_Freeze\u662f\u53e6\u4e00\u4e2a\u514d\u8d39\u7684\u5f00\u6e90\u8f6f\u4ef6\uff0c\u4e5f\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002\u5b83\u652f\u6301Windows\u3001Mac OS X\u548cLinux\u7b49\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5e76\u4e14\u53ef\u4ee5\u5c06Python\u7a0b\u5e8f\u6253\u5305\u6210\u5355\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u6216\u591a\u4e2a\u6587\u4ef6\u3002<\/p>\n<p>\u4f7f\u7528cx_Freeze\u4e5f\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\uff0c\u8f93\u5165\u201cpip install cx_Freeze\u201d\u5b89\u88c5cx_Freeze\uff0c\u7136\u540e\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u201cpython setup.py build\u201d\u5373\u53ef\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<p>3. Py2exe<\/p>\n<p>Py2exe\u662f\u4e00\u4e2a\u514d\u8d39\u7684\u5f00\u6e90\u8f6f\u4ef6\uff0c\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002\u5b83\u53ea\u652f\u6301Windows\u64cd\u4f5c\u7cfb\u7edf\uff0c\u5e76\u4e14\u53ef\u4ee5\u5c06Python\u7a0b\u5e8f\u6253\u5305\u6210\u5355\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<p>\u4f7f\u7528Py2exe\u4e5f\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u6253\u5f00\u547d\u4ee4\u884c\u7a97\u53e3\uff0c\u8f93\u5165\u201cpip install py2exe\u201d\u5b89\u88c5Py2exe\uff0c\u7136\u540e\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u201cpython set<a href=\"https:\/\/exe.yimenapp.com\/tool-2469.html\">win\u5e94\u7528\u5f00\u53d1<\/a>up.py py2exe\u201d\u5373\u53ef\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<p>4. AutoPyToExe<\/p>\n<p>AutoPyToExe\u662f\u4e00\u4e2a\u514d\u8d39\u7684\u5f00\u6e90\u8f6f\u4ef6\uff0c\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002\u5b83\u652f\u6301Windows\u3001Mac OS X\u548cLinux\u7b49\u64cd\u4f5c\u7cfb<a href=\"https:\/\/exe.yimenapp.com\/tool-902.html\">windows\u64cd\u4f5c\u7cfb\u7edf\u662f\u600e\u6837\u5f00\u53d1\u7684<\/a>\u7edf\uff0c\u5e76\u4e14\u53ef\u4ee5\u5c06Python\u7a0b\u5e8f\u6253\u5305\u6210\u5355\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\u6216\u591a\u4e2a\u6587\u4ef6\u3002<\/p>\n<p>\u4f7f\u7528AutoPyToExe\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u6253\u5f00\u8f6f\u4ef6\uff0c\u9009\u62e9\u8981\u8f6c\u6362\u7684Python\u6587\u4ef6\u548c\u8f93\u51fa\u6587\u4ef6\u5939\uff0c\u7136\u540e\u70b9\u51fb\u201cConvert\u201d\u6309\u94ae\u5373\u53ef\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<p>\u603b\u7ed3<\/p>\n<p>\u4ee5\u4e0a<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.yimenyun.net\/2023-03\/24\/13\/20169472312.jpg\" \/><\/figure>\n<\/p>\n<p>\u5c31\u662f\u51e0\u4e2a\u53ef\u4ee5\u7528\u6765\u5236\u4f5cexe\u7a0b\u5e8f\u7684\u8f6f\u4ef6\uff0c\u5b83\u4eec\u90fd\u975e\u5e38\u7b80\u5355\u6613\u7528\uff0c\u53ef\u4ee5\u8ba9\u4f60\u5c06Python\u4ee3\u7801\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u65b9\u4fbf\u5176\u4ed6\u4eba\u4f7f\u7528\u3002\u5982\u679c\u4f60\u9700\u8981\u5236\u4f5cexe\u7a0b\u5e8f\uff0c\u53ef\u4ee5\u9009\u62e9\u5176\u4e2d\u4e00\u4e2a\u8f6f\u4ef6\u8fdb\u884c\u5c1d\u8bd5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5236\u4f5cexe\u7a0b\u5e8f\u662f\u4e00\u9879\u975e\u5e38\u91cd\u8981\u7684\u4efb\u52a1\uff0c\u56e0\u4e3a\u5b83\u53ef\u4ee5\u5c06\u4f60\u7684\u4ee3\u7801\u8f6c\u5316\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u65b9\u4fbf\u5176\u4ed6\u4eba\u4f7f\u7528\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u4ecb\u7ecd\u4e00\u4e9b\u53ef\u4ee5\u7528\u6765\u5236\u4f5cexe\u7a0b\u5e8f\u7684\u8f6f\u4ef6\uff0c\u5e76\u4e14\u4f1a\u8be6\u7ec6\u4ecb\u7ecd\u5b83\u4eec\u7684\u539f\u7406\u548c\u4f7f\u7528\u65b9\u6cd5\u30021. PyIn<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[104,1524,92,30741,432],"topic":[],"class_list":{"0":"post-40041","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-diannao","7":"tag-104","8":"tag-exe","9":"tag-92","11":"tag-432"},"_links":{"self":[{"href":"https:\/\/www.appbyme.cn\/myapp\/wp-json\/wp\/v2\/posts\/40041","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appbyme.cn\/myapp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appbyme.cn\/myapp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appbyme.cn\/myapp\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appbyme.cn\/myapp\/wp-json\/wp\/v2\/comments?post=40041"}],"version-history":[{"count":1,"href":"https:\/\/www.appbyme.cn\/myapp\/wp-json\/wp\/v2\/posts\/40041\/revisions"}],"predecessor-version":[{"id":40046,"href":"https:\/\/www.appbyme.cn\/myapp\/wp-json\/wp\/v2\/posts\/40041\/revisions\/40046"}],"wp:attachment":[{"href":"https:\/\/www.appbyme.cn\/myapp\/wp-json\/wp\/v2\/media?parent=40041"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appbyme.cn\/myapp\/wp-json\/wp\/v2\/categories?post=40041"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appbyme.cn\/myapp\/wp-json\/wp\/v2\/tags?post=40041"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.appbyme.cn\/myapp\/wp-json\/wp\/v2\/topic?post=40041"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}