Python version 2.7 required, which was not found in the registry
来源:互联网 发布:sql查询每小时 编辑:程序博客网 时间:2024/06/15 14:00
如题,很心塞啊,包的版本完全一致,但是在包的安装时却出现了这样的错误,哎,,还好后来完美解决了
我Python环境变量什么的都配置好了,版本都是2.7,整了一个晚上都没好,后来把错误百度了一下,并附上原文链接http://www.cnblogs.com/min0208/archive/2012/05/24/2515584.html
## script to register Python 2.0 or later for use with win32all# and other extensions that require Python registry settings## written by Joakim Loew for Secret Labs AB / PythonWare## source:# http://www.pythonware.com/products/works/articles/regpy20.htm## modified by Valentine Gogichashvili as described in http://www.mail-archive.com/distutils-sig@python.org/msg10512.html 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()
然后在cmd中执行一下即可
Python register.py
安装完后在Python环境下输入import win32com检查下
就是这样,是不是很简单,我瞬间心花怒放,哈哈!!
0 0
- Python安装第三方库报错:Python version 2.7 required, which was not found in the registry.
- python error 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
- 安装第三方库出现 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
- 安装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
- innodb事务隔离级别
- hdu 2444 The Accomodation of Students (判断二分图+最大匹配)
- JPA EntityManager详解
- Http长连接200万尝试及调优
- 做动态规划题的步骤和例子(还在完善中)
- Python version 2.7 required, which was not found in the registry
- Android入门-从firstactivity开始-button
- 最小生成树之prim算法
- Leetcode: Sliding Window Maximum
- Leetcode Q3:Longest Substring Without Repeating Characters
- word左边左对齐,右边右对齐
- mysql mysql SELECT 自增数显示
- windows系统突然死机,windows系统重新启动后,再启动虚拟机,发现ubuntu系统进入进入initramfs,输入exit都无法退出
- hdoj-3371-Connect the Cities【最小生成树】