Re: [Distutils] [Bug] Failed installation. setuptools-0.6c11.win32-py2.6.exe

2009-12-15 Thread Andrey Andreev

Hi Rune,

I had a similar issue on Windows Server 2008 R2. You are probably 
running Win 7 (64bit). I ran procmon, and found out that the installer 
is looking for the keys under:


HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore
HKEY_CURRENT_USER\Software\Python\PythonCore

so I modified the register.py discussed above to write to 
HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE, which solved the issue.


Cheers,

Andrey

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] [Bug] Failed installation. setuptools-0.6c11.win32-py2.6.exe

2009-12-15 Thread P.J. Eby

At 05:17 PM 12/15/2009 +0100, Andrey Andreev wrote:

Hi Rune,

I had a similar issue on Windows Server 2008 R2. You are probably 
running Win 7 (64bit). I ran procmon, and found out that the 
installer is looking for the keys under:


HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore
HKEY_CURRENT_USER\Software\Python\PythonCore

so I modified the register.py discussed above to write to 
HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE, which solved the issue.


Sounds like maybe there's a problem with either the distutils or the 
Windows Python installer, since either the bdist_wininst isn't 
checking in the right place, or the Windows Python installer isn't 
registering in the right place.  (i.e., this would be an issue with 
*any* Python .exe-based installer on these platforms.)


___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] [Bug] Failed installation. setuptools-0.6c11.win32-py2.6.exe

2009-12-15 Thread Andrey Andreev

Hi,

P.J. Eby wrote:

At 05:17 PM 12/15/2009 +0100, Andrey Andreev wrote:
I had a similar issue on Windows Server 2008 R2. You are probably 
running Win 7 (64bit). I ran procmon, and found out that the installer 
is looking for the keys under:


HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore
HKEY_CURRENT_USER\Software\Python\PythonCore

so I modified the register.py discussed above to write to 
HKEY_CURRENT_USER instead of HKEY_LOCAL_MACHINE, which solved the issue.


Sounds like maybe there's a problem with either the distutils or the 
Windows Python installer, since either the bdist_wininst isn't checking 
in the right place, or the Windows Python installer isn't registering in 
the right place.  (i.e., this would be an issue with *any* Python 
.exe-based installer on these platforms.)


To make it more specific, my configuration is 64bit Python on 64bit OS. 
Therefore it registers under:

HKEY_LOCAL_MACHINE\Software\Python\PythonCore

The installer is 32bit, so my OS shows it
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Python\PythonCore
when it requests
HKEY_LOCAL_MACHINE\Software\Python\PythonCore

The way to handle this would be either to get Python to register under 
both registry locations when installed on 64bit Windows (thus making 
itself visible to 32bit installers), or to make 64bit installers for the 
64bit platform (so the OS would not try to trick them and push the wrong 
key). None of those sounds terribly complicated.


Best regards,

Andrey
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] [Bug] Failed installation. setuptools-0.6c11.win32-py2.6.exe

2009-12-10 Thread kiorky
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


Re: [Distutils] [Bug] Failed installation. setuptools-0.6c11.win32-py2.6.exe

2009-12-10 Thread Rune Strand

Subject: Re: [Distutils] [Bug] Failed installation. 
setuptools-0.6c11.win32-py2.6.exe

At 01:32 PM 12/9/2009 +0100, Rune Strand wrote:
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

That seems to be an indication that Python itself is not properly 
installed on your machine -- it should be in the registry.

Python exists in HKLM/Software. However, all keys but 
HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.6\InstallPath and
HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.6\PythonPath are empty.

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

How was it installed?  Did it come with your PC, or did you install it?

I installed it using the .MSI from python.org.

If this is some anomaly with my installation, I will simply uninstall etc.
Thanks


___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] [Bug] Failed installation. setuptools-0.6c11.win32-py2.6.exe

2009-12-10 Thread Rune Strand
Subject: Re: [Distutils] [Bug] Failed installation. 
setuptools-0.6c11.win32-py2.6.exe

With an explorer go into your python folder Download 
http://effbot.org/zone/python-register.htm into register.py


-- snip Put the following code into a file name register.py
#--
# script to register Python 2.0 or later for use with win32all ...


Normally your python will be again registered no matter what may have it made 
not be registered anymore.
-- snip

Thanks, but I'm afraid it didn't do the trick. Python already exist in the 
registry. I compared with other installation, and it seems identical.
Output from the script you posted:

 os.system(Python register.py)
*** Unable to register!
*** You probably have another Python installation!
0

br
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] [Bug] Failed installation. setuptools-0.6c11.win32-py2.6.exe

2009-12-09 Thread P.J. Eby

At 01:32 PM 12/9/2009 +0100, Rune Strand wrote:

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


That seems to be an indication that Python itself is not properly 
installed on your machine -- it should be 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


How was it installed?  Did it come with your PC, or did you install it?

___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig