1

I'm a newbie to cx_Freeze and I need some help. I'm writing an application with python 3.3, pyqt4 and some more libraries (scipy, numpy, matplotlib, dxfwrite). Now I'm trying to freeze the application with cx_Freeze under windows7. I'm using cx_Freeze-4.3.2.win-amd64-py3.3 and the following setup.py for cx_Freeze:

import sys
from cx_Freeze import setup, Executable

build_exe_options = {"packages": ["os"], "excludes": ["tkinter"] }

setup(
    name = "Barrel Cam Editor",
    version = "0.2.0",
    description = "An editor for Barrel Cams",
    options = {"build_exe": build_exe_options},
    executables = [Executable("barrelcameditor.py", base = "Win32GUI")])

I run the command python setup.py build and it seems to work but when I launch the obtained exe I get an Importerror: DLL load failed. I really do not know how to solve this problem. any help? Tnx

PS: Thank you for your help, it was a problem with scipy.linalg. I switched to numpy.linalg and it seems to work. Now I've another little problem: I was importing a custom package:

from barrelcam import camdata, camdlg, camwidget

but in this way it is not working. I found a workaround: I moved the files to the barrelcameditor folder and it seems to work, changing the import to

import camdata, camdlg, camwidget

There is a way to keep the original position of files?

Thank you

sanfe
  • 11
  • 2
  • scipy and matplotlib are massive and a pain to use with cx_freeze. I need more info like what the error message was or what dll was missing. PySide requires that you {"includes": ["atexit"]} idk pyqt4 has the same requirement or not. – justengel Feb 28 '14 at 13:19
  • There's a [known issue](https://bitbucket.org/anthony_tuininga/cx_freeze/issue/64/freezing-scipy-as-package-causes-error) in cx_Freeze with Scipy at the moment. – Thomas K Feb 28 '14 at 17:24
  • @sanfe: If you've got another problem, please make a new question with full details. Don't try to repurpose an existing question, it messes up the Q&A format. – Thomas K Mar 03 '14 at 18:15
  • @Thomas K thank you for your help, but now the freeze work also keeping the file in the correct position (always removing Scipy import). I made some try but the basic setup.py is ok. Probably I put an error in the setup.py during my experiments. – sanfe Mar 04 '14 at 08:00

0 Answers0