0

I'm using the pywin32-216.win32-py2.6.exe package to install pywin32 on Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32. I am seeing the following post install errors. Could someone help me understand what going wrong? Thanks in advance.

Copied pythoncom26.dll to C:\WINDOWS\system32\pythoncom26.dll
Copied pythoncomloader26.dll to C:\WINDOWS\system32\pythoncomloader26.dll
Copied pywintypes26.dll to C:\WINDOWS\system32\pywintypes26.dll
FAILED to register the Python COM objects
-> Software\Python\PythonCore\2.6\Help[None]=None
-> Software\Python\PythonCore\2.6\Help\Pythonwin Reference[None]='C:\\Python26\\Lib\\site-packages\\PyWin32.chm'
Failed to register pythonwin as editor
Shortcut for Pythonwin created
Shortcut to documentation created
The pywin32 extensions were successfully installed.
Traceback (most recent call last):
  File "<string>", line 372, in install
  File "<string>", line 170, in RegisterCOMObjects
ImportError: No module named server.register
Traceback (most recent call last):
  File "<string>", line 401, in install
  File "<string>", line 226, in RegisterPythonwin
  File "win32com\shell\shell.pyc", line 12, in <module>
  File "win32com\shell\shell.pyc", line 10, in __load
ImportError: DLL load failed: The specified module could not be found.
Danish
  • 3,708
  • 5
  • 29
  • 48

3 Answers3

2

Most probably pywin32 requires administrator privileges to be installed successfully. I am not sure how to do that on WinXP, but Microsoft has a page about it.

shanyu
  • 9,536
  • 7
  • 60
  • 68
  • My user is part of the Administrators group, shouldn't that be enough or do I need to run it as the actual 'Administrator' user. – Danish Jul 07 '11 at 13:52
  • That wouldn't be enough, you need to explicitly run it as an adminstrator. – shanyu Jul 07 '11 at 14:14
  • Hi, I managed to get around this by removing my existing Python 2.6 installation and trying it again. It worked this time, hence I guess in this case, the privileges that I had were enough. Thanks a lot for looking into it. I appreciate it a lot! – Danish Jul 07 '11 at 14:26
  • You're welcome. On Vista I had a similar problem for a couple of times which I eliminated by running the setup exe as administrator. – shanyu Jul 07 '11 at 15:14
1

I managed to fix the problem by eventually cleaning all traces of Python 2.6 from my system and re-installing it + pywin32. It was eventually as simple as just double clicking the setup files.

Danish
  • 3,708
  • 5
  • 29
  • 48
  • could you please provide us the link?! – Radu Jan 21 '13 at 11:16
  • @Radu Which link would like me to provide? Link to the solution or link to the setup files? There is no link to the solution, I figured it out myself. Links to the setup files can be easily obtained using Google – Danish Jan 22 '13 at 18:20
  • I totally disagree, the setup files cannot be found easily. I found them - but not easily. – Radu Jan 23 '13 at 09:03
0

Another answer for the googlers:

I has the same issue, it turns out it originated because I have installed python in the past, removed it and reinstalled it to another location. In order to solve it I had to:

  1. Remove old installations (Uninstall + manually from registry) - as Danish advised (both in main root and in Wow6432Node).
  2. In the registry update the location of current location of the python folder path (in InstallPath and PythonPath).
Avi Turner
  • 10,234
  • 7
  • 48
  • 75