Cov txheej txheem:

Cx_Freeze yog dab tsi?
Cx_Freeze yog dab tsi?

Video: Cx_Freeze yog dab tsi?

Video: Cx_Freeze yog dab tsi?
Video: Networking with Python! Basic Operating System (OS) Navigation 2024, Kaum ib hlis
Anonim

cx_Freeze yog ib txheej ntawm scripts thiab modules rau freezing Python scripts rau hauv executables nyob rau hauv ntau yam tib yam uas py2exe thiab py2app ua. Tsis zoo li ob lub cuab yeej no, cx_Freeze yog cross platform thiab yuav tsum ua haujlwm ntawm txhua lub platform uas Python nws tus kheej ua haujlwm rau. Nws txhawb nqa Python 3.5 lossis siab dua. Yog tias koj xav tau kev txhawb nqa rau Python 2.

Hauv qhov no, kuv yuav siv py2exe li cas?

Muaj ob peb kauj ruam yooj yim uas yuav tsum tau siv py2exe thaum koj tau teeb tsa nws:

  1. Tsim / sim koj qhov program.
  2. Tsim koj cov ntawv teeb tsa (setup.py)
  3. Khiav koj cov ntawv teeb tsa.
  4. Kuaj koj executable.
  5. Muab Microsoft Visual C runtime DLL. 5.1. Python 2.4 lossis 2.5. 5.2. Python 2.6, 2.7, 3.0, 3.1. 5.2.1.
  6. Tsim tus installer yog tias tsim nyog.

Ib yam li ntawd, kuv yuav khiav CXfreeze li cas? Muaj peb txoj hauv kev siv cx_Freeze:

  1. Siv cov ntawv cxfreeze suav nrog.
  2. Tsim ib tug distutils teeb tsab ntawv. Qhov no muaj txiaj ntsig yog tias koj xav tau kev xaiv ntxiv thaum khov koj qhov kev pab cuam, vim tias koj tuaj yeem txuag lawv hauv tsab ntawv.
  3. Ua haujlwm ncaj qha nrog cov chav kawm thiab cov qauv siv sab hauv los ntawm cx_Freeze.

Ua raws li qhov no, koj yuav ua li cas thiaj li ua tau qhov kev pab cuam python executable?

Tsim kev ua tau zoo los ntawm Python Script siv Pyinstaller

  1. Kauj ruam 1: Ntxiv Python rau Windows Path. Txhawm rau pib, koj tuaj yeem xav ntxiv Python rau Windows txoj kev.
  2. Kauj ruam 2: Qhib Windows Command Prompt. Tom ntej no, qhib Windows Command Prompt:
  3. Kauj ruam 3: Nruab Pyinstaller Pob.
  4. Kauj ruam 4: Txuag koj Python Script.
  5. Kauj ruam 5: Tsim cov kev siv Pyinstaller.
  6. Kauj ruam 6: Khiav qhov executable.

Kuv yuav nruab pip li cas?

Thaum koj tau lees paub tias Python raug teeb tsa kom raug, koj tuaj yeem txuas ntxiv nrog kev txhim kho Pip

  1. Download tau-pip.py mus rau ib lub nplaub tshev ntawm koj lub computer.
  2. Qhib cov lus hais kom sai thiab mus rau hauv cov ntawv tais ceev tseg uas muaj get-pip.py.
  3. Khiav cov lus txib nram qab no: python get-pip.py.
  4. Pip yog tam sim no ntsia!

Pom zoo: