3

I tried to install cx_freeze on my computer (windows) with an MSI, but the installation kept failing saying something like "one or more needed files could not be found." Because installing from a prebuilt binary wasn't an option, I decided to build cx_freeze from source.

I downloaded the .tar.bz and extracted until I got to the actual folder containing the setup.py. I cded into the directory, and ran the command

python setup.py install

A cmd windows came up and printed out a lot of text along the lines of "adding base module named...",then printed out

running install
running build
running build_py

However, the install then failed with the error

error: package directory 'cx_freeze' does not exist

I have no idea how to solve this. If someone could give me working instructions on how to install cx_freeze that would be great

BTW, I'm on python 3.3

Paul Roub
  • 36,322
  • 27
  • 84
  • 93
pipsqueaker117
  • 2,280
  • 9
  • 35
  • 47
  • Do you have visual studio 2010 installed? If not, I'd recommend trying to work out the problems with the binary installer instead. I've installed it on Python 3.3, so it should definitely be possible. You could also try Christoph Gohlke's installer from http://www.lfd.uci.edu/~gohlke/pythonlibs/#cx_freeze – Thomas K Mar 22 '13 at 23:50

1 Answers1

3

After struggling around for 1 and a half hour I found the solution!

I followed these steps to compile CX_Freeze from source for Python 3.3:

  1. install visual studio 2010 c++ (only 2010 works!)
  2. Download the latest version of CX_Freeze from BitBucket. You need this one, the version on the main page of CX_Freeze misses one file! https://bitbucket.org/anthony_tuininga/cx_freeze
  3. Extract the file
  4. Launch cmd and cd to the directory of the extracted folder. (This will avoid your problem)
  5. (optional: path to python.exe) setup.py install
  6. Done!

During this I faced one major issue. There where some problems with mt.exe and it failed with exit status 31. The solution is to go to you python and edit msvc9compiler.py in Lib/distutils.

Search for the following line:

ld_args.append(‘/MANIFESTFILE:’ + temp_manifest)

replace it by: ld_args.append(‘/MANIFEST’)

sources which helped me:

Ecno92
  • 869
  • 11
  • 16