无法安装pywin32 蓝屏时提醒which was not found in the registry
来源:互联网 发布:重庆编程培训 编辑:程序博客网 时间:2024/06/11 18:51
安装这个第三方库可能会遇到
Python version 2.7 required, which was not found in the registry
这个提示,一般python环境变量没设置好或者复制python包丢了registry文件导致的,最简单的办法是创建一个py文件(随便在什么位置),
然后运行下面的代码,再次安装就可以了!
import sysfrom _winreg import *# tweak as necessaryversion = sys.version[:3]installpath = sys.prefixregpath = "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()
阅读全文
0 0
- 无法安装pywin32 蓝屏时提醒which was not found in the registry
- 解决Win10安装PyWin32问题Python Version 3.4 required which was not found in the registry
- 安装第三方库出现 Python version 2.7 required, which was not found in the registry
- 安装第三方库出现 Python version 2.7 required, which was not found in the registry
- 安装第三方库出现 Python version 2.7 required, which was not found in the registry
- 安装第三方库出现 Python version 2.7 required, which was not found in the registry
- 安装第三方库出现 Python version 2.7 required, which was not found in the registry
- 安装第三方库出现 Python version 2.7 required, which was not found in the registry
- Python安装第三方库报错:Python version 2.7 required, which was not found in the registry.
- 安装PIL遇到python version 2.7 required, which was not found in the registry解决办法
- 安装第三方库出现 Python version 2.7 required, which was not found in the registry
- 安装第三方库出现 Python version 2.7 required, which was not found in the registry
- 安装mysql-python错误python version2.7 required,which was not found in the registry.
- 安装PIL等库出现Python version2.7 required,which was not found in the registry.
- 安装第三方库出现 Python version 2.7 required, which was not found in the registry
- 安装 MySQLdb 出现 Python version 2.7 required, which was not found in the registry
- 安装win32com报错-Python Version 2.7 required which was not found in the registry 问题解决 .
- 安装第三方库时python version 2.7 required,which was not found in the registry
- Win10和Ubuntu的引导修复,Ubuntu引导Win10
- Jsoup解决跨域请求----示例java版
- thymeleaf th:text 不显示标签
- java 读取 并 写入一个新的Excle
- 巧用表值函数
- 无法安装pywin32 蓝屏时提醒which was not found in the registry
- (React-Native 学习之五) HelloWorld RnDemo运行
- Java-运算符
- tensorflow if语句
- /dev/rhdisk5: the requested resource is busy
- 两种事务配置方式
- vue学习笔记4
- Wondershare Data Recovery(数据恢复软件)官方破解版V6.6.1.0下载 | data recovery 注册码
- Android系统呼吸灯源码简单跟踪分析