2011-07-07 147 views
0

我正在使用pywin32-216.win32-py2.6.exe軟件包在Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32上安裝pywin32。我看到以下安裝後錯誤。有人能幫我理解錯在哪裏嗎?提前致謝。在Windows XP上安裝pywin32-216時發生安裝後錯誤

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. 

回答

1

我設法解決這個問題,最終從我的系統中清除了Python 2.6的所有痕跡,並重新安裝了它+ pywin32。它最終就像雙擊安裝文件一樣簡單。

+0

你能否給我們提供鏈接? – Radu

+0

@Radu哪個鏈接要我提供?鏈接到解決方案或鏈接到安裝文件?沒有鏈接到解決方案,我自己想出來。鏈接到設置文件可以很容易地使用谷歌 – Danish

+0

我完全不同意,安裝文件不容易找到。我發現他們 - 但不容易。 – Radu

2

很可能pywin32需要管理員權限才能成功安裝。我不知道如何在WinXP上做到這一點,但微軟有一個關於它的page

+0

謝謝,試用 – Danish

+0

我的用戶是管理員組的一部分,應該不夠,或者我需要將其作爲實際的'管理員'用戶運行。 – Danish

+0

這是不夠的,你需要明確地運行它作爲管理員。 – shanyu

0

爲Google員工的另一種答案:

我有同樣的問題,事實證明它起源,因爲我已經在過去的Python安裝,刪除,並重新安裝它到另一個位置。 爲了解決這個問題,我不得不:

  1. 刪除舊的安裝(手動從註冊表卸載+) - 作爲丹麥的建議(無論是在主根和Wow6432Node)。
  2. 在註冊表中更新python文件夾路徑的當前位置的位置(位於InstallPathPythonPath)。