日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

pyinstaller 用法

系統 2327 0

參考: http://pythonhosted.org/PyInstaller/#installing-pyinstaller

1、下載pyinstaller和 PyWin32 ?

目前pyinstaller支持的python版本為2.3-2.7,可以到http://www.pyinstaller.org/官網下載。注意 PyWin32 ?對應不太的python版本

2、安裝

pyinstaller 下載完成后,解壓即可。 PyWin32 ?安裝

3、pyinstaller使用方法

使用也非常的簡單,cmd下進入解壓出來的目錄,進入當前目錄,比方說解壓到d:/pyinstaller/,執行

    方法一:當前目錄下沒有spec文件,執行
    
python pyinstaller.py [opts] yourprogram.py
  • 方括號[]里面為可選項,
  • 執行目錄后,在d:/pyinstaller/目錄里面生成一個your-program/dist子目錄,你有用的文件就放在這里了,
  • 同時生成一個your-program/your-program.spec文件
  • 同時生成一個your-program/build,里面存放buid文件(中間件)
  • 如果程序不在“d:/pyinstaller/”里面,指定程序的路徑,spec,dist,buid目錄文件將在當前目錄下生成
    方法一:當前目錄下有spec文件,執行
    
python pyinstaller.py [opts] your-program.spec

4 主要選項包括:

Allowed OPTIONS are :
-h, --help show this help message and exit
-v, --version show program version
--upx-dir=UPX_DIR Directory containing UPX.
-a, --ascii do NOT include unicode encodings (default:
included if available)
--buildpath=BUILDPATH Buildpath (default:
SPECPATH/build/pyi.TARGET_PLATFORM/SPECNAME)

-y, --noconfirm Remove output directory (default:
SPECPATH/dist/SPECNAME) without
confirmation
--log-level=LOGLEVEL Log level (default: INFO, choose one of DEBUG,
INFO, WARN, ERROR, CRITICAL

What to generate:

-F, --onefile create a single file deployment

-D, --onedir create a single directory deployment (default)
-o DIR, --out=DIR create the spec file in directory. If not specified,
and the current directory is Installer's root
directory, an output subdirectory will be created.
Otherwise the current directory is used.
-n NAME, --name=NAME optional name to assign to the project (from which
          the spec file name is generated). If omitted, the
basename of the (first) script is used.

?

-F, –onefile 打包成一個exe文件。
-D, –onedir 創建一個目錄,包含exe文件,但會依賴很多文件(默認選項)。
-c, –console, –nowindowed 使用控制臺,無界面(默認)
-w, –windowed, –noconsole 使用窗口,無控制臺

具體參考PyInstaller安裝目錄下的PyInstaller Manual

pyinstaller 用法


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 内黄县| 莲花县| 阜平县| 河间市| 吴堡县| 宾阳县| 得荣县| 甘孜| 大新县| 罗江县| 大竹县| 保亭| 尖扎县| 丹寨县| 宁津县| 东至县| 时尚| 棋牌| 化州市| 宁武县| 温宿县| 宜州市| 乌拉特后旗| 同德县| 文成县| 纳雍县| 太仆寺旗| 西林县| 体育| 子长县| 随州市| 嘉峪关市| 兰溪市| 宜州市| 平果县| 砀山县| 吉水县| 荆州市| 禹城市| 尼勒克县| 兴国县|