This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Incorrect version reported after downgrade
Type: behavior Stage: resolved
Components: Installation, Windows Versions: Python 2.7
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: ezio.melotti, jpe5605, steve.dower, zach.ware
Priority: normal Keywords:

Created on 2014-08-09 21:59 by jpe5605, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
console.txt jpe5605, 2014-08-09 23:30
Messages (8)
msg225114 - (view) Author: jp (jpe5605) Date: 2014-08-09 21:59
After downgrading from version 2.7.8 to 2.7.5 on Win7 x86 32bit Python, the interpreter continues to report version 2.7.8.

I have verified that the installation folder has the correct files belonging to 2.7.5 as evidenced by python.exe having a 2013 timestamp. 

Ran python -V at windows CMD and sys.version in interpreter, both report 2.7.8.
msg225116 - (view) Author: jp (jpe5605) Date: 2014-08-09 22:52
Forget to mention this downgrade was installed over the existing python installation.
msg225117 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2014-08-09 22:57
Have you checked if there are pyc files left around by the previous installation?
Have you specified the full path to python.exe from cmd while running python -V?
If you start the interpreter and print sys.version what do you get?  Does anything change if you reload(sys)?
msg225119 - (view) Author: jp (jpe5605) Date: 2014-08-09 23:30
Have you checked if there are pyc files left around by the previous installation? -- Yes, hundreds! After making a backup, i deleted all 900+ occurrences of "*.pyc" in c:\python27 and it still reports 2.7.8.

Have you specified the full path to python.exe from cmd while running python -V?    -- Yes, i've attached the console output

If you start the interpreter and print sys.version what do you get?  Does anything change if you reload(sys)? -- 2.7.8 again, no.
msg225240 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-08-12 19:13
'python.exe' in the installation folder doesn't really matter -- it's just a tiny executable that embeds python27.dll, which contains the interpreter and is installed in C:\Windows\system32.  I suspect the installer didn't downgrade python27.dll because the installed version was newer.

As for your issue, such an in-place downgrade isn't quite supported (as you see), nor do I think it's a particularly good idea.  You should be able to achieve your goals with much less headache by uninstalling 2.7.8 completely with its own installer, then installing 2.7.5 where you want it.

Steve: is this something that would be easy/worthwhile to support in future 2.7 installers?
msg225247 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2014-08-12 23:59
Not in future 2.7 installers, certainly.

As for 3.5 and later, I'm not a fan of the global install anyway. I'd much rather Python applications install a private copy of python##.dll, and I count python.exe as just another application that should have a private copy.

We don't really have the disk space constraints any more that justify the suffering caused by sharing libraries like this (though I'm prepared to be shouted down on that, and if minimal disk usage is a principle that we ought to uphold then I'll back down too :) )
msg230129 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2014-10-28 08:38
Can this be closed then?
msg230146 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2014-10-28 13:16
I'd say so.
History
Date User Action Args
2022-04-11 14:58:06adminsetgithub: 66373
2014-10-28 13:16:16zach.waresetstatus: pending -> closed

messages: + msg230146
stage: resolved
2014-10-28 08:38:55ezio.melottisetstatus: open -> pending
resolution: wont fix
messages: + msg230129
2014-08-12 23:59:37steve.dowersetmessages: + msg225247
2014-08-12 19:13:40zach.waresetnosy: + zach.ware, steve.dower
messages: + msg225240
components: + Installation, Windows
2014-08-09 23:30:59jpe5605setfiles: + console.txt

messages: + msg225119
2014-08-09 22:57:48ezio.melottisetnosy: + ezio.melotti
messages: + msg225117
2014-08-09 22:52:52jpe5605setmessages: + msg225116
2014-08-09 21:59:44jpe5605create