Pywintypes Com Error Py2exe
Contents |
py2exe: "ImportError: No module named pywintypes" ...?? :-( Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [posted and
No Module Named Pywintypes Pyinstaller
mailed] steinhardt at inpro.de (x-herbert) writes: (Herbert, athough you have also pywintypes download sent mail privately to me I prefer to answer on the newsgroup, just for the archives) > Hi,
Pywintypes27.dll Download
> > I have a small test to "compile" al litle script as a WMI-Tester. The > script include a wmi-wrapper and "insert" the Win32-modeles. > > here the no module named pefile code: > > my "WMI-Tester.py" > ----- > import wmi > computer = wmi.WMI () > for item in computer.Win32_Process (): > print item > ----- Ok. After installing wmi.py and rebooting my machine, this works for me when run from Python. > the py2exe-setup.py > ----- > from distutils.core import setup > setup(name="WMI_tester", scripts=["WMI_tester.py"],) > ----- This script no module pywintypes is not complete (but certainly a cut and paste error), you have to add 'import py2exe'. > and the error at > "setup.py py2exe": ... > Traceback (most recent call last): > File "C:\Programme\ActivePython22\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", > line 301, in RunScript > exec codeObject in __main__.__dict__ > File "C:\Dokumente und Einstellungen\steinha\Eigene > Dateien\WinProcess\PythonProc\setup-py2exe.py", line 7, in ? > setup(name="WMI_tester", scripts=["WMI_tester.py"],) > File "C:\Programme\ActivePython22\lib\distutils\core.py", line 138, > in setup > dist.run_commands() > File "C:\Programme\ActivePython22\lib\distutils\dist.py", line 893, > in run_commands > self.run_command(cmd) > File "C:\Programme\ActivePython22\lib\distutils\dist.py", line 913, > in run_command > cmd_obj.run() > File "C:\Programme\ActivePython22\Lib\site-packages\py2exe\build_exe.py", > line 604, in run > mf.import_hook(f) > File "C:\Programme\ActivePython22\Lib\site-packages\py2exe\tools\modulefinder.py", > line 126, in import_hook > q, tail = self.find_head_package(parent, name) > File "C:\Programme\ActivePython22\Lib\site-packages\py2exe\tools\modulefinder.py", > line 180, in find_head_package > raise ImportError, "No module named " + qname > ImportError: No module named pywintypes It seems that either your installation is corrupted or py2exe doesn't work with ActiveState Python any longer, py2exe 0.4.1 requires a fairly new build of the win32 extensions (154 or later, IIRC). Mark changed the way the special pywintypes and
Check Spelling Like Pages Local Site Map ------------------------ Rename Page Delete Page ------------------------ Subscribe User ------------------------ Remove Spam Revert to this revision Package Pages Sync Pages ------------------------ Load Save SlideShow Making services more like regular win32 apps From http://osdir.com/ml/python.py2exe/2007-01/msg00003.html, update your
Python Win32 Extensions
setup.py to look something like this: myservice = Target( # used for install pywin32 the versioninfo resource description = "A sample Windows NT service", # what to build. For a service, the
Pythoncom
module name (not the # filename) must be specified! modules = ["MyService"], cmdline_style='pywin32', ) setup( service = [myservice], )See samples\advanced\setup.py for more details. Note: using an object for setup() is https://mail.python.org/pipermail/python-list/2003-August/214773.html a py2exe extension of distutils The standard win32 commands for HandleCommandLine(): install start debug stop remove Without the cmdline_style parameter, you get this output from running your service in CMD: Services are supposed to be run by the system after they have been installed. These command line options are available for (de)installation: -help -install -remove -auto -disabled -interactive -user:
- py2exe - No http://queforum.com/python/345545-python-py2exe-no-system-module-pywintypes.html system module 'pywintypes' LinkBack LinkBack URL About LinkBacks http://grokbase.com/t/python/python-list/019t3jt0j5/packaging-problem-py2exe-inno-setup-pywintypes-com-error Bookmark & Share Digg this Thread!Add Thread to del.icio.usBookmark in TechnoratiTweet this thread Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode no module 11-16-2013,10:40 AM #1 bigdata Senior Member Join Date Mar 2013 Posts 416,482 Python - py2exe - No system module 'pywintypes' I'm trying to convert a simple Python script into a Windows executable. My setup.py script is: from distutils.core import setupimport py2exesetup( name = "Simple Script", no module named options = { "py2exe": { "dll_excludes" : ["libmmd.dll","libifcoremd.dll","libiomp5md.dll","l ibzmq.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 console=['rules signed.py'] File "C:\Anaconda\lib\distutils\core.py", line 152, in setup dist.run_commands() File "C:\Anaconda\lib\distutils\dist.py", line 953, in run_commands self.run_command(cmd) File "C:\Anaconda\lib\distutils\dist.py", line 972, in run_command cmd_obj.run() File "C:\Anaconda\lib\site-packages\py2exe\build_exe.py", line 243, in run self._run() File "C:\Anaconda\lib\site-packages\py2exe\build_exe.py", line 306, in _run self.plat_finalize(mf.modules, py_files, extensions, dlls) File "C:\Anaconda\lib\site-packages\py2exe\build_exe.py", line 1157, in plat_finalize import pythoncom File "C:\Anaconda\lib\site-packages\pythoncom.py", line 2, in import pywintypes File "C:\Anaconda\lib\site-packages\win32\lib\pywintypes.py", line 124, in __import_pywin32_system_module__("pywintypes", globals()) File "C:\Anaconda\lib\site-packages\win32\lib\pywintypes.py", line 98, in __import_pywin32_system_module__ raise ImportError("No system module '%s' (%s)" % (modname, filename))ImportError: No system module 'pywintypes' (pywintypes27.dll)I've installed pywin32 an
winNT4.0] useswin32com.client[win32com.client.Dispatch('MSXML2.XMLHTTP'),win32com.client.dynamic.Dispatch("Excel.Application")] and alsoxml.sax for xml parsing.I create a setup.py file:;-----setup.py-----------from distutils.core import setupimport py2exesetup(name="eclient",scripts=["eclient.py"],data_files=[("template",["expenseform.xls"])],);------------------------I run it using py2exe:python setup.py py2exe -p _xmlplus,win32comThis creates 2folders build and dist. In the dist folder it createseclient folder in which it has the eclient.exe and other .dlls. Alsocreates a folder tcl with 2more folders in it- tcl8.3 and tk8.3.Then I use Inno setup[I only include the files in the dist folder] tocreate my .exe so that I can install it on a machine that doesn't havepython installed on it.But this is the error I get when I try to run it from another machine:Traceback