win下安装MySQL-python cx_Oracle 经常报 python version 2.7 required
来源:互联网 发布:linux rm -f 编辑:程序博客网 时间:2024/06/03 17:09
python version 2.7 required which was not found in the registry
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()
新建 register.py 文件
执行看到如下结果 重新安装即可
阅读全文
1 0
- win下安装MySQL-python cx_Oracle 经常报 python version 2.7 required
- 安装cx_Oracle报错python version 3.4 required, which was not found in the registry
- 安装mysql-python时,报错 Python version 2.7 required, which was not found in the registry.
- 原因:安装MySQL-python-1.2.3.win-amd64-py2.7.exe,时提示:Python version 2.7 required, which was not found in
- Linux下安装python cx_Oracle
- macos下 python安装cx_oracle
- 安装win32com报错-Python Version 2.7 required which was not found in the registry 问题解决 .
- linux 下安装python cx_Oracle过程详解
- Linux下安装Python的cx_Oracle模块
- linux 下安装python cx_Oracle 包
- 安装第三方库出现 Python 2.7 version required. blabla~
- ②window764bits安装MySQL-python-1.2.4--Python version 2.7 required, which was not found in the registry
- 解决安装MySQL-python出现的:Python version 2.7 required, which was not found in the registry
- 安装python cx_oracle库
- Python安装cx_Oracle
- python cx_Oracle安装
- Python 离线安装cx_Oracle
- python 安装cx_oracle注意事项
- Mac上安装scrapy
- Jquery--表单验证插件FormValidator
- 最强 Android Studio 使用小技巧和快捷键
- 如何在IDE中运行elasticsearch
- MySQL中连接池的技术实现和分析
- win下安装MySQL-python cx_Oracle 经常报 python version 2.7 required
- 函数后面加PURE
- Android中导入项目编译时报错:Java home supplied via 'org.gradle.java.home' is invalid. Invalid directory...
- 百度2017春招笔试真题编程题集合
- Hibernate不能创建表
- webrtc gclient sync运行后clang下载失败的解决办法!
- 增强学习(二)----- 马尔可夫决策过程MDP
- Jquery——数组与对象的遍历
- Eclipse新建Servlet时候,不会自动生成mapping到web.xml,而是在代码中加入注解@WebServlet