cx_freeze problem on Ubuntu

Jon Clements joncle at googlemail.com
Thu Oct 1 12:34:13 EDT 2009


On 1 Oct, 15:08, John <J... at nospam.net> wrote:
> Sorry if this might be a repost.  I'm having problems with my newsreader.
>
> My system:
>
> cx_freeze 4.1
> Python 2.6
> Ubuntu Jaunty
>
> I downloaded the cx_freeze source code fromhttp://cx-freeze.sourceforge.net/into a directory.
>
> I wrote a one line python program 'print( "hello world" )'
>
> According to the instructions, all I have to do is this:
>
> ./cxfreeze hello.py
>
> But I get this error:
>
> ./cxfreeze hello.py
> Traceback (most recent call last):
> File "./cxfreeze", line 5, in <module>
> main()
> File "/root/cx_Freeze-4.1/cx_Freeze/main.py", line 178, in main
> silent = options.silent)
> File "/root/cx_Freeze-4.1/cx_Freeze/freezer.py", line 85, in __init__
> self._VerifyConfiguration()
> File "/root/cx_Freeze-4.1/cx_Freeze/freezer.py", line 325, in
> _VerifyConfiguration
> self._GetInitScriptFileName()
> File "/root/cx_Freeze-4.1/cx_Freeze/freezer.py", line 246, in
> _GetInitScriptFileName
> raise ConfigError("no initscript named %s", name)
> cx_Freeze.freezer.ConfigError: no initscript named Console
>
>  From here:http://linux.softpedia.com/get/Programming/Assembler-Tools/cx-Freeze-...
> the directions state:
>
> Installation:
>
> "Extract the archive into a directory. In order to build cx_Freeze you
> need to have gcc and Python development include files and libraries
> available. Run the following commands.
>
> python MakeFrozenBases.py
> python FreezePython.py --no-copy-deps FreezePython.py"
>
> I can't find either of these Python programs and searching the Internet
> for clues was fruitless.
>
> I thinking that I'm missing something that's painfully obvious.
>
> As far as I can tell, no one else has ever posted this problem so I
> don't know what corrective actions to make.  I'd greatly appreciate any
> assistance.

Firstly -- never used the library, hadn't even heard of it --
disclaimer over :)

Err, python 2.6 doesn't have print as a function by default. Have you
done a from __future__ import ?

    def _GetInitScriptFileName(self, argsSource = None):
        if argsSource is None:
            argsSource = self
        name = argsSource.initScript
        if name is None:
            if argsSource.copyDependentFiles:
                name = "Console" (****)
            else:
                name = "ConsoleKeepPath"
            if sys.version_info[0] >= 3:
                name += "3"
        argsSource.initScript = self._GetFileName("initscripts", name)
        if argsSource.initScript is None:
            raise ConfigError("no initscript named %s", name)

Should be sufficient clues(****),

Cheers,
Jon



More information about the Python-list mailing list