安装PIL遇到python version 2.7 required, which was not found in the registry解决办法
2014-08-07 15:25
861 查看
今天安装PIL,使用命令行执行提示“Unable to find vcvarsall.bat”错误
网上有好多说要安装MinGW,我记得以前装codeblock的时候装过,试了一下这个安装路径
然后提示gcc错误
网上提示的解决办法是安装vs2000或者2010
感觉好麻烦
后来发现可以采用另外一种安装办法,使用二进制执行文件安装
1.下载执行文件http://www.pythonware.com/products/pil/
2.双击执行安装,可能会遇到问题
“python version 2.7 required, which was not found in the registry”
原来python不在注册表里
将如上代码copy到一个python文件里register.py保存,命令行切到所在目录,执行python register.py
然后再安装pil就OK了
网上有好多说要安装MinGW,我记得以前装codeblock的时候装过,试了一下这个安装路径
然后提示gcc错误
网上提示的解决办法是安装vs2000或者2010
感觉好麻烦
后来发现可以采用另外一种安装办法,使用二进制执行文件安装
1.下载执行文件http://www.pythonware.com/products/pil/
2.双击执行安装,可能会遇到问题
“python version 2.7 required, which was not found in the registry”
原来python不在注册表里
# # 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 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()
将如上代码copy到一个python文件里register.py保存,命令行切到所在目录,执行python register.py
然后再安装pil就OK了
相关文章推荐
- python2安装PIL等第三方库提示Python version 2.7 required, which was not found in the registry的解决方法
- [解决]在安装Python PIL 时出现错误: 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.”
- 解决安装MySQL-python出现的:Python version 2.7 required, which was not found in the registry
- 安装Python第三方模块遇到Python version 2.7 required, which was not foundin the registry的问题
- 安装PIL等库出现Python version2.7 required,which was not found in the registry.
- 安装win32com报错-Python Version 2.7 required which was not found in the registry 问题解决 .
- win7+py2.7+pyHook的安装,并解决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 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.
- 安装 MySQLdb 出现 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
- ②window764bits安装MySQL-python-1.2.4--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安装路径 出错信息为 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.
- (转)Python Version 2.7 required which was not found in the registry 问题解决