key to start making a python script

  Our system environment may not Python environment, and want to use a script, which can make the script from the Python environment operate independently, for example, the script packaged into exe executable files. So how to do it? You might think py2exe and pyinstaller , here to pyinstaller example, we will Python script packaged into exe executable file.
  First download pyinstaller:

pip install pyinstaller

     Then, the file to be packaged in a terminal:

F:\>pyinstaller -F test.py

 

   As a command, such as the path of our terminal in the Froot directory, if the script file also under this directory, you can directly execute the above command. The results will be generated as a file two directories:

 

   Wherein, build and run.spec generated in dependence file. After execution is completed, can be removed, the final executable file run.exein the dist directory, the executable file, we can put anywhere on the machine, such as the desktop.

 

Guess you like

Origin www.cnblogs.com/maoruqiang/p/11432153.html