cx_freeze | No active support | SMS library
kandi X-RAY | cx_freeze Summary
kandi X-RAY | cx_freeze Summary
for documentation on how to use cx_Freeze. python setup.py build python setup.py install.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Verifies the configuration
- Determines the base file name
- Returns the name of the init script file
- Determines the file name
- Compile the given extension
- Cache the contents of a zip file
- Find a fully qualified module
- Record a loadable module
- Run the tool
- Freeze the module
- Populates settings from command line
- Build an extension
- Load numpy core numpy core
- Return a list of bin includes
- Prepare qt_menu
- Load PyQt4 Qt4 Qt4
- Set up the Distribution class
- Write the source code to a file
- Load Tkinter
- Write the setup file
- Load the GLIB
- Verify the configuration
- Run the build
- Parse command line options
- Freezes the module
- Load numpy core module
- Adds the module modules
cx_freeze Key Features
cx_freeze Examples and Code Snippets
Community Discussions
Trending Discussions on cx_freeze
QUESTION
I definitively switched from py2exe to cx_Freeze, at the moment I can say it works great for me, I only have some problems with its documentation that is not totally clear to me and it is controversial because around the web there are working solutions totally different from those I found on the official documentation. Especially I did not find a solution to copy both single files located in different source folders and complete folders. For instance I would like that cx_Freeze copies everything from src/locales
to src/build/exe.win-amd64-3.8/locales
and src/key.ico
to src/build/exe.win-amd64-3.8/key.ico
ANSWER
Answered 2021-Jun-02 at 14:19The include_files
option of the build_exe
command should provide the solution you are looking for. According to the cx_Freeze documentation:
list containing files to be copied to the target directory; it is expected that this list will contain strings or 2-tuples for the source and destination; the source can be a file or a directory (in which case the tree is copied except for .svn and CVS directories); the target must not be an absolute path
Accordingly, try the following in your setup.py
file:
QUESTION
I've been trying to use PyInstaller for some time as it can turn a Python script into a single .exe
file, instead of having a lib file and DLLs like cx_freeze
does for example. So it's easier for my users to update the program when I push as it's "less" stuff to download.
However, when I run "pyinstaller CLI.py", I get the following error:
...ANSWER
Answered 2021-May-17 at 14:04Something is amiss with your Python installation. The "site-specific configuration hook" site.py
is normally found in the Lib
folder just underneath the Python install directory. But according to your error log, PyInstaller finds it in Lib/site-packages
.
See also this answer from 2014:
If you have a
site.py
insite-packages
then that is an error, there should be no such file there.
It's referring to Python 2.7, but explains well what site.py
does and still applies to newer Python versions, such as Python 3.9 here.
Furthermore, the code line
QUESTION
I made a python application in python.
Swaminarayan.py
...ANSWER
Answered 2021-May-16 at 10:36According to Microsoft's documentaiton, start
's "title"
is optional, but depending on the options used, it can become an issue, like you are experiencing here. Currently your script is starting cmd
with a title of the script path.
So include the empty title ""
QUESTION
I have some code in an __init__.py
that loops over a directory and imports all of the python files in that directory.
My file structure looks something like this:
...ANSWER
Answered 2021-May-06 at 13:12I figured out I just need to add the path my modules folder into build_exe_options["include_files"]
It would look something like this:
QUESTION
I am using cx_Freeze to compile a python script into a .msi install file. Upon reading this very helpful thread, I have been able to generate a shortcut to the compiled exe program during the install process. Additionally, I would like to display some kind of message to the user during the installation process. Is it possible to configure cx_Freeze accordingly? If not, how else could one go about it?
The relevant (simplified) bit of my code is:
...ANSWER
Answered 2021-May-03 at 09:11The command
QUESTION
So I have a fairly large python program that I want to port to other machines (ubuntu 18.04) without having to install all the python packages and dependencies for each machine, I chose to use cx_Freeze
for this and it seems to build the project fine into a single executable but the executable crashes when calling cv2.imshow
. I managed to reproduce the error with this small snippet of code:
ANSWER
Answered 2021-Apr-16 at 08:35The problem is probably that the cv2/qt/plugins
does not get completely included by cx_Freeze.
Try to modify the beginning of your build script as follows:
QUESTION
I am facing a quite simple problem to reproduce but I am not understanding at all what is happening.
I try to compile a Python script, which uses the fastparquet
dependency, with cx_Freeze. I am able to execute my script when I launch it directly with python script.py
. But if I compile it with cx_Freeze, I am getting a circular dependency error on the fastparquet
import. Below is a very simple case that reproduces the issue:
script.py:
...ANSWER
Answered 2021-Apr-14 at 10:14packages = ["llvmlite.binding"] should solve this.
https://cx-freeze.readthedocs.io/en/latest/distutils.html#build-exe
EDIT: cx_Freeze 6.6 has just been released and has hooks for this issue.
QUESTION
I build an executable with cx_Freeze. I always read that I need to include multiprocessing.freeze_support
to avoid multiple tasks of the executable running in the task manager. But if I use multiprocessing and freeze_support I still get two tasks running in the task manager.
Here is my example GUI named test_wibu.py
:
ANSWER
Answered 2021-Apr-07 at 12:07According to this excellent answer, the reason for the multiprocessing.freeze_support()
call is
lack of
fork()
on Windows (which is not entirely true). Because of this, on Windows the fork is simulated by creating a new process in which code, which on Linux is being run in child process, is being run.
and thus not to avoid multiple tasks of the executable running in the task manager as stated in your premise.
Therefore, the behavior you observe in the task manager is probably normal and can't be avoided.
QUESTION
I've seen through the web that .exe taken from python scripts may often run into errors because of some "hooks missing", which happens because pyinstaller wasn't able to track some modules while creating the .exe file. I'm currently using Python IDLE 3.61 and the scripts works fine without any error. The .exe actually runs but, for instance, it simply crushes when I try to plot a table giving the error:
NoModuleFoundError: 'No module=plotly.validators.table found'.
Building the .exe also via cx_Freeze, I came up to the same sort of problem:
Module plotly.validators.table has no Attribute CellsValidators
which confirmed me the problem is caused by issues with plotly.
...ANSWER
Answered 2021-Mar-30 at 08:45- Uninstall plotly module.
- Install older version of plotly module.
- Now try building .exe file
(If not working again, try further more old versions of plotly)
I hope it works.
QUESTION
I just finished freezing my program with cx_Freeze. When I try to run it, it just stops without showing any error messages, so I want to know if is there any way to know what's wrong with my program or my freezing script:
...ANSWER
Answered 2021-Mar-17 at 13:02Try to redirect the output of your executable into a file with the following command in a cmd
prompt:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cx_freeze
You can use cx_freeze like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page