Python 2.7.2 for Windows reports version as 2.7.0?

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Wed Jun 22 06:13:00 EDT 2011


En Sun, 19 Jun 2011 12:35:38 -0300, <python at bdurham.com> escribió:

>> The version info comes from the DLL - I wonder if the DLL being found  
>> is somehow old?
>>
>> Make sure:
>>
>> >>> import sys
>> >>> win32api.GetModuleFileName(sys.dllhandle)
>>
>> Is the DLL you expect.
>
> After uninstalling and reinstalling for the current user only (vs. all
> users), Python now reports the correct version number.
>
> And running your code above confirms that the proper DLL is being loaded
> (c:\Python27\Python27.dll).
>
> My original version of Python 2.7.0 was installed for all users and when
> I ran the 2.7.2 MSI I chose to install for all users as well.
>
> After running the 2.7.2 MSI, my Python exe's had the correct timestamps,
> but I failed to check the python27.dll timestamp to see if this file was
> out-of-date.
>
> I wonder if changing my install method to current user forced the
> installation of the updated python27.dll? And perhaps the default 2.7.2
> installation in all users mode (when one is updating an existing 2.7
> installation) doesn't update the Python27.dll under some conditions?

In a "for all users" install, python27.dll goes into c:\windows\system32,  
not c:\python27

Maybe you installed 2.7.0 twice, "for all users" and also "for current  
user only", and both in the same directory (c:\python27). That could  
explain the old .dll in the install directory; the new one goes into  
system32, but the old one takes precedence.

-- 
Gabriel Genellina




More information about the Python-list mailing list