安装Pywin32出现错误
来源:互联网 发布:c 程序员简历 编辑:程序博客网 时间:2024/05/22 08:26
错误显示
执行下面这段代码:
import sys
from _winreg import *
# tweak as necessary
version = sys.version[:3]
installpath = sys.prefix
regpath = "SOFTWARE\\Python\\Pythoncore\\%s\\" % (version)
installkey = "InstallPath"
pythonkey = "PythonPath"
pythonpath = "%s;%s\\Lib\\;%s\\DLLs\\" % (
installpath, installpath, installpath
)
def RegisterPy():
try:
reg = OpenKey(HKEY_CURRENT_USER, regpath)
except EnvironmentError as e:
try:
reg = CreateKey(HKEY_CURRENT_USER, regpath)
SetValue(reg, installkey, REG_SZ, installpath)
SetValue(reg, pythonkey, REG_SZ, pythonpath)
CloseKey(reg)
except:
print "*** Unable to register!"
return
print "--- Python", version, "is now registered!"
return
if (QueryValue(reg, installkey) == installpath and
QueryValue(reg, pythonkey) == pythonpath):
CloseKey(reg)
print "=== Python", version, "is already registered!"
return
CloseKey(reg)
print "*** Unable to register!"
print "*** You probably have another Python installation!"
if __name__ == "__main__":
RegisterPy()
文件名:register.py
- 安装Pywin32出现错误
- 安装pywin32以后,使用出现错误
- python安装pywin32出现DLL load failed的解决办法
- win32api pywin32 安装后出现 ImportError: DLL load failed
- 安装pywin32 错误提示3.6找不到注册表信息
- python -- pywin32安装
- pywin32不能安装解决方案
- pywin32中安装问题
- pywin32模块安装方法
- 安装pywin32报错
- pywin32的安装
- python安装pywin32问题
- pywin32使用win32com出现SyntaxError
- 解决问题: pywin32 安装后出现 import win32api ImportError DLL load failed
- pywin32
- pywin32
- python3.5 安装 pywin32模块
- pywin32不能安装如何解决
- 设计模式
- [LeetCode]33. Search in Rotated Sorted Array
- 排序子序列-Java-牛客模拟三
- struts2 项目构建规划 (6)
- 在android studio用kotlin来编写代码(三)
- 安装Pywin32出现错误
- SVM参数设置及各种参数意义
- HBMY- 字符串的奇偶性
- 打造高质效的技术团队的演讲
- POJ3249 Test for Job
- CSS 用浮动制作一个导航栏
- struts2 声明式异常处理(7)
- 如何重新安装boost,在ubuntu下
- 2017第19届中西部光电与智能制造博览会-重庆光博会