Linux (ubuntu) compiler installation Cx_freeze failure resolution

Source: Internet
Author: User

Today I'm going to pack up the Python program that I wrote, and it's been a day. First wanted to use the Pyinstaller, found that the package can not run, it should be in the processing of import problems. So consider using CX freeze instead, the result in the installation of the error, and later found a solution.

First, download the Cx_freeze (version 4.3.3) package from http://sourceforge.net/projects/cx-freeze/files/.
Unzip, perform:sudo python setup.py install

The following errors occur:
Adding base module named Stringio
Adding base module named UserDict
Adding base module named _abcoll
Adding base module named _weakrefset
Adding base module named ABC
Adding base module named base64
Adding base module named codecs
Adding base module named copy
Adding base module named Copy_reg
Adding base module named encodings
Adding base module named encodings.aliases
Adding base module named Encodings.ascii
Adding base module named Encodings.base64_codec
Adding base module named Encodings.big5
Adding base module named Encodings.big5hkscs
Adding base module named Encodings.bz2_codec
Adding base module named Encodings.charmap
Adding base module named encodings.cp037
Adding base module named encodings.cp1006
Adding base module named encodings.cp1026
Adding base module named encodings.cp1140
Adding base module named encodings.cp1250
Adding base module named encodings.cp1251
Adding base module named encodings.cp1252
Adding base module named encodings.cp1253
Adding base module named encodings.cp1254
Adding base module named encodings.cp1255
Adding base module named encodings.cp1256
Adding base module named encodings.cp1257
Adding base module named encodings.cp1258
Adding base module named encodings.cp424
Adding base module named encodings.cp437
Adding base module named encodings.cp500
Adding base module named encodings.cp720
Adding base module named encodings.cp737
Adding base module named encodings.cp775
Adding base module named encodings.cp850
Adding base module named encodings.cp852
Adding base module named encodings.cp855
Adding base module named encodings.cp856
Adding base module named encodings.cp857
Adding base module named encodings.cp858
Adding base module named encodings.cp860
Adding base module named encodings.cp861
Adding base module named encodings.cp862
Adding base module named encodings.cp863
Adding base module named encodings.cp864
Adding base module named encodings.cp865
Adding base module named encodings.cp866
Adding base module named encodings.cp869
Adding base module named encodings.cp874
Adding base module named encodings.cp875
Adding base module named encodings.cp932
Adding base module named encodings.cp949
Adding base module named encodings.cp950
Adding base module named encodings.euc_jis_2004
Adding base module named encodings.euc_jisx0213
Adding base module named ENCODINGS.EUC_JP
Adding base module named ENCODINGS.EUC_KR
Adding base module named encodings.gb18030
Adding base module named encodings.gb2312
Adding base module named ENCODINGS.GBK
Adding base module named Encodings.hex_codec
Adding base module named ENCODINGS.HP_ROMAN8
Adding base module named Encodings.hz
Adding base module named Encodings.idna
Adding base module named ENCODINGS.ISO2022_JP
Adding base module named Encodings.iso2022_jp_1
Adding base module named encodings.iso2022_jp_2
Adding base module named encodings.iso2022_jp_2004
Adding base module named Encodings.iso2022_jp_3
Adding base module named Encodings.iso2022_jp_ext
Adding base module named ENCODINGS.ISO2022_KR
Adding base module named Encodings.iso8859_1
Adding base module named Encodings.iso8859_10
Adding base module named Encodings.iso8859_11
Adding base module named encodings.iso8859_13
Adding base module named Encodings.iso8859_14
Adding base module named Encodings.iso8859_15
Adding base module named Encodings.iso8859_16
Adding base module named Encodings.iso8859_2
Adding base module named Encodings.iso8859_3
Adding base module named Encodings.iso8859_4
Adding base module named Encodings.iso8859_5
Adding base module named Encodings.iso8859_6
Adding base module named Encodings.iso8859_7
Adding base module named Encodings.iso8859_8
Adding base module named Encodings.iso8859_9
Adding base module named Encodings.johab
Adding base module named Encodings.koi8_r
Adding base module named Encodings.koi8_u
Adding base module named encodings.latin_1
Adding base module named Encodings.mac_arabic
Adding base module named Encodings.mac_centeuro
Adding base module named Encodings.mac_croatian
Adding base module named Encodings.mac_cyrillic
Adding base module named Encodings.mac_farsi
Adding base module named Encodings.mac_greek
Adding base module named Encodings.mac_iceland
Adding base module named Encodings.mac_latin2
Adding base module named Encodings.mac_roman
Adding base module named Encodings.mac_romanian
Adding base module named Encodings.mac_turkish
Adding base module named Encodings.mbcs
Adding base module named Encodings.palmos
Adding base module named encodings.ptcp154
Adding base module named Encodings.punycode
Adding base module named Encodings.quopri_codec
Adding base module named Encodings.raw_unicode_escape
Adding base module named encodings.rot_13
Adding base module named Encodings.shift_jis
Adding base module named encodings.shift_jis_2004
Adding base module named encodings.shift_jisx0213
Adding base module named Encodings.string_escape
Adding base module named encodings.tis_620
Adding base module named encodings.undefined
Adding base module named Encodings.unicode_escape
Adding base module named Encodings.unicode_internal
Adding base module named Encodings.utf_16
Adding base module named Encodings.utf_16_be
Adding base module named Encodings.utf_16_le
Adding base module named encodings.utf_32
Adding base module named Encodings.utf_32_be
Adding base module named Encodings.utf_32_le
Adding base module named encodings.utf_7
Adding base module named Encodings.utf_8
Adding base module named Encodings.utf_8_sig
Adding base module named Encodings.uu_codec
Adding base module named Encodings.zlib_codec
Adding base module named Genericpath
Adding base module named Linecache
Adding base module named OS
Adding base module named Posixpath
Adding base module named Quopri
Adding base module named repr
Adding base module named stat
Adding base module named Stringprep
Adding base module named struct
Adding base module named Traceback
Adding base module named types
Adding base module named warnings
Adding base module named Weakref
Running Install
Running Bdist_egg
Running Egg_info
Creating Cx_freeze.egg-info
Writing Cx_freeze.egg-info/pkg-info
Writing top-level names to Cx_freeze.egg-info/top_level.txt
Writing dependency_links to Cx_freeze.egg-info/dependency_links.txt
Writing Cx_freeze.egg-info/pkg-info
Writing top-level names to Cx_freeze.egg-info/top_level.txt
Writing dependency_links to Cx_freeze.egg-info/dependency_links.txt
Writing manifest file ' Cx_freeze.egg-info/sources.txt '
Reading manifest file ' Cx_freeze.egg-info/sources.txt '
Reading manifest template ' manifest.in '
Writing manifest file ' Cx_freeze.egg-info/sources.txt '
Installing library code to Build/bdist.linux-x86_64/egg
Running Install_lib
Running Build_py
Running Build_ext
X86_64-linux-gnu-gcc-pthread-fno-strict-aliasing-dndebug-g-fwrapv-o2-wall-wstrict-prototypes-fpic-ibuild/ Temp.linux-x86_64-2.7-i/usr/include/python2.7-c Source/bases/console.c-o build/temp.linux-x86_64-2.7/source/ Bases/console.o
X86_64-linux-gnu-gcc-pthread Build/temp.linux-x86_64-2.7/source/bases/console.o-o Build/lib.linux-x86_64-2.7/cx_ Freeze/bases/console-s
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' Getimporterhelper ':
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:211: References not defined for ' Pyobject_callmethod '
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:215: References not defined for ' pyerr_clear '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' Getdirname ':
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/COMMON.C:66: References not defined for ' pystring_fromstringandsize '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' FatalError ':
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' Setexecutablename ':
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/COMMON.C:93: References not defined for ' pystring_fromstring '
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:115: References not defined for ' pystring_fromstringandsize '
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:136: References not defined for ' pystring_fromstring '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' FatalError ':
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' Setexecutablename ':
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:155: References not defined for ' pystring_fromstring '
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:167: References not defined for ' pystring_fromstring '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' FatalError ':
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' Setexecutablename ':
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/COMMON.C:102: References not defined for ' pyexc_oserror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/COMMON.C:102: References not defined for ' pyerr_setfromerrnowithfilename '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' FatalError ':
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' main ':
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:64: References not defined for ' Py_nositeflag '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:65: References not defined for ' Py_frozenflag '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:66: References not defined for ' Py_ignoreenvironmentflag '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:67: References not defined for ' pyimport_frozenmodules '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:93: References not defined for ' py_setpythonhome '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:95: References not defined for ' py_setprogramname '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:96: References not defined for ' Py_getprogramfullpath '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:97: References not defined for ' py_initialize '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:98: References not defined for ' pysys_setargv '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' Setpathtosearch ':
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:186: References not defined for ' pysys_getobject '
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:189: References not defined for ' Pylist_insert '
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:191: References not defined for ' Pylist_insert '
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:193: References not defined for ' Pylist_insert '
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:195: References not defined for ' Pylist_insert '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' Getimporter ':
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:231: References not defined for ' pyimport_importmodule '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' Executescript ':
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:295: References not defined for ' pydict_new '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' populateinitscriptdict ':
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/COMMON.C:256: References not defined for ' pyeval_getbuiltins '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/COMMON.C:256: References not defined for ' pydict_setitemstring '
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:258: References not defined for ' pydict_setitemstring '
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:260: References not defined for ' pydict_setitemstring '
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:262: References not defined for ' pydict_setitemstring '
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:265: References not defined for ' pydict_setitemstring '
Build/temp.linux-x86_64-2.7/source/bases/console.o:/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c : 268:more undefined references to ' pydict_setitemstring ' follow
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' Executescript ':
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:303: References not defined for ' Pyobject_callmethod '
/home/bill/downloads/cx_freeze-4.3.3/source/bases/common.c:307: References not defined for ' Pyeval_evalcode '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' FatalError ':
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' main ':
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:105: References not defined for ' py_finalize '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' FatalError ':
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:24: References not defined for ' pyerr_print '
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:25: References not defined for ' py_fatalerror '
BUILD/TEMP.LINUX-X86_64-2.7/SOURCE/BASES/CONSOLE.O: In the function ' Fatalscripterror ':
/HOME/BILL/DOWNLOADS/CX_FREEZE-4.3.3/SOURCE/BASES/CONSOLE.C:36: References not defined for ' pyerr_print '
Collect2:error:ld returned 1 exit status
Error:command ' X86_64-LINUX-GNU-GCC ' failed with exit status 1

And then found the following on its bitbucket issue:https://bitbucket.org/anthony_tuininga/cx_freeze/issues/32/cant-compile-cx_freeze-in-ubuntu-1304

Workaround

Put the installation files in the setup.py.
if not vars.get("Py_ENABLE_SHARED", 0):
Change into
if True:

The modifications can be successfully installed to successfully resolve the issue.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Linux (ubuntu) compiler installation Cx_freeze failure resolution

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.