{"id":87,"date":"2018-08-16T20:08:35","date_gmt":"2018-08-16T12:08:35","guid":{"rendered":"http:\/\/172.81.211.114\/?p=87"},"modified":"2021-08-13T09:49:36","modified_gmt":"2021-08-13T01:49:36","slug":"python2-7wxpython4-0-1pyinstaller%e6%89%93%e5%8c%85%e7%9a%84%e6%ad%a3%e7%a1%ae%e7%94%a8%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.yinyubo.com\/?p=87","title":{"rendered":"python2.7-wxpython4.0.1-pyinstaller\u6253\u5305\u7684\u6b63\u786e\u7528\u6cd5"},"content":{"rendered":"<p>hi \u5404\u4f4d\u770b\u5b98\uff0c\u672c\u6587\u662f\u622a\u6b622018\u5e747\u67084\u65e5\uff0c\u57fa\u4e8epython2.7\u5f00\u53d1wxpython\u65f6\u7684\u6253\u5305\u6b63\u786e\u7528\u6cd5\u3002\uff082018\u5e7411\u670816\u65e5\uff0c\u53d1\u73b0pyinstall 3.4\u7248\u672c\u89e3\u51b3\u4e86\u8fd9\u4e2a\u95ee\u9898\u4e86\uff09<br \/>\n\u57511\uff1a<br \/>\nwxpython\u7684\u6700\u65b0\u7248\u672c\u4e3a4.0.3 \u4f46\u662f\u56e0\u4e3a4.0.3\u5f15\u5165\u4e86\u65b0\u7684pubsub 4.0 \u4e0d\u517c\u5bb9python2.7\u3002\u6240\u4ee5\u5982\u679c\u7528python2.7\u7684\u540c\u5b66\u5fc5\u987b\u964d\u7ea7\u5230wxpython 4.0.1\u7248\u672c<br \/>\n\u57512\uff1a<br \/>\n\u6253\u5305\u65b9\u9762\uff0c\u6211\u4eec\u53ef\u4ee5\u7528pyinstaller\u6253\u5305\u3002\u4f46\u662fpip\u4e0a\uff0cpyinstaller\u6700\u65b0\u7684\u7248\u672c\u662f3.3.1 \u7248\u672c\uff0c\u6b64\u7248\u672c\u4e0a\u6709bug\u00a0<span style=\"color: #00ccff;\"><a style=\"color: #00ccff;\" href=\"https:\/\/github.com\/pyinstaller\/pyinstaller\/issues\/2215\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">https:\/\/github.com\/pyinstaller\/pyinstaller\/issues\/2215<\/a><\/span><br \/>\n\u4f46\u662f\u540e\u671f\uff0cpyinstall\u7684\u4f5c\u8005\u4fee\u590d\u4e86\u6b64bug\u5728dev\u7248\u672c\u4e0a\uff0c\u6240\u4ee5\u6211\u4eec\u53ea\u6709\u53bbgithub\u4e0a \u5b89\u88c5\u6700\u65b0\u7684dev\u7248\u672c\u624d\u80fd\u6253\u5305\u6210\u529f<br \/>\n\u8e29\u5751\u8868\u73b0\uff1a<\/p>\n<pre class=\"lang:python decode:true  EnlighterJSRAW\" data-enlighter-language=\"golang\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">Traceback (most recent call last):\n  File \"&lt;string&gt;\", line 41, in &lt;module&gt;\n  File \"&lt;string&gt;\", line 36, in walk_packages\n  File \"&lt;string&gt;\", line 20, in walk_packages\n  File \"d:\\program files\\python\\python27\\lib\\site-packages\\wx-3.0-msw\\wx\\lib\\pubsub\\core\\arg1\\__init__.py\", line 16, in &lt;module&gt;\n    raise RuntimeError(msg)\nRuntimeError: Should not import this directly, used by pubsub.core if applicable<\/code><\/pre>\n<p>\u51fa\u73b0pubsub\u62a5\u9519\uff0c\u56e0\u4e3awxpython 2.8.0\u4e4b\u524d\u7684\u7248\u672c\u7528\u7684\u662f\\core\\arg1\\ \u6240\u4ee5\u4e3a\u4e86\u80fd\u987a\u5229\u6253\u5305\uff0c\u6211\u4eec\u8981\u8fdb\u884c\u5982\u4e0b\u64cd\u4f5c\uff1a<br \/>\n\u586b\u5751\u65b9\u6cd5\uff1a<br \/>\n1.pip\u88c5wxpython 4.0.1\u7248\u672c<\/p>\n<pre class=\"lang:python decode:true \"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">pip install wxpython==4.0.1\n<\/code><\/pre>\n<p>2.pip\u88c5dev\u7248\u672cpyinstaller<\/p>\n<pre class=\"lang:python decode:true\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\"> pip install git+https:\/\/github.com\/pyinstaller\/pyinstaller<\/code><\/pre>\n<p>3.\u91cd\u65b0\u6253\u5305\u4e3b\u5165\u53e3main.py<\/p>\n<pre class=\"lang:python decode:true\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"golang\">pyinstaller -D main.py\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>hi \u5404\u4f4d\u770b\u5b98\uff0c\u672c\u6587\u662f\u622a\u6b622018\u5e747\u67084\u65e5\uff0c\u57fa\u4e8epython2.7\u5f00\u53d1wxpython\u65f6\u7684\u6253\u5305\u6b63\u786e\u7528\u6cd5\u3002\uff082 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[12],"class_list":["post-87","post","type-post","status-publish","format-standard","hentry","category-python","tag-wxpython"],"_links":{"self":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/87","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=87"}],"version-history":[{"count":1,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/87\/revisions"}],"predecessor-version":[{"id":961,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=\/wp\/v2\/posts\/87\/revisions\/961"}],"wp:attachment":[{"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=87"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=87"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yinyubo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=87"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}