Python安装第三方库报错:Python version 2.7 required, which was not found in the registry.
来源:互联网 发布:手机网速限制软件 编辑:程序博客网 时间:2024/04/26 09:08
Python安装第三方库报错:Python version 2.7 required, which was not found in the registry.
解决方法是执行下面的脚本register.py:
import sys from _winreg import * # tweak as necessaryversion = 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()
0 0
- Python安装第三方库报错: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 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 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
- 安装第三方库出现 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解决办法
- 安装 MySQLdb 出现 Python version 2.7 required, which was not found in the registry
- Struts2 Action访问web元素的四种方式
- 冒泡排序 java
- Mysql 基本命令
- java生成唯一的记录标识
- C#项目之 GMap.net 标记点及 绘制多点之间的距离
- Python安装第三方库报错:Python version 2.7 required, which was not found in the registry.
- c#开发微信公众平台关键代码
- 集成ad gallery 和 funcyBox 实现图片轮转,并点击放大
- 2014年哪些网页设计流行趋势最值得关注的?
- Buffer Sort
- 黑马程序员—Runtime类,Date类,Calendar类,Math类
- android -- 蓝牙 bluetooth (一) 入门 .
- 一个非常好的01背包问题的详解,非常清晰
- 哈夫曼编解码的C++实现