py2exe

py2exe specifying subfolder

我怕爱的太早我们不能终老 提交于 2020-01-04 05:34:36
问题 I want use py2exe to compile a .py script to an exe. Filestructure: ProjectDir - src - FullGui.py - other modules - setup.py - tools - Gui2exe - docs To meet my typical workflow, I want to move the setup.py (eg. to tools because creation of .exe is a seperate process and not part of the software deployed). I created the setup.py using Gui2exe. When I use it in my src folder, it works flawless. # ======================================================== # # File automagically generated by

How Can I Make A Windows Executable With Pyserial?

拈花ヽ惹草 提交于 2020-01-04 01:55:31
问题 I am trying to make an executable of a Stackless Python 2.6 program. The setup file is from distutils.core import setup import py2exe setup(console=['controller.py']) and I run it with python setup.py py2exe However, when I try to run it, it raises an ImportError and says that there is no module named serial. When I try: python setup.py py2exe --includes serial or python setup.py py2exe --includes pyserial the build fails with an ImportError. Do you have any ideas? 回答1: Had same issue.

Py2Exe openpyxl importerror

旧城冷巷雨未停 提交于 2020-01-03 19:08:36
问题 I have a python application that depends on openpyxl and works well when running it through the python interpreter. However, when creating an exe with py2exe. The exe was generated but when I click on it I get an error and the following log is generated: Traceback (most recent call last): File "excelTest.py", line 1, in <module> File "openpyxl\__init__.pyc", line 30, in <module> File "openpyxl\workbook\__init__.pyc", line 5, in <module> File "openpyxl\workbook\workbook.pyc", line 16, in

Issue packaging scrapy spider with cx_Freeze or py2exe

拈花ヽ惹草 提交于 2020-01-03 05:34:08
问题 I've created a scraper with Scrapy and wxPython which works as expected, exporting a file with results to the desktop in CSV format. I'm attempting to package this into an executable with cx_Freeze using the below command prompt line: cxfreeze ItemStatusChecker.py --target-dir dist This seems to work fine, building the dist directory with ItemStatusChecker.exe However, when I open ItemStatusChecker.exe, I get the below error in the command prompt and my GUI does not launch: Traceback (most

Converting PyGTK to exe

回眸只為那壹抹淺笑 提交于 2020-01-03 02:42:31
问题 I've been looking around for hours now. The only thing that makes sense to me is http://fnch.users.sourceforge.net/portablepygtkwindows.html But it takes up >40MB of space and it is too big for me. Other tutorials are either too complicated for me to go through them or the results I obtained didn't work. I've tried py2exe but the import gtk fails. I've tried pyinstaller. The GTK files were included but not the glade file. I would wish to have it all in a single standalone .exe. But now my

py2exe/py2app and docx don't work together

偶尔善良 提交于 2020-01-02 10:25:12
问题 Installed docx on Windows 7 here: D:\Program Files (x86)\Python27\Lib\site-packages as shown below: Installed docx on OS X at /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/docx-0.0.2-py2.7.egg-info as shown below: Following is the sample script (named as docx_example.py), which runs absolutely fine on the python interpreter: #!/usr/bin/env python ''' This file makes an docx (Office 2007) file from scratch, showing off most of python-docx's features. If you need

py2exe/pyinstaller and DispatchWithEvents

烈酒焚心 提交于 2020-01-01 07:01:11
问题 I have a program that uses the win32com library to control iTunes, but have been having some issues getting it to compile into an executable. The problem seems to revolve around using DispatchWithEvents instead of Dispatch . I've created a very simple program to illustrate my problem: import win32com.client win32com.client.gencache.is_readonly = False #From py2exe wiki class ITunesEvents(object): def __init__(self): self.comEnabled = True def OnCOMCallsDisabledEvent(self, reason): self

py2exe: Reduce size of the library archive

邮差的信 提交于 2020-01-01 05:34:06
问题 I just created my first py2exe executable and noticed that with the EXE, there is a ZIP file created with the size of around 1.4 MB. My question is, can I reduce the size of this or is it expected that the typical size of an EXE generated with py2exe will be ~ 4 MB (that means with all the files: python2.6dll, library.zip) 回答1: Short answer to your size reduction question is yes. Long answer I am not going to provide here, but instead direct you to py2exe's OptimizingSize wiki page. I hope

Why do i get this traceback error?

纵饮孤独 提交于 2019-12-31 07:04:07
问题 This is the error i get: Traceback (most recent call last): File "dwload.py", line 9, in <module> File "Pmw\__init__.pyc", line 28, in <module> WindowsError: [Error 3] The system cannot find the path specified: "C:\\Users\\P 'sao\\Desktop\\dist\\library.zip\\Pmw/*.*" I get the error after compiling the python file into the executable with py2exe. Does anybody know why i get this error? Found the solution: http://billyjin.kodingen.com/punbb-1.3.4/viewtopic.php?id=310 回答1: Well, the error

Why do i get this traceback error?

被刻印的时光 ゝ 提交于 2019-12-31 07:02:09
问题 This is the error i get: Traceback (most recent call last): File "dwload.py", line 9, in <module> File "Pmw\__init__.pyc", line 28, in <module> WindowsError: [Error 3] The system cannot find the path specified: "C:\\Users\\P 'sao\\Desktop\\dist\\library.zip\\Pmw/*.*" I get the error after compiling the python file into the executable with py2exe. Does anybody know why i get this error? Found the solution: http://billyjin.kodingen.com/punbb-1.3.4/viewtopic.php?id=310 回答1: Well, the error