Comments (9)
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.
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.
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:
from cx_freeze.
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.
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:
from cx_freeze.
Original comment by Rogier Sluimers (Bitbucket: sluimers, GitHub: Unknown):
- Windows 7
- Version 4.3.1
- not yet, I will tomorrow
- http://pastebin.com/4W38kVi0
from cx_freeze.
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.
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.
Closing due to inactivity.
cx_Freeze 6.1 has just been released.
from cx_freeze.
Related Issues (20)
- PyQt6 import error in cx_Freeze 7.1, missing DLL HOT 1
- Version 7.1.0 (and 7.1.0.post0) break FastAPI/hypercorn HOT 7
- Multiprocessing Manager Class Causes Infinite Loop on Mac OS (intel) HOT 18
- Building with pyproject.toml does not include local package HOT 3
- Windows Service cannot find required configuration files after creating .exe using cx_Freeze HOT 11
- Extend DMG functionality by using an external library HOT 2
- Error while building Qt6 sample on MacOSX HOT 13
- MKL hook trigger an error during setup HOT 3
- possible regression? cx_freeze 6.16 - 7.1 for possibly scipy HOT 20
- Could not Find Module vcomp140.dll HOT 2
- numpy 2.0 support added
- test_cli.py::test_import_tomli FAILS: "ImportError: No module named setuptools.extern" HOT 5
- Request additional time when stopping a windows service HOT 2
- FreeBSD 13.3 2024Q3 build failure HOT 5
- cx_freeze problem with pytorch HOT 2
- cx-Freeze causing circular imports?
- Linux builds have started failing since updating to 7.2 HOT 3
- Prisma Python is missing binaries when frozen in CI but not locally HOT 4
- test_hooks_pandas.py::test_pandas FAILS: Possible circular dependency HOT 7
- Windows console-based application crashes immediately after opening HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cx_freeze.