py2exe

py2exe - No system module 'pywintypes'

牧云@^-^@ 提交于 2019-12-04 01:19:58
I'm trying to convert a simple Python script into a Windows executable. My setup.py script is: from distutils.core import setup import py2exe setup( name = "Simple Script", options = { "py2exe": { "dll_excludes" : ["libmmd.dll","libifcoremd.dll","libiomp5md.dll","libzmq.dll"] } }, console=['simple_script.py'] ) I have added the dll_excludes as each one of them caused a failure. Now I've hit a failure that I can't simply exlude. This is the error trace: Traceback (most recent call last): File "setup.py", line 12, in <module> console=['rules signed.py'] File "C:\Anaconda\lib\distutils\core.py",

py2exe/pyinstaller and DispatchWithEvents

家住魔仙堡 提交于 2019-12-03 17:17:17
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.comEnabled = False def OnCOMCallsEnabledEvent(self): self.comEnabled = True # The first line works in the exe

py2exe com dll problem

China☆狼群 提交于 2019-12-03 16:35:30
i'm trying making a com dll in python. but i try register to compiled dll have a error message "run time error r6034" and "could not load python dll" what is the solution this problem ? mycode : setup.py: # This is the distutils script for creating a Python-based com dll # server using ctypes.com. This script should be run like this: # # % python setup.py py2exe # # After you run this (from this directory) you will find two directories here: # "build" and "dist". The .dll file in dist is what you are looking for. ##############################################################################

Error: “MSVCP90.dll: No such file or directory” even though Microsoft Visual C++ 2008 Redistributable Package is installed

依然范特西╮ 提交于 2019-12-03 16:27:24
问题 I'm trying to build a package from source by executing python setup.py py2exe This is the section of code from setup.py, I suppose would be relevant: if sys.platform == "win32": # For py2exe. import matplotlib sys.path.append("C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\redist\\x86\\Microsoft.VC90.CRT") base_path = "" data_files = [("Microsoft.VC90.CRT", glob.glob(r"C:\Program Files\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*")), Error it shows: *** finding dlls

Script with scipy using py2exe

一个人想着一个人 提交于 2019-12-03 14:31:25
I have ran into this during exporting my script (which uses numpy and scipy libraries) via py2exe : Traceback (most recent call last): File "imPok.py", line 3, in <module> File "scipy\misc\__init__.pyc", line 49, in <module> File "scipy\special\__init__.pyc", line 603, in <module> File "scipy\special\basic.pyc", line 18, in <module> File "scipy\special\orthogonal.pyc", line 101, in <module> File "scipy\linalg\__init__.pyc", line 188, in <module> File "scipy\linalg\_decomp_update.pyc", line 12, in <module> File "scipy\linalg\_decomp_update.pyc", line 10, in __load File "scipy/linalg/_decomp

Icon overlay issue with Python

我是研究僧i 提交于 2019-12-03 14:24:31
I found some examples and topics on this forum about the way to implement an icon overlay handler with Python 2.7 & the win32com package but it does not work for me and I don't understand why. I create the DLL and I have no error when I register it. I have also tried directly with the script but it's the same. It's like the class is never called. Here is the code: import win32traceutil from win32com.shell import shell, shellcon import pythoncom import winerror import os REG_PATH =r'Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers' REG_KEY = "GdIconOverlayTest"

Freeze a program created with Python's `click` pacage

瘦欲@ 提交于 2019-12-03 14:02:53
问题 I've got a command line program that uses Python's click package. I can install and run it locally, no problem with: pip install --editable . # (or leave out the editable of course) Now, I'd like to create an executable file that can be distributed and run standalone. Typically, since I'm in a Windows environment, I would use one of py2exe , pyinstaller or cx_Freeze . However, none of these packages work. More specifically, they all generate an executable, but the executable does nothing. I

Pygame2Exe Errors that I can't fix

谁说我不能喝 提交于 2019-12-03 14:00:49
I made a "Game". I love playing it, and I would like to distribute it to my friends without having to install Python and Pygame on their computers. I did a lot of research on Py2Exe and Pyinstaller. I looked through many tutorials, fixes, errors, but none of them seem to help me. Pyinstaller is useless because it doesn't like fonts in Pygame, and Py2exe wouldn't compile the built in modules, so I found Pygame2exe which is just a premade setup script for use with py2exe that includes pygame and fonts. It supposedly builds fine, but the exe is unusable... I get the error: "Microsoft Visual C++

making a python program executable

六眼飞鱼酱① 提交于 2019-12-03 13:52:49
问题 from distutils.core import setup import py2exe, sys, os sys.argv.append('py2exe') setup( options = {'py2exe': {'bundle_files': 1}}, windows = [{'script': "single.py"}], zipfile = None, ) in this setup file for py2exe where it says single.py is that where I place the name of my program? 回答1: I don't know your py2exe tool, but we usually use this way to convert py to exe: Download and install Standard Python Software: http://www.python.org/download/ Download PyInstaller via link below: http:/

py2exe: Compiled Python Windows Application won't run because of DLL

我们两清 提交于 2019-12-03 13:28:04
问题 I will confess I'm very new to Python and I don't really know what I'm doing yet. Recently I created a very small Windows application using Python 2.6.2 and wxPython 2.8. And it works great; I'm quite pleased with how well it works normally. By normally I mean when I invoke it directly through the Python interpreter, like this: > python myapp.py However, I wanted to go a step further and actually compile this into a standalone executable file. So I followed these instructions from the