"Python" Nuitka package python

Source: Internet
Author: User

Official website: http://nuitka.net/doc/user-manual.html

Python packaging Tool Comparison: http://blog.csdn.net/qwemicheal/article/details/52864656 This blog explains the various problems that Nuitka exist

Introduction to ELF Format: http://www.cnblogs.com/xmphoenix/archive/2011/10/23/2221879.html a clear introduction to the ELF format

The role of Nuitka is to convert a Python program into a C executable elf file. In this way, you can enjoy the optimization of C language processing and improve the speed at run time.

Installation:
sudo Install Nuitka

Use:

Suppose there are python files main.py which import a.py, b.py, c.py

Converting to an executable simply runs:

Nuitka--recurse-all  main.py

The Main.exe file is generated after running, and note that the import file in main.py is automatically included.

Enter the following code to execute

./main.exe

Problem:

1. Very poor cross-platform

This is also mentioned in the "Python packaging tool comparison" above.

When I used it, I packaged a python file in Ubuntu and got it running under windows, prompting

This version of Main.exe is incompatible with the version of Windows that you are running. Check your computer's system information to see if you need a x86 (or x64) version of the program, and then contact the software publisher.

Run in CentOS, prompting for Python dependent libraries not found.

2.. exe file cannot be generated after using the--standalone parameter

This parameter can be used to resolve whether the code is dependent on Python installation

The created binaries can be made executable independent of the Python installation, with--STANDALONE option.

But after I use this parameter, I cannot generate the executable file.

"Python" Nuitka package python

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.