Failed import pythoncom

1,297 views
Skip to first unread message

zwai

unread,
May 4, 2009, 8:23:55 AM5/4/09
to PortablePython
Hi everyone,

I encountered a problem, that is I failed import pythoncom module. The
error message is below:

>>> import pythoncom
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "G:\PortablePython_1.1_py2.6.1\App\lib\site-packages
\pythoncom.py", line
2, in <module>
import pywintypes
File "G:\PortablePython_1.1_py2.6.1\App\lib\site-packages\win32\lib
\pywintypes
.py", line 107, in <module>
__import_pywin32_system_module__("pywintypes", globals())
File "G:\PortablePython_1.1_py2.6.1\App\lib\site-packages\win32\lib
\pywintypes
.py", line 99, in __import_pywin32_system_module__
"No system module '%s' (%s)" % (modname, filename)
ImportError: No system module 'pywintypes' (pywintypes26.dll)

Did anyone have any idea? Thanks very much.

Wayne

rcc...@gmail.com

unread,
May 11, 2009, 1:33:02 PM5/11/09
to PortablePython
Hi,

On May 4, 4:23 pm, zwai <zwai.c...@gmail.com> wrote:
> >>> import pythoncom

There is a solution which works for me.
You have to copy files:
<PortablePythonDir>\App\Lib\site-packages\win32\pywintypes26.dll
<PortablePythonDir>\App\Lib\site-packages\win32com\pythoncom26.dll

to
<PortablePythonDir>\App

where <PortablePythonDir> is a folder where PP installed.
Reply all
Reply to author
Forward
0 new messages