Giter VIP home page Giter VIP logo

Comments (9)

anthony-tuininga avatar anthony-tuininga commented on September 7, 2024

Original comment by Thomas Kluyver (Bitbucket: takluyver, GitHub: takluyver):


Yes, you're probably right about it looking from the location of setup.py. I wonder how easy that would be to fix.

The options when you create Executable() are a bit misleading - if you set targetDir there, it will only affect the files specific to that executable, rather than all the files it needs (because you can build more than one executable in the same setup.py). Try setting an option like build_exe:build_exe instead (docs). I think that will solve your bdist_msi issue as well.

from cx_freeze.

anthony-tuininga avatar anthony-tuininga commented on September 7, 2024

Original comment by Rogier Sluimers (Bitbucket: sluimers, GitHub: Unknown):


I think I found the problem. My setup.py file is in a subfolder and my guess is that cxFreeze searches for internal modules from setup.py's folder and not Main's.
It works when I put setup.py in the same folder as Main's.

I put setup.py there so I could seperate cxFreeze's files from the rest of my project.

I moved setup.py to the Main's folder and it seems to be worknig in order now.
The only thing bothering me now is that when I choose the generated files to go to target directory dist, all library files (pyd's, dll's and library.zip), with the exception of python33.dll, are build in the exe.win-amd64-3.3 folder.

Another thing, if I do a:

#!cmd

python ../setup.py bdist_msi

Not all files end up inside the msi file. Notably the executable and the zip file containing the project's compiled files are missing.

Also, my project files end up in the library zip and not the project zip.
I think it's due to my batch file not being in the same directory as my Main.py file.

from cx_freeze.

anthony-tuininga avatar anthony-tuininga commented on September 7, 2024

Original comment by Rogier Sluimers (Bitbucket: sluimers, GitHub: Unknown):


I installed cxFreeze from source code now.
It still won't find internal modules.
My current setup looks like this:

Main.py

#!python

from Utils import Color

if __name__ == "__main__":
    pass

Utils/Color.py

#!python

WhitePinky = "#FFEEEE"

Setup.py

#!python

import sys
from cx_Freeze import setup, Executable

path_platforms = ()

includes = []
includefiles = []
excludes = [
    '_gtkagg', '_tkagg', 'bsddb', 'curses', 'email', 'pywin.debugger',
    'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl',
    'Tkconstants', 'Tkinter'
]
packages = ["os"]
path = []

# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {
                     "includes":      includes, 
                     "include_files": includefiles,
                     "excludes":      excludes, 
                     "packages":      packages, 
                     "path":          path
}

# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
exe = None
if sys.platform == "win32":
    exe = Executable(
        script="../Main.py",
        initScript = None,
        base="Win32GUI",
        targetDir = r"dist",
        targetName="Balie.exe",
        compress = True,
        copyDependentFiles = True,
        appendScriptToExe = False,
        appendScriptToLibrary = False,
        icon = None
    )

setup(  
      name = "Balie",
      version = "0.1",
      author = 'Rogier Sluimers',
      description = "My GUI application!",
      options = {"build_exe": build_exe_options},
      executables = [exe]
)

This is my output:

http://pastebin.com/2a4ibhe2

from cx_freeze.

anthony-tuininga avatar anthony-tuininga commented on September 7, 2024

Original comment by Thomas Kluyver (Bitbucket: takluyver, GitHub: takluyver):


I've not tried with MingW - possibly you need to use the free version of Visual Studio, which is what Python is compiled with. It's the 2010 version for Python 3.3.

Where are the modules that you are trying to import?

from cx_freeze.

anthony-tuininga avatar anthony-tuininga commented on September 7, 2024

Original comment by Rogier Sluimers (Bitbucket: sluimers, GitHub: Unknown):


I can't use the development version. I don't know how I would. I have to compile it right? I tried using mingw to compile it. It gave me an error:

http://pastebin.com/xu0cNqvu

from cx_freeze.

anthony-tuininga avatar anthony-tuininga commented on September 7, 2024

Original comment by Rogier Sluimers (Bitbucket: sluimers, GitHub: Unknown):


  1. Windows 7
  2. Version 4.3.1
  3. not yet, I will tomorrow
  4. http://pastebin.com/4W38kVi0

from cx_freeze.

anthony-tuininga avatar anthony-tuininga commented on September 7, 2024

Original comment by Thomas Kluyver (Bitbucket: takluyver, GitHub: takluyver):


I've used it with Python 3.3 before without seeing this problem, so the first thing is to work out what's causing the problem. What operating system do you see this on? Are you running the latest released version of cx_Freeze? Have you tried with the development version? Can you provide the output from freezing your script?

from cx_freeze.

anthony-tuininga avatar anthony-tuininga commented on September 7, 2024

Original comment by Rogier Sluimers (Bitbucket: sluimers, GitHub: Unknown):


Me again, I just want to ask that if this takes an hour or so to fix, but the coder has no time to, then can the coder tell me which files should be looked at if someone else would like to?

from cx_freeze.

marcelotduarte avatar marcelotduarte commented on September 7, 2024

Closing due to inactivity.
cx_Freeze 6.1 has just been released.

from cx_freeze.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.