How to package a Python PY program into a cross-platform EXE file

Source: Internet
Author: User

After writing the first program that can crawl the source code of the Web page, it is found that if the Pythonldle program is not installed on the computer will not run out at all. So start looking for EXE files that can be packaged into a cross-platform run.

None of Google's hard-to-understand, or what they say, is too difficult. But after their own simple Baidu, unexpectedly in Baidu found the simplest solution. (Here is a lesson, for some knowledge in fact Baidu more useful).

Here is the link to the great God directly http://www.360doc.com/content/13/1216/11/11029609_337549928.shtml this tutorial is very simple and clear. And also learned how to enter the cmd command line from the current directory.

It should be added that some programs run as EXE after the console window appears, so found the operation Pyinstaller some knowledge. (As for how to install Pyinstaller, Baidu or Google can easily find)

-f,–onefile packaged as an EXE file.
-d,–onedir creates a directory that contains EXE files, but relies on many files (the default option).
-c,–console,–nowindowed using the console, no interface (default)
-w,–windowed,–noconsole using Windows, no console

You can use the-W method to resolve problems with the console window that appears.

How to package a Python PY program into a cross-platform EXE file

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.