When installing pil-1.1.7.win32-py2.7, you can no longer recognize it in the registration form python2.7
Method: Create a new register.py file, paste the code in, save
# # Script to register Python 2.0 or later-win32all# and other extensions that require Python registry setting s## written by Joakim Loew for Secret Labs ab/pythonware## source:# http://www.pythonware.com/products/works/articles/re gpy20.htm## modified by Valentine Gogichashvili as described in http://www.mail-archive.com/[email protected]/ msg10512.html Import sys from _winreg import * # tweak as Necessaryversion = Sys.version[:3]installpath = Sys.prefix Regpa th = "software\\python\\pythoncore\\%s\\"% (version) Installkey = "InstallPath" Pythonkey = "PythonPath" PythonPath = "%s; %s\\lib\\;%s\\dlls\\ "% (InstallPath, InstallPath, InstallPath) def registerpy (): Try:reg = Openkey (HKEY_CU Rrent_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): Clos EKey (reg) print "= = = Python", version, "is already registered!" Return Closekey (REG) Print "* * * Unable to register!" Print "* * * you probably has another Python installation!" if __name__ = = "__main__": Registerpy ()
(Code from: http://effbot.org/zone/python-register.htm)
Show "Python 2.7 is now registered"!
When you install Setuptools, you can automatically identify the python2.7.
Win7 is 64 reasons, when installing Python (32-bit), if you choose only for the current user, the above problems will not appear, if you choose all users, then use the above method to solve it.
Python version 2.7 Required,which is not found in the registry