Following the example of 'cx-freeze ', I'm getting the error message below. I put all of the error keywords into google and found no hits.

Some people in various posts have said to use Python 2.5 but a lot of my code is using Python 2.6 features.

Can you telling what I'm doing wrong?

./cxfreeze
Traceback (most recent call last):
File "./cxfreeze", line 5, in <module>
main()
File "/root/cx_Freeze-4.1/cx_Freeze/", line 178, in main
silent = options.silent)
File "/root/cx_Freeze-4.1/cx_Freeze/", line 85, in __init__
self._VerifyConfiguration()
File "/root/cx_Freeze-4.1/cx_Freeze/", line 325, in _VerifyConfiguration
self._GetInitScriptFileName()
File "/root/cx_Freeze-4.1/cx_Freeze/", line 246, in _GetInitScriptFileName
raise ConfigError("no initscript named %s", name)
cx_Freeze.freezer.ConfigError: no initscript named Console

Dani AI

Generated

Short version for : cx_Freeze is complaining that it can't find the startup template it expects for console programs (the package data called the initscripts). The usual causes are (a) running the cxfreeze script from the source tree instead of an installed package, or (b) installing cx_Freeze under a different Python interpreter than the one you are using to run it. Either case makes the initscripts directory invisible to the running package.

Try these diagnostic/fix steps (replace python2.6 with the exact interpreter you intend to use):

# see which cxfreeze script is being invoked
which cxfreeze
head -n 1 ./cxfreeze

# install cx_Freeze with the correct interpreter
cd /root/cx_Freeze-4.1
sudo python2.6 setup.py install

# find where the package lives and inspect its initscripts folder
python2.6 -c "import cx_Freeze, os; print os.path.join(os.path.dirname(cx_Freeze.__file__), 'initscripts')"
ls -l /path/from/above

If the initscripts directory is missing from the installed package path, reinstall with the same Python you use to freeze, or copy the initscripts directory from the source into the installed cx_Freeze package directory (use the path printed by the python -c line above). Running the cxfreeze script with a different interpreter (or an old system package) can produce the exact symptom you see.

Note for : cx_Freeze is cross-platform — on Linux it produces Linux executables; to produce a Windows .exe you generally need to build on Windows. If problems persist after verifying the interpreter and reinstalling, show the output of the which cxfreeze and the python -c path above and that will help narrow the next steps.

Recommended Answers

All 3 Replies

My first question would be how did u install cx_freeze?

That is for converting a python script to a windows executable... u r trying to get an exe file in Linux?? I wonder why u would do that.

From the cx_freeze download site, it gives me a windows installer, so I believe you will have to run this on a windows machine rather than on a Linux machine to get this working.

My first question would be how did u install cx_freeze?

That is for converting a python script to a windows executable... u r trying to get an exe file in Linux?? I wonder why u would do that.

From the cx_freeze download site, it gives me a windows installer, so I believe you will have to run this on a windows machine rather than on a Linux machine to get this working.

I'm not in a Windows environment.

I downloaded the source from

This is similar to Windows py2exe program; an entirely self-contained environment that doesn't require any dependencies (including Python!) on the other person's computer.

This looks cool...

I will have to check this from my home PC then....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.