py2exe

Py2Exe: DLL load failed

廉价感情. 提交于 2019-11-30 08:27:45
When trying to use py2exe to convert a simple Python game I made into exe format, it gave me the following error: Traceback (most recent call last): File "C:\Users\Tali\Desktop\2exe.py", line 4, in <module> setup(console=['test.py']) File "C:\Python\lib\distutils\core.py", line 152, in setup dist.run_commands() File "C:\Python\lib\distutils\dist.py", line 953, in run_commands self.run_command(cmd) File "C:\Python\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "C:\Python\lib\site-packages\py2exe\build_exe.py", line 243, in run self._run() File "C:\Python\lib\site-packages

No module named builtins

孤街浪徒 提交于 2019-11-30 08:13:31
I'm trying to convert my .py script into an executable using py2exe. I've had a number of issues so far that have been largely addressed by the "options" in the setup file below. But now I have a problem that I have not been able to find a solution for, and wondering if others have had this same issue and fixed it. When I execute the setup file below using "python setup.py py2exe" it gives me an executable but when I run it, it complains "No module named builtins". The only other post I could find on this subject indicated that builtins is a python3 thing, but I'm running 2.7. Appreciate any

PyQt/PySide - icon display

家住魔仙堡 提交于 2019-11-30 07:11:49
I have a PySide app which has an icon for the MainWindow (a QMainWindow instance). When I run the file normally, the icon is visible and everything is fine but when I create an exe with py2exe , the icon does not appear. This happens with cx_freeze also( so I don't think the problem's with py2exe ). The app was designed using QtDesigner and converted to python with pyside-uic . I tried both using icons as a file and as a resource(qrc file) and both don't seem to work. Any help or pointers would be appreciated. Thanks. Gerald kochelmonster's solution works so long as you don't try and bundle

Can't make standalone binary scrapy spider with cx_Freeze

Deadly 提交于 2019-11-30 05:42:45
问题 A short description about my working environment: win 7 x64, python 2.7 x64, scrapy 0.22, cx_Freeze 4.3.2. First, I developed a simple crawl-spider and it works fine. Then, using the core scrapy API, I created an external script main.py, which can run spider, and it also works as required. Here is the code of the script: # external main.py using scrapy core API, 'test' is just replaced name of my project from twisted.internet import reactor from scrapy.crawler import Crawler from scrapy

raw_input causing EOFError after creating exe with py2exe

两盒软妹~` 提交于 2019-11-30 05:02:48
问题 After creating an exe from a script with py2exe raw_input() is causing an EOFError. How can I avoid this? File "test.py", line 143, in main raw_input("\nPress ENTER to continue ") EOFError: EOF when reading a line 回答1: >>> help(raw_input) Help on built-in function raw_input in module __builtin__: raw_input(...) raw_input([prompt]) -> string Read a string from standard input. The trailing newline is stripped. If the user hits EOF (Unix: Ctl-D, Windows: Ctl-Z+Return), raise EOFError. On Unix,

Building executables for Python 3 and PyQt

杀马特。学长 韩版系。学妹 提交于 2019-11-30 04:44:57
I built a rather simple application in Python 3.1 using PyQt4. Being done, I want the application to be distributed to computers without either of those installed. I almost exclusively care about Windows platforms, so my goal is to have a single executable file and maybe some resource files and .dlls in the end. Having searched around, I came to the conclusion that py2exe only supports Python up to version 2.7 pyinstaller only supports Python up to version 2.6 cx_Freeze does not work for me because I keep on getting the following error when trying to execute my successfully build binary: Y:

How to convert python .py file into an executable file for use cross platform?

血红的双手。 提交于 2019-11-30 02:01:55
I've been searching through SO for a while now trying to come up with an answer to this but due to my inexperience with programming I don't understand much of the documentation, nor am I confident enough to experiment too much. Would anyone be able to describe in slightly simpler terms how I would use programs like Py2exe, PyInstaller, cx_freeze etc.? I just want a way for others (mainly friends) to be able to run my (simple, text only) program without having to download python themselves. If there is an easier way to do this I'd appreciate knowing that too. Running Vista 32bit, python 2.7

Making a portable (exe) with Python 3.1?

回眸只為那壹抹淺笑 提交于 2019-11-29 18:55:45
问题 Is there a way to make a portable/stand-alone exe for python apps? I've read about p2exe but it doesn't support the latest version. I'm reluctant to go to 2.6 because I'd rather stay with the latest version instead of worrying about incompatibilities as soon as 2.6 becomes too outdated. 回答1: cx_freeze has worked for me. Here's a link. The page claims to support 3.1. Good luck! http://cx-freeze.sourceforge.net/ 来源: https://stackoverflow.com/questions/1505783/making-a-portable-exe-with-python-3

Trying to use py2exe, but python is not recognized

◇◆丶佛笑我妖孽 提交于 2019-11-29 18:24:10
I am following the the tutorial at http://www.py2exe.org/index.cgi/Tutorial to figure out how to use py2exe. I get down to step 3 where you are supposed to run the command: python setup.py py2exe I do that and then I get this error: 'python' is not recognized as an internal or external command, operable program or batch file. I have python 2.4 installed on my machine. any idea's? I am sure it is something simple. Python just isn't on your path. If you indeed have Python 2.4, it should be C:\Python24\python.exe with the default installer. Wherever the file is located, if you don't set Python's

python3 使用py2exe打包exe

拈花ヽ惹草 提交于 2019-11-29 18:02:35
py2exe在sourceforge 的下载只支持到2.7。 针对python3.0+的版本,需要自己编译。 1.下载源码 svn checkout svn://svn.code.sf.net/p/py2exe/svn/trunk py2exe-svn 2.编译环境 这里使用的是vs2014. 3.安装 进入py2exe-3 python setup.py install 这里会进行编译、安装。 此外,python默认使用的是vs9,针对vs2014,需要改下文件: Lib\distutils\msvc9compiler.py 寻找: VERSION = get_build_version() 在下面增加: VERSION = 11.0 如果出现错误: Failed to load and parse the manifest. The system cannot find the file specified. error: command 'mt.exe' failed with exit status 31 解决办法:由于vs2010后的link.exe的参数稍微有些改变,所以在link的时候没有生成manifest文件,自然mt.exe找不到这个文件。只需要在msvc9compiler.py里面搜索一下MANIFESTFILE,然后在他上面加一行ld_args.append