{"id":17534,"date":"2023-04-14T16:52:08","date_gmt":"2023-04-14T08:52:08","guid":{"rendered":"https:\/\/www.yimenapp.com\/kb-yimen\/17534\/"},"modified":"2023-04-14T16:52:08","modified_gmt":"2023-04-14T08:52:08","slug":"ais4%e8%bd%ac%e6%88%90exe%e6%98%af%e4%bb%80%e4%b9%88%e6%84%8f%e6%80%9d%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/www.yimenapp.com\/kb-yimen\/17534\/","title":{"rendered":"ais4\u8f6c\u6210exe\u662f\u4ec0\u4e48\u610f\u601d\uff1f"},"content":{"rendered":"<p>AIS4\u662f\u4e00\u79cd\u57fa\u4e8ePython\u8bed\u8a00\u5f00\u53d1\u7684\u4eba\u5de5\u667a\u80fd\u7cfb\u7edf\uff0c\u5b83\u53ef\u4ee5\u5b9e\u73b0\u81ea\u7136\u8bed\u8a00\u5904\u7406\u3001\u673a\u5668\u5b66\u4e60\u3001\u6570\u636e\u5206\u6790\u7b49\u591a\u79cd\u529f\u80fd\u3002\u4f46\u662f\uff0cAIS4\u7684\u4ee3\u7801\u662f\u4ee5.<a href=\"https:\/\/exe.yimenapp.com\/tool-3973.html\">\u6253\u5305html\u4e3aexe<\/a>py<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/%e6%96%87%e4%bb%b6\/\" title=\"\u6587\u4ef6\" target=\"_blank\">\u6587\u4ef6<\/a><\/span>\u7684\u5f62\u5f0f\u5b58\u5728\u7684\uff0c\u5982\u679c\u8981\u5728\u6ca1\u6709\u5b89\u88c5Python\u73af\u5883\u7684\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884cAIS4\uff0c\u5c31\u9700\u8981\u5c06.py\u6587\u4ef6\u8f6c\u6362\u4e3a<a href=\"https:\/\/exe.yimenapp.com\/tool-3431.html\">windows\u5e94\u7528\u7a0b\u5e8f\u6253\u5305<\/a>.<span class=\"wpcom_keyword_link\"><a href=\"https:\/\/exe.yimenapp.com\" title=\"exe\u5f00\u53d1\u4ece\u4e00\u95e8\u5f00\u59cb\">exe<\/a><\/span>\u6587\u4ef6\u3002<\/p>\n<p>\u5c06.py\u6587\u4ef6\u8f6c\u6362\u4e3a.exe\u6587\u4ef6\u7684\u8fc7\u7a0b\u79f0\u4e3a\u6253\u5305\uff0c\u6253\u5305\u540e\u7684.exe\u6587\u4ef6\u53ef\u4ee5\u5728\u6ca1\u6709\u5b89\u88c5Python\u73af\u5883\u7684\u8ba1\u7b97\u673a\u4e0a\u76f4\u63a5\u8fd0\u884c\uff0c\u65e0\u9700\u518d\u6b21\u5b89\u88c5Python\u73af\u5883\u3002\u4e0b\u9762\u4ecb\u7ecd\u4e24\u79cd\u5e38\u89c1\u7684\u6253\u5305\u65b9\u5f0f\u3002<\/p>\n<p>1. PyInstaller<\/p>\n<p>PyInstaller\u662f\u4e00\u79cd\u5e38\u89c1\u7684Python\u6253\u5305\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u6253\u5305\u6210\u72ec\u7acb\u7684<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/%e5%8f%af%e6%89%a7%e8%a1%8c%e6%96%87%e4%bb%b6\/\" title=\"\u53ef\u6267\u884c\u6587\u4ef6\" target=\"_blank\">\u53ef\u6267\u884c\u6587\u4ef6<\/a><\/span>\u3002\u4e0b\u9762\u4ecb\u7ecd\u4f7f\u7528PyInstaller\u5c06AIS4\u6253\u5305\u6210.exe\u6587\u4ef6\u7684<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/%e6%ad%a5%e9%aa%a4\/\" title=\"\u6b65\u9aa4\" target=\"_blank\">\u6b65\u9aa4<\/a><\/span>\u3002<\/p>\n<p>\u6b65\u9aa4\u4e00\uff1a\u5b89\u88c5PyInstaller<\/p>\n<p>\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5PyInstaller\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>pip install pyinstaller<\/p>\n<p>&#8220;`<\/p>\n<p>\u6b65\u9aa4\u4e8c\uff1a\u6253\u5305AIS4<\/p>\n<p>\u5728\u547d\u4ee4\u884c\u4e2d\u8fdb\u5165AIS4\u6240\u5728\u7684\u76ee\u5f55\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u6253\u5305\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>pyinstaller -F -w AIS4.py<\/p>\n<p>&#8220;`<\/p>\n<p>\u5176\u4e2d\uff0c-F\u53c2\u6570\u8868\u793a\u751f\u6210\u5355\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff0c-w\u53c2\u6570\u8868\u793a\u4e0d\u663e\u793a\u547d\u4ee4\u884c\u7a97\u53e3\u3002<\/p>\n<p>\u6253\u5305\u5b8c\u6210\u540e\uff0c\u5728dist\u76ee\u5f55\u4e0b\u4f1a\u751f\u6210\u4e00\u4e2aAIS4.exe\u6587\u4ef6\uff0c\u8fd9\u4e2a\u6587\u4ef6\u5c31\u662f\u6211\u4eec\u9700\u8981\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<p>2. cx_Freeze<\/p>\n<p>cx_Freeze\u4e5f\u662f\u4e00\u79cd\u5e38\u89c1\u7684Python\u6253\u5305\u5de5\u5177\uff0c\u5b83\u53ef\u4ee5\u5c06Python\u4ee3\u7801\u6253\u5305\u6210\u72ec\u7acb\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002\u4e0b\u9762\u4ecb\u7ecd\u4f7f\u7528cx_<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.cdn.yimenapp.com\/2023-03\/17\/14\/21996275961.jpg\" \/><\/figure><\/p>\n<p>Freeze\u5c06AIS4\u6253\u5305\u6210.exe\u6587\u4ef6\u7684\u6b65\u9aa4\u3002<\/p>\n<p>\u6b65\u9aa4\u4e00\uff1a\u5b89\u88c5cx_Freeze<\/p>\n<p>\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5cx_Freeze\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>pip install cx_Freeze<\/p>\n<p>&#8220;`<\/p>\n<p>\u6b65\u9aa4\u4e8c\uff1a\u521b\u5efasetup.py\u6587\u4ef6<\/p>\n<p>\u5728AIS4\u6240\u5728\u7684\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u540d\u4e3asetup.py\u7684\u6587\u4ef6\uff0c\u5e76\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>from cx_Freeze import setup, Executable<\/p>\n<p>setup(name=&#8217;AIS4&#8242;,<\/p>\n<p>      version=&#8217;1.0&#8242;,<\/p>\n<p>      description=&#8217;AIS4&#8242;,<\/p>\n<p>      executables=[Executable(&#8216;AIS4.py&#8217;)])<\/p>\n<p>&#8220;`<\/p>\n<p>\u6b65\u9aa4\u4e09\uff1a\u6253\u5305AIS4<\/p>\n<p>\u5728\u547d\u4ee4\u884c\u4e2d\u8fdb\u5165AIS4\u6240\u5728\u7684\u76ee\u5f55\uff0c\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u6253\u5305\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>python setup.py build<\/p>\n<p>&#8220;`<\/p>\n<p>\u6253\u5305\u5b8c\u6210\u540e\uff0c\u5728build\u76ee\u5f55\u4e0b\u4f1a\u751f\u6210\u4e00\u4e2aexe.win-amd64-3.7\u76ee\u5f55\uff0c\u8fdb\u5165\u8be5\u76ee\u5f55\u53ef\u4ee5\u627e\u5230AIS4.exe\u6587\u4ef6\uff0c\u8fd9\u4e2a\u6587\u4ef6\u5c31\u662f\u6211\u4eec\u9700\u8981\u7684\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<p>\u603b\u7ed3<\/p>\n<p>\u4ee5\u4e0a\u4ecb\u7ecd\u4e86\u4e24\u79cd\u5e38\u89c1\u7684Python\u6253\u5305\u5de5\u5177PyInstaller\u548ccx_Freeze\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u901a\u8fc7\u8fd9\u4e24\u79cd\u5de5\u5177\u53ef\u4ee5\u5c06AIS4.py\u6587\u4ef6\u6253\u5305\u6210\u53ef\u6267\u884c\u6587\u4ef6AIS4.exe\uff0c\u65b9\u4fbf\u5728\u6ca1\u6709\u5b89\u88c5Python\u73af\u5883\u7684\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884cAIS4\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>AIS4\u662f\u4e00\u79cd\u57fa\u4e8ePython\u8bed\u8a00\u5f00\u53d1\u7684\u4eba\u5de5\u667a\u80fd\u7cfb\u7edf\uff0c\u5b83\u53ef\u4ee5\u5b9e\u73b0\u81ea\u7136\u8bed\u8a00\u5904\u7406\u3001\u673a\u5668\u5b66\u4e60\u3001\u6570\u636e\u5206\u6790\u7b49\u591a\u79cd\u529f\u80fd\u3002\u4f46\u662f\uff0cAIS4\u7684\u4ee3\u7801\u662f\u4ee5.py\u6587\u4ef6\u7684\u5f62\u5f0f\u5b58\u5728\u7684\uff0c\u5982\u679c\u8981\u5728\u6ca1\u6709\u5b89\u88c5Python\u73af\u5883\u7684\u8ba1\u7b97\u673a\u4e0a<\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[294,9383,8878,2708,2815],"special":[],"attr":[],"class_list":["post-17534","post","type-post","status-publish","format-standard","hentry","category-zixun","tag-exekaifa","tag-mac","tag-8878","tag-2708","tag-2815","entry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/17534","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/comments?post=17534"}],"version-history":[{"count":0,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/17534\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/media?parent=17534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/categories?post=17534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/tags?post=17534"},{"taxonomy":"special","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/special?post=17534"},{"taxonomy":"attr","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/attr?post=17534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}