安装第三方库出现 Python version 2.7 required, which was not found in the registry
来源:互联网 发布:北京网球培训班知乎 编辑:程序博客网 时间:2024/04/24 06:44
source:http://blog.csdn.net/zklth/article/details/8117207
安装第三方库出现 Python version 2.7 required, which was not found in the registry
建立一个文件 register.py 内容如下. 然后执行该脚本.
- 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()
- 安装第三方库出现 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 建立一个文件 register.py 内容如下.
- 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
- 安装 MySQLdb 出现 Python version 2.7 required, which was not found in the registry
- 安装Python-Matplotlib时出现的问题--Python version 2.7 required, which was not found in the registry
- 如何计算idf
- 如何评价一个好的推荐系统算法
- 线程面试题一
- Win8,打败你的不是天真是' 无邪‘
- Java面试题集(0313更新)
- 安装第三方库出现 Python version 2.7 required, which was not found in the registry
- c++ split
- 华为内部面试题库---(21)
- XMemcached使用示例
- 区域性名称和标识符
- spring map bean定义
- 推荐10款来自极客标签的超棒前端特效[第五期]
- .android 开发之ViewPager内嵌套ViewPager
- 画图时用到的一些方法