{"id":81026,"date":"2026-07-13T12:17:34","date_gmt":"2026-07-13T04:17:34","guid":{"rendered":"https:\/\/www.yimenapp.com\/kb-yimen\/?p=81026"},"modified":"2026-07-13T12:17:34","modified_gmt":"2026-07-13T04:17:34","slug":"jupyter%e6%89%93%e5%8c%85exe%e5%8a%9e%e6%b3%95%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/www.yimenapp.com\/kb-yimen\/81026\/","title":{"rendered":"jupyter\u6253\u5305exe\u529e\u6cd5\u4ecb\u7ecd"},"content":{"rendered":"<p>\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u4e86\u89e3\u5982\u4f55\u5c06Jupyter\u7b14\u8bb0\u672c\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u6267\u884c<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>\uff08.<span class=\"wpcom_keyword_link\"><a href=\"https:\/\/exe.yimenapp.com\" title=\"exe\u5f00\u53d1\u4ece\u4e00\u95e8\u5f00\u59cb\">exe<\/a><\/span>\uff09\u3002\u8fd9\u53ef\u4ee5\u8ba9\u6ca1\u6709Python\u6216Jupyter\u73af\u5883\u7684\u7528\u6237\u4ecd\u7136\u80fd\u591f\u9605\u8bfb\u3001\u8fd0\u884c\u548c\u4f7f\u7528\u6211\u4eec\u7684\u4ee3\u7801\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u4e00\u4e2a\u540d\u4e3aPyInstaller\u7684\u5de5\u5177\u5c06.ipynb\u6587\u4ef6<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/%e8%bd%ac%e6%8d%a2%e4%b8%ba\/\" title=\"\u8f6c\u6362\u4e3a\" target=\"_blank\">\u8f6c\u6362\u4e3a<\/a><\/span>\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u786e\u4fdd\u5b8c\u6210\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n<p>1. \u5b89\u88c5PyInstaller\uff1a\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u4ee5\u5b89\u88c5PyInstaller\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>pip install pyinstaller<\/p>\n<p>&#8220;`<\/p>\n<p>2. \u5c06Jupyter\u7b14\u8bb0\u672c\u8f6c\u6362\u4e3a<\/p>\n<p><figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/i.yimenyun.net\/2023-03\/15\/14\/10501301388.jpg\" \/><\/figure><\/p>\n<p>Python<span class=\"wpcom_tag_link\"><a href=\"https:\/\/www.yimenapp.com\/kb-yimen\/tag\/jiaoben\/\" title=\"\u811a\u672c\" target=\"_blank\">\u811a\u672c<\/a><\/span>\uff1a\u6211\u4eec\u9700\u8981\u5c06Jupyter\u7b14\u8bb0\u672c\uff08.ipynb\u6587\u4ef6\uff09\u8f6c\u6362\u4e3a\u5355\u4e2aPython\u811a\u672c\uff08.py\u6587\u4ef6\uff09\u3002\u4e3a\u6b64\uff0c\u8bf7\u5728\u547d\u4ee4\u884c\u4e2d\u5bfc\u822a\u5230\u5305\u542b.ipynb\u6587\u4ef6\u7684\u6587\u4ef6\u5939\uff0c\u7136\u540e\u8fd0\u884c\uff1a<\/p>\n<p>&#8220;`<\/p>\n<p>jupyter nbconvert &#8211;to script your_notebook_name.ipynb<\/p>\n<p>&#8220;`<\/p>\n<p>3. \u4fee\u6539Python\u811a\u672c\uff0c\u4f7f\u5176\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884c\uff08\u53ef\u9009\uff09\uff1a\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u8f6c\u6362<a href=\"https:\/\/exe.yimenapp.com\/tool-2194.html\">exe\u8f6c\u6362avi<\/a>\u540e\u7684Python\u811a\u672c\u4e0d\u4f1a\u81ea\u52a8\u663e\u793amatplotlib\u6216\u5176\u4ed6\u5e93\u751f\u6210\u7684\u56fe\u50cf\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u4eec\u53ef\u4ee5\u5728\u811a\u672c\u7684\u672b\u5c3e\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<p>&#8220;`python<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<p>plt.show()<\/p>\n<p>&#8220;`<\/p>\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u4f7f\u7528PyInstaller\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\uff1a<\/p>\n<p>4. \u6253\u5305Python\u811a\u672c\uff1a\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff0c\u5c06Python\u811a\u672c\u8f6c\u6362\u4e3a\u53ef\u6267\u884c\u6587\u4ef6\u3002<\/p>\n<p>&#8220;`<\/p>\n<p>pyinstaller &#8211;onefile your_script_name.py<\/p>\n<p>&#8220;`<\/p>\n<p>\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c`&#8211;onefile`\u53c2\u6570\u610f\u5473\u7740PyInstaller\u4f1a\u5c1d\u8bd5\u5c06\u6240\u6709\u4f9d\u8d56\u9879\u6253\u5305\u5230\u4e00\u4e2aexe\u6587\u4ef6\u4e2d\u3002<\/p>\n<p>5. \u83b7\u53d6\u4f60\u7684.exe\u6587\u4ef6\uff1a\u6253\u5305\u5b8c\u6210\u540e\uff0c\u4f60\u53ef\u4ee5\u5728\/dist\u5b50\u76ee\u5f55\u4e2d\u627e\u5230\u751f\u6210\u7684.exe\u6587\u4ef6\u3002\u5c06\u6b64\u6587\u4ef6\u4e0e\u5176\u4ed6\u4f9d\u8d56\u9879\u4e00\u8d77\u63d0\u4f9b\u7ed9\u7528\u6237\uff0c\u5373\u53ef\u8f7b\u677e\u5206\u4eab\u4f60\u7684Jupyter\u7b14\u8bb0\u672c\uff01<\/p>\n<p>6. \u6563\u53d1\u5b8c\u6574\u5e94\u7528\u7a0b\u5e8f\uff1a\u8981\u5728\u6ca1\u6709Python\u73af\u5883\u7684\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884c\u6b64\u7a0b\u5e8f\uff0c\u6211\u4eec\u53ea\u9700\u786e\u4fdd\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5\u4e86\u5fc5\u8981\u7684\u7cfb\u7edf\u8fd0\u884c\u5e93\u3002<a href=\"https:\/\/www.yimenexe.com\/exe-kaifa-2664.html\">\u7528html\u5f00\u53d1exe<\/a>\u8fd9\u662f\u56e0\u4e3aPyInstaller\u4f1a\u81ea\u52a8\u6253\u5305Python\u8fd0\u884c\u65f6\u548c\u76f8\u5173\u5e93\u3002\u4eca\u540e\uff0c\u522b\u4eba\u5c31\u53ef\u4ee5\u5728\u4ed6\u4eec\u7684\u8ba1\u7b97\u673a\u4e0a\u8fd0\u884c\u4f60\u7684\u7a0b\u5e8f\u4e86\u3002<\/p>\n<p>\u603b\u7ed3\uff1a\u6211\u4eec\u5df2\u7ecf\u4e86\u89e3\u4e86\u5982\u4f55\u5c06Jupyter\u7b14\u8bb0\u672c\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u4ee5\u4fbf\u4ed6\u4eba\u53ef\u4ee5\u5728\u4e0d\u62e5\u6709Python\u548cJupyter\u73af\u5883\u7684\u60c5\u51b5\u4e0b\u8fd0\u884c\u6211\u4eec\u7684\u4ee3\u7801\u548c\u67e5\u770b\u7b14\u8bb0\u672c\u5185\u5bb9\u3002\u901a\u8fc7\u4f7f\u7528PyInstaller\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06.ipynb\u6587\u4ef6\u8f6c\u6362\u4e3a.exe\u6587\u4ef6\uff0c\u4f7f\u5176\u66f4\u5bb9\u6613\u8fdb\u884c\u5206\u4eab\u548c\u4f7f\u7528\u3002<\/p>\n<p>\u5982\u679c\u5728\u6253\u5305\u65f6\u9047\u5230\u4e86\u95ee\u9898\uff0c\u5efa\u8bae\u67e5\u9605PyInstaller\u7684\u6587\u6863\u5e76\u641c\u7d22\u76f8\u5173\u9519\u8bef\u4fe1\u606f\uff0c\u4ee5\u4fbf\u627e\u5230\u89e3\u51b3\u65b9\u6cd5\u3002\u795d\u4f60\u6210\u529f\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u4e86\u89e3\u5982\u4f55\u5c06Jupyter\u7b14\u8bb0\u672c\u6253\u5305\u6210\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff08.exe\uff09\u3002\u8fd9\u53ef\u4ee5\u8ba9\u6ca1\u6709Python\u6216Jupyter\u73af\u5883\u7684\u7528\u6237\u4ecd\u7136\u80fd\u591f\u9605\u8bfb\u3001\u8fd0\u884c\u548c\u4f7f\u7528\u6211\u4eec\u7684\u4ee3\u7801\u3002\u5177\u4f53\u6765\u8bf4\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u4e00\u4e2a\u540d\u4e3aP<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[51992,51991,2708,390,8899],"special":[],"attr":[],"class_list":["post-81026","post","type-post","status-publish","format-standard","hentry","category-zixun","tag-pbexe","tag-vbaexe","tag-2708","tag-jiaoben","tag-8899","entry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/81026","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\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/comments?post=81026"}],"version-history":[{"count":1,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/81026\/revisions"}],"predecessor-version":[{"id":81039,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/posts\/81026\/revisions\/81039"}],"wp:attachment":[{"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/media?parent=81026"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/categories?post=81026"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/tags?post=81026"},{"taxonomy":"special","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/special?post=81026"},{"taxonomy":"attr","embeddable":true,"href":"https:\/\/www.yimenapp.com\/kb-yimen\/wp-json\/wp\/v2\/attr?post=81026"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}