cx-freeze

Getting “ImportError: DLL load failed: The specified module could not be found” when using cx_Freeze even with tcl86t.dll and tk86t.dll added in

可紊 提交于 2019-11-27 02:24:38
I am trying to convert a .py file to .exe using cx_Freeze 5.1.1., but an ImportError: DLL load failed pops up every time I try to run the file. Based on the suggested solutions here and here , I added tcl86t.dll and tk86t.dll to the list of included files. They appear in the build folder, but the error message keeps popping up. Here is my setup.py: import sys import os from cx_Freeze import setup, Executable os.environ["TCL_LIBRARY"] = r"C:/Users/Name/AppData/Local/Programs/Python/Python36-32/tcl/tcl8.6" os.environ["TK_LIBRARY"] = r"C:/Users/Name/AppData/Local/Programs/Python/Python36-32/tcl

Cx_freeze ImportError no module named scipy

限于喜欢 提交于 2019-11-27 02:24:08
问题 Good day all, I am having trouble using cx_Freeze on a code I am working on converting to a .exe. When I run cx_Freeze I get the following ImportError that there no no module named scipy running install running build running build_exe Traceback (most recent call last): File "setup.py", line 25, in <module> executables = executables File "C:\Python34\lib\site-packages\cx_Freeze\dist.py", line 362, in setup distutils.core.setup(**attrs) File "C:\Python34\lib\distutils\core.py", line 148, in

Creating cx_Freeze exe with Numpy for Python

此生再无相见时 提交于 2019-11-27 02:01:46
Im trying to create a basic exe using cx_Freeze. It works for .py programs that don't have numpy but I can't get one made correctly with numpy. *Any ideas on how to fix this? is there something i need to include in my setup.py? When I go to run the exe it says: c:\Python32\Scripts\dist>Assignment4_5.exe Traceback (most recent call last): File "C:\Python32\lib\site-packages\cx_Freeze\initscripts\Console3.py", line 2 7, in <module> exec(code, m.__dict__) File "c:\Python32\Assignment4_5.py", line 6, in <module> import numpy as np File "C:\Python32\lib\site-packages\numpy\__init__.py", line 137,

python: Can I run a python script without actually installing python?

邮差的信 提交于 2019-11-27 01:30:05
问题 I have some .py files I wrote that I want to run on a different machine. The target machine does not have python installed, and I can't 'install' it by policy. What I can do is copy files over, run my stuff, and then remove them. What I tried was to just take my development python folder over to the target machine and cd to the python folder and run python.exe /path/to/.py/file . It gave me an error saying that python.dll was not registered. If I registered the DLL that is probably going to

multiprocessing.freeze_support()

喜欢而已 提交于 2019-11-27 01:17:46
问题 Why does the multiprocessing module need to call a specific function to work when being "frozen" to produce a windows executable? 回答1: The reason 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. As the code is to be run in technically unrelated process, it has to be delivered there before it can be run. The way it's being delivered is

How do I use cx_freeze?

血红的双手。 提交于 2019-11-27 00:10:23
问题 I've created my setup.py file as instructed but I don't actually.. understand what to do next. Typing "python setup.py build" into the command line just gets a syntax error. So, what do I do? setup.py: from cx_Freeze import setup, Executable setup( name = "On Dijkstra's Algorithm", version = "3.1", description = "A Dijkstra's Algorithm help tool.", exectuables = [Executable(script = "Main.py", base = "Win32GUI")]) 回答1: Add import sys as the new topline You misspelled "executables" on the last

cx_Freeze: “No module named 'codecs'”

牧云@^-^@ 提交于 2019-11-26 23:31:01
问题 I've been desperately trying to compile my python pygame program into standalone executables to no prevail. PyInstaller doesn't work properly with pygame, Nuitka doesn't make standalones that work and cx_Freeze is looking the best choice. However, when I compile using my setup.py , it makes a set of files but the main executable doesn't run. My setup.py is as below: import sys import cx_Freeze executables = [cx_Freeze.Executable("main.py")] images =["assets/images/1.png","assets/images/2.png"

Use cx-freeze to create an msi that adds a shortcut to the desktop

断了今生、忘了曾经 提交于 2019-11-26 22:17:46
问题 I am using cx-freeze to create an MSI installer for a Python application. How can I install a link to the application from the desktop? 回答1: To create a shortcut to the application, give the shortCutName and shortcutDir options to the Executable. The shortcutDir can name any of the System Folder Properties (thanks Aaron). For example: from cx_Freeze import * setup( executables = [ Executable( "MyApp.py", shortcutName="DTI Playlist", shortcutDir="DesktopFolder", ) ] ) You can also add items to

When using cx_Freeze and tkinter I get: “DLL load failed: The specified module could not be found.” (Python 3.5.3)

白昼怎懂夜的黑 提交于 2019-11-26 18:23:02
问题 When using cx_Freeze and Tkinter, I am given the message: File "C:\Users\VergilTheHuragok\AppData\Local\Programs\Python\Python35-32\lib\tkinter\__init__.py", line 35, in <module> import _tkinter # If this fails your Python may not be configured for Tk ImportError: DLL load failed: The specified module could not be found. Some things to note: I want to use Python 3+ (Currently using 3.5.3, 32-bit). Don't really care about a specific version, whatever works. My project has multiple files I need

Hide console window with Tkinter and cx_Freeze

元气小坏坏 提交于 2019-11-26 18:16:42
问题 I am using cx_freeze to freeze a tkinter app. When I run the exe I get a wonderfully USELESS console window along with my tkinter GUI. I would like to remove/hide this useless black window. I've seen threads that suggest the following: root = tkinter.Tk() root.withdraw() The above code does the opposite of what I want. It hides my GUI, while the useless black window remains. I would like it to be the other way around. 回答1: This question is very similar, but for wxPython and cx_Freeze.