在Windows OS(64位)下运行python26时......我遇到了类似的错误:
import win32api" error in Python 2.6: pywintypes26.dll
Run Code Online (Sandbox Code Playgroud)
要么
pythoncom26.dll missing
ImportError: DLL load failed: The specified module could not be found.
Run Code Online (Sandbox Code Playgroud)
我已经完成了python26的msi安装,所有的dll都可以在C:\ Python26\Lib\site-packages\pywin32_system32下找到
Vin*_*n.X 70
我将pywintypes26.dll和pythoncom26.dll移动/复制到c:\ Python26\Lib\site-packages\win32 - >解决问题!
小智 37
我也遇到了导入win32api的问题.
在安装后脚本为pywin32失败,这应该复制pythoncom26.dll
,pythoncomloader26.dll
和pywintypes26.dll
,等等.我手动运行它,我的安装得到了修复.
python scripts\pywin32_postinstall.py -install
Run Code Online (Sandbox Code Playgroud)
MZA*_*MZA 12
在64位Python 3.4.2下安装时遇到了类似的问题.我从http://www.lfd.uci.edu/~gohlke/pythonlibs/运行了安装可执行文件pywin32-219.win-amd64-py3.4.exe .
在网站上明确指出:
"Python 3.4用户必须python.exe Scripts\pywin32_postinstall.py -install
从提升的命令提示符手动运行."
我没有第一次做的; 我从正常提示安装获得以下反馈:
c:\python34>python.exe Scripts\pywin32_postinstall.py -install
Copied pythoncom34.dll to C:\Python34\pythoncom34.dll
Copied pywintypes34.dll to C:\Python34\pywintypes34.dll
You do not have the permissions to install COM objects.
The sample COM objects were not registered.
etc.etc.
Finishing with "The pywin32 extensions were succesfully installed" ...
Run Code Online (Sandbox Code Playgroud)
我只读了最后一句话,我开始运行一些代码,导致这些DLL加载失败.
所以,做了一些研究,并开始提升提示(如何:参见" http://www.sevenforums.com/tutorials/783-elevated-command-prompt.html ")并再次运行:
c:\python34>python.exe Scripts\pywin32_postinstall.py -install
Copied pythoncom34.dll to C:\Windows\system32\pythoncom34.dll
Copied pywintypes34.dll to C:\Windows\system32\pywintypes34.dll
Registered: Python.Interpreter
Registered: Python.Dictionary
Registered: Python
-> Software\Python\PythonCore\3.4\Help[None]=None
-> Software\Python\PythonCore\3.4\Help\Pythonwin Reference[None]='C:\\Python34\\Lib\\site-packages\\PyWin32.chm'
Pythonwin has been registered in context menu
Shortcut for Pythonwin created
Shortcut to documentation created
The pywin32 extensions were successfully installed.
Run Code Online (Sandbox Code Playgroud)
而现在我的代码运行愉快(就此事而言......叹息,还有其他很多事情要做).
如上所述,安装后的脚本没有运行,从车轮安装时可以看到这个问题(我遇到过)
python scripts\pywin32_postinstall.py -install
Run Code Online (Sandbox Code Playgroud)
如果通过车轮安装时发现您遇到此问题,则从此处安装可以解决上述问题.
https://pypi.python.org/pypi/pypiwin32
归档时间: |
|
查看次数: |
62531 次 |
最近记录: |