cx-freeze

cxFreeze error: resource_filename() only supported for .egg not .zipp

ⅰ亾dé卋堺 提交于 2019-12-02 01:51:05
问题 I have a fully working wxpython based application, written all in Python. I wanted to make an exe, so I used cxFreeze. During the build, there are many modules which seem to be missing, which sometimes should not make a problem, but when I run the application it gives me an error from MySQLdb module: NotImplementedError: resource_filename() only supported for .egg not .zip I have a .egg for MySQL at Python 2.7 / Lib / Site-Packages. Any help or suggestions are highly appreciated. Thanks! 回答1:

Where to put a config file for a compiled Python script?

梦想的初衷 提交于 2019-12-01 23:47:22
问题 This is similar to Where to put a configuration file in Python?, but I'm asking about scripts compiled/frozen with py2exe or similar on Windows systems. (Namely, this one: What config file format to use for user-friendly strings of arbitrary bytes? https://gist.github.com/1119561) My first thought was to put the config file in the same folder as the .exe, which makes it sort of self-contained. But if I associate files with the .exe, it will be called from their directory, not its own, so I'd

cx_Freeze - how do I convert multiple files into the build folder

和自甴很熟 提交于 2019-12-01 23:18:36
I've made a program which launches another python program using os.startfile() . I wanted to have this as two exe files, launching the second by using subprocess.call() instead, in 1 build folder but I don't know how to do this. I tried making a setup file for both, creating 2 build folders and then copying 1 of the exe files into the other's build folder but got this: Traceback (most recent call last): File "C:\Python34\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 12, in <module> __import__(name + "__init__") ImportError: No module named 'menu_record__init__' Have any ideas?

Compiling with Python 3.3

烂漫一生 提交于 2019-12-01 22:45:07
Let me start by saying I have only very recently started programming. I don't know how to use the cx_freeze script. I don't know how to make the word 'python' work in commandline. I am just looking for complete and detailed directions on how to make a .py file into a .exe file that can work without Python. I haven't had luck with cx_freeze and nothing else seems to work with 3.3. Can anyone tell me wher to start? Unfortunately, cx_freeze is the only way to do it as far as I can tell. Perhaps you are just having bad luck with cx_freeze. Try this in a .bat file. @echo off <python path>\python

Python cx_Freeze for two or more python files (modules)

做~自己de王妃 提交于 2019-12-01 20:33:17
问题 There are example to build executable using one py file(module) as given here I have about 4 py files(modules), I would like to build executable which should include all the py files. How to build python executable when we have more then one python modules ? Example from here from cx_Freeze import setup, Executable setup( name = "hello", version = "0.1", description = "the typical 'Hello, world!' script", executables = [Executable("hello.py")]) This has hello.py if I have two files like

Python Pmw and cx_Freeze?

旧街凉风 提交于 2019-12-01 10:40:37
I am unable to make an executable from my python program which uses Pmw (Python mega widgets). I use cx_Freeze (through gui backend "Gui2Exe"). Searching Pmw site I've found that it's caused by how the Pmw library checks for modules when ran and it doesn't work when you use py2exe or similar programs because the libraries are in a zip file. More info can be found here: http://pmw.sourceforge.net/doc/dynamicloader.html So they give a solution in that page, under "Freezing Pmw", by providing a script which generates a single standalone Pmw module which you can easily freeze. However, that script

ImportError: DLL load failed when importing win32clipboard in application frozen with cx_Freeze

岁酱吖の 提交于 2019-12-01 09:11:29
I've got a Python 2.7 program that imports win32clipboard . I tried to freeze it with cx_Freeze 4.2.3 on Windows XP SP3 32-bit, to create an installation MSI. I made a setup.py according to the cx_Freeze documentation, and used the following command: c:\python27\python.exe setup.py bdist_msi When I run it on another PC that doesn't have Python 2.7 installed, I get an exception on the line that imports win32clipboard : ImportError: DLL load failed: The specified module could not be found. I can see that win32clipboard.pyd is being included in the build. What dependency is missing, and how can I

Python Pmw and cx_Freeze?

不羁的心 提交于 2019-12-01 08:42:39
问题 I am unable to make an executable from my python program which uses Pmw (Python mega widgets). I use cx_Freeze (through gui backend "Gui2Exe"). Searching Pmw site I've found that it's caused by how the Pmw library checks for modules when ran and it doesn't work when you use py2exe or similar programs because the libraries are in a zip file. More info can be found here: http://pmw.sourceforge.net/doc/dynamicloader.html So they give a solution in that page, under "Freezing Pmw", by providing a

Creating exe file with cx_Freeze, PyQt4, matplotlib and multiple .py files does not work

此生再无相见时 提交于 2019-12-01 08:04:41
问题 I'm currently struggeling to build my python project with cx_Freeze into an exe file and I'm not sure what I did wrong as I used the examples (PyQt4 and matplotlib) of Anthony Tuininga (https://github.com/GreatFruitOmsk/cx_freeze/tree/finder_zip_pkgs/cx_Freeze/samples) to do that. I have three .py files, one main file, one ui file and one functions file. And of course the setup.py file. I import only these packages in my files: from PyQt4 import QtCore, QtGui from matplotlib.backends.backend

cxfreeze missing distutils module inside virtualenv

倖福魔咒の 提交于 2019-12-01 06:42:38
When running a cxfreeze binary from a python3.2 project I am getting the following runtime error: /project/dist/project/distutils/__init__.py:13: UserWarning: The virtualenv distutils package at %s appears to be in the same location as the system distutils? Traceback (most recent call last): File "/home/chrish/.virtualenvs/project/lib/python3.2/distutils/__init__.py", line 19, in <module> import dist ImportError: No module named dist Correspondingly there are several distutils entries in the missing modules section of the cxfreeze output: ? dist imported from distutils ? distutils.ccompiler