With an explorer go into your python folder Download http://effbot.org/zone/python-register.htm into register.py
Put the following code into a file name "register.py" #---------------------------------------------------------------------- # script to register Python 2.0 or later for use with win32all # and other extensions that require Python registry settings # # written by Joakim Löw for Secret Labs AB / PythonWare # # source: # http://www.pythonware.com/products/works/articles/regpy20.htm 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_LOCAL_MACHINE, regpath) except EnvironmentError: try: reg = CreateKey(HKEY_LOCAL_MACHINE, 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() #---------------------------------------------------------------------- Execute the 'Python.exe' file >>> import os >>> os.system('Python register.py') >>> os.system('Python register.py') ... --- Python 2.4 is now registered! Normally your python will be again registered no matter what may have it made not be registered anymore. Rune Strand a écrit : > Hi, > > setuptools-0.6c11.win32-py2.6.exe will not install on Win 7 with python 2.6.4 > installed. > > Dialog says: "Python version 2.6 is required, which was not found in the > registry" > > > I run py32 on win64 > > C:\>python > Python 2.6.4 (r264:75708, Oct 26 2009, 07:36:50) [MSC v.1500 64 bit (AMD64)] > on > win32 > > best regards > _______________________________________________ > Distutils-SIG maillist - Distutils-SIG@python.org > http://mail.python.org/mailman/listinfo/distutils-sig -- Cordialement, KiOrKY GPG Key FingerPrint: 0x1A1194B7681112AF
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig