py2exe

Py2exe isn't copying webdriver_prefs.json into builds

梦想与她 提交于 2019-11-28 09:01:37
问题 I'm using py2exe to compile a Python 2.7 script that uses Selenium 2.39.0 to open up Firefox windows and carry out some routines. In the past, I've been able to compile the code without any issue. Today though, after updating from Selenium 2.35 to 2.39, I'm running into trouble. When I try to run the .exe generated by the compiled code, I get the following error: Exception in Tkinter callback Traceback (most recent call last): File "Tkinter.pyo", line 1410, in __call__ File

Can 64-bit python create 32-bit Windows executables

允我心安 提交于 2019-11-28 09:01:04
I have a new 64-bit Windows machine and use python for various things and so would prefer to install 64-bit python. However, one of my python projects creates a Windows executable that is then run on a 32-bit Windows machine (created using py2exe). How do I use 64-bit python and py2exe to create a 32-bit executable? If I can't do that, I guess my choices are: Use 32-bit python on all machines including mine; or Install python on the 32-bit machines and don't use py2exe. Any advice much appreciated. You can install both 32 and 64 bit Python on the machine and use the py2exe associated with each

multiprocessing problem [pyqt, py2exe]

大憨熊 提交于 2019-11-28 08:22:51
I am writing a GUI program using PyQt4. There is a button in my main window and by clicking this button. I hope to launch a background process which is an instance of a class derived from processing.Process. class BackgroundTask(processing.Process): def __init__(self, input): processing.Process.__init__(self) ... def run(self): ... (Note that I am using the Python2.5 port of the python-multiprocessing obtained from http://code.google.com/p/python-multiprocessing/ that is why it is processing.Process instead of multiprocessing.Process. I guess this should not make a difference. Am I right?) The

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

帅比萌擦擦* 提交于 2019-11-28 06:48:45
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 move me to far across the 'violating policy' line. Is there anyway I can accomplish running python files

Is there a py2exe version that's compatible with python 3.5?

ぐ巨炮叔叔 提交于 2019-11-28 06:48:23
I am trying to compile my python 3.5 file with the latest py2exe version 0.9.2.2 with the following command: py -3.5 -m py2exe.build_exe myscript.py But it reports this: "run-py3.5-win-amd64.exe" file is not found in the ...lib\site-packages\py2exe\ folder. Does this mean that py2exe 0.9.2.2 is only compatible up to python 3.4? Unfortunately as of November 2016 there is still no Python 3.5 support in sight for py2exe. However, I've had great success using cx_Freeze 5.0 with Python 3.5 and since both projects use a very similar configuration I've migrated away from py2exe to cx_Freeze without

How to stop Python program compiled in py2exe from displaying ImportError: No Module names 'ctypes'

人走茶凉 提交于 2019-11-28 06:00:23
问题 I was wondering if this might be a compilation error or if there is something I can do to stop it from displaying. I have made an argparse program for cmd. I compiled it with py2exe and when I run it, it exacutes the program properly but always gives this error before running the code: Traceback (most recent call last): File "boot_common.py", line 46, in <module> ImportError: No module named 'ctypes' If it is something in my code, here is my script: import argparse import zipfile import os

Py2exe lxml woes

喜你入骨 提交于 2019-11-28 05:22:14
I have a wxpython application that depends on lxml and works well when running it through the python interpreter. However, when creating an exe with py2exe, I got this error ImportError: No module named _elementpath I then used python setup.py py2exe -p lxml and I did not get the above error but another one saying ImportError: No module named gzip Could anyone let me know what the problem is and how I can fix it. Also should I put any dll files like libxml2, libxslt etc in my dist folder? I searched the computer and did not find these files, so maybe they aren't needed? Thanks. Edit: I just

ImportError: no module named py2exe

廉价感情. 提交于 2019-11-28 02:55:58
问题 I get this error when I try to use one of the py2exe samples with py2exe. File "setup.py", line 22, in ? import py2exe ImportError: no module named py2exe I've installed py2exe with the installer, and I use python 2.6. I have downloaded the correct installer from the site (The python 2.6 one.) My path is set to C:\Python26 and I can run normal python scripts from within the command prompt. Any idea what to do? Thanks. Edit: I had python 3.1 installed first but removed it afterwards. Could

Hiding command-line dialog in py2exe

限于喜欢 提交于 2019-11-28 01:40:51
问题 Hi When I compile my python script with py2exe, everything works well except a usless command-line dialog appears as well as my GUI. Any way to fix this? I have python 2.7 and my setup script looks like this: from distutils.core import setup import py2exe setup(console=['Main.py']) Please help! 回答1: Using setup(windows=['Main.py']) should remove the command line dialog and use Main.py as your console, instead. 回答2: Rename your entry point python script extension from .py to .pyw and

Py2exe, Runtimeerror with tweepy

谁说胖子不能爱 提交于 2019-11-28 01:37:20
I wanted to use the python plugin for twitter called tweepy. in my main.py file I just imported tweepy import tweepy My setup-file looks like this: from distutils.core import setup import py2exe setup( windows=[{ "script": 'main.py', }], options={ "py2exe": { "includes": ["sip", "tweepy"] } } ) When i execute python setupy.py py2exe via command line I get this repeating codeblock until I get an RuntimeError: maximum recursion depth exceeded in comparison. File "C:\Python34\lib\site-packages\py2exe\hooks.py", line 291, in __getattr__ self.__finder.safe_import_hook(renamed, caller=self) File "C: