python(11)---pyinstaller

  Record today, the installation of pyinstaller, python can be run from the command line, sometimes we need

Package the source code of python and run it on different platforms, pyinstaller is to perform this function. Wrote online

Some problems encountered during the installation process, I will record some of the problems I encountered during the installation process, to facilitate subsequent people if they encounter

After that, you can take fewer detours.

  I installed under windows10, first "Win + R" to open the windows terminal, if it is python2 input:

pip2 install --user pyinstaller; if it is python3 input: pip3 install --user pyinstaller. If the command line terminal

There is no prompt for successful installation, indicating that we have not added environment variables, so we need to find the installation location of python and add it

In the environment variable, take mine as an example: F: \ vs2017 \ program \ Shared \ Python36_64; F: \ vs2017 \ program \ Shared \ Python36_64 \ Scripts

Add it to the environment variable.

  When we start debugging, we must switch to the xx.py folder and enter the command:python -m PyInstaller --onefile --windowed --name="fileName" Homework.py

You can complete the packaging of the program. If you are prompted that the command cannot be found, you need to add an environment variable: C: \ Users \ 94732 \ AppData \ Roaming \ Python \ Python36 \ site-packages. You can solve this problem.

Guess you like

Origin www.cnblogs.com/xuelanga000/p/12677541.html