Python Forum
Python 3.5.2-bit install SNAFU
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python 3.5.2-bit install SNAFU
#1
My current "production" version of Python is the 64-bit version of release 2.7 under Windows 7. I'm trying to install the 64-bit version of release 3.5.2 as well, and it's giving me a very hard time.

The first time I installed it, I used the web installer. It put Python in C:\Users\<account>\AppData\Local\. Silly me, I thought, I must have forgotten to click "for all users." I uninstalled it and reinstalled it, taking care to select "for all users," and it went to exactly the same place.

I moved it to C:\Program Files\, where it worked fine -- until I had to install a package. The package installer wanted to put the package in C:\Users\<account>\AppData\Local\, and wouldn't let me change that.

I tried the executable installer, but it failed, saying that Python 3.5 was already installed. Deleting it from C:\Program Files did not help. I restored the deleted files and tried to uninstall it with the Control Panel's Applications and Services, but that said it couldn't uninstall Python 3.5 because it wasn't installed.

I deleted the files again, opened the registry editor, and deleted all references to Python 3.5 from the only place I could find them (HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore). Then I tried to run the executable installer again, and it failed again because Python 3.5 was already installed.

So I can't install it because it's already installed, I can't uninstall it because it's not installed, and whatever bits say it's installed are hidden someplace where I can't find them.

Can anyone suggest a way to destroy my computer's memory of Python 3.5 so I can start fresh? And for bonus points, a way to install it in C:\Program Files, where it's supposed to be?
Reply
#2
Wow, that's quite the mess. For future reference, when I'm doing that kind of stuff, I never delete files, and I do all the moving via command line so that I have a history I can reference to revert such things if they go so very wrong...

All that said, I haven't used Windows in years, so I don't have any real sage advice, but potentially very luckily a newer version of Python was released a few days ago. Perhaps it'll let you install that?
Reply
#3
Bad news: uninstallers seldom remove everything.  Good news: Windows does not rely on Python.
1) Go into File Explorer, make sure you select the 'C:\" drive, in the search box, type in "Python" (case doesn't matter). When the search is done, you will probably end up with a lot of entries...delete them all.

2) Go into the Environmental Variable. Look for the "Path" and/or "Pythonhome" variable in both User and System variables. Delete any reference to Python.

3) Backup Registry, just in case. Go into regedit, make sure you are at the top of the tree.  Click on Edit, click on Find, enter "python", click on Find Next. Delete the entry. Continue to click on Edit, click on Find Next, delete entry until entire registry has been searched. Note: There will be a lot of entries.

4) You should now have a "clean" environment for a new install of Python. Make sure you READ the instructions carefully as you install, including who you want to install it for, where you want it installed, install pip, add to environmental variables.

5) If you are installing multiple versions of Python, install the lowest version first and work your way up.

A caveat, although Windows doesn't use Python, certain Open Source programs do (for example, Libre Office, Notepad++, etc). If you have any of these programs, you will see their file path while searching in File Explorer and the Registry. If that happens, then of course, don't delete those entries, unless, of course, you've deleted those programs in the past.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#4
(Dec-28-2016, 03:46 AM)sparkz_alot Wrote: ...in the search box, type in "Python"... you will probably end up with a lot of entries...delete them all.

I'm afraid that's not possible. While Windows does not depend on Python, my job does, and so do several applications that I need... and if I delete an entry that Python 2.7 happens to rely on, the consequences could be serious.

I searched the drive for references to Python, and there are indeed a lot of them. When I have time, I'll go through them and delete any that clearly relate only to Python 3.5. (It will probably take a good part of a day.) I'm not optimistic that I'll get them all, though. If there's an alternative approach, I'd welcome it.

Micseydel, a newer version of Python is, unfortunately, also not an option at this point. I've got both a laptop (this machine) and a desktop computer for work, and need both. Python 3.5 is already installed on the desktop. If I install 3.6 on the laptop I'll have to install a separate set of packages for 3.6, with a separate set of quirks and bugs, and  some of them may not even be available yet. I will have to stick with the same minor version on both machines until I'm prepared to upgrade both.
Reply
#5
Your right, it does become a bit more complex when multiple versions are installed and will take longer as you will need to look at each entry more closely.  You might try using "python3*" in both the File Manager and Registry.  It should shorten the list a bit.  It may not list all the "artifacts" but perhaps enough to allow a new installation.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#6
sparkz_alot, python3* is a good suggestion, and I'll try it.

I checked the system path, and found references to Python 2.7 but none to 3.5. I'm now reviewing references to Python in the Registry, which I hope will be sufficient to fix the problem.

I found the following entries, in order, in HKEY_LOCAL_MACHING\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\Folders:

1. Dozens of entries named with the pathnames of folders in the location in C:\Users where the installer put Python 3.5.
2. An entry named C:\Users\<account>\AppData\Roaming\Microsoft\Installer.
3. An entry named C:\Users\<account>\AppData\Roaming\Microsoft\Installer\{xxx}\, where xxx is a long hyphenated hexadecimal number.
4. An entry named C:\Users\<account>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Python 3.5\.

The first and fourth are clearly associated with Python 3.5. The second and third are not clearly associated with it, but since they're sandwiched between the other two, perhaps they are as well. Or perhaps they're unrelated, and their position is entirely due to alphabetic order. Do you have any thoughts on this?
Reply
#7
You might want to download bleachbit and run that to cleanup things that you may have missed.
Reply
#8
Quote:I checked the system path, and found references to Python 2.7 but none to 3.5
 I would leave this alone.  As to the others, 1 & 4 can definitely be removed. The other two, well they refer to the file locations referenced. These are files MS records when you install a program and is used for updates and uninstalling. If you delete them, the program will still work, but you will get an error if you try uninstalling the program. In File Explorer, if you look for this entry
" C:\Users\<account>\AppData\Roaming\Microsoft\Installer\{xxx}\" and it's there, you can click on it and get an idea of what it's for. If it's not there, it's an unused entry and can be removed.

Larz60+ also has a good idea. I will add to his suggestion of Bleachbit, CCleaner and Auslogics Registry Cleaner. Note that the first two analyze the file system and registry, Auslogics only analyzes the registry. Not surprisingly all three will come up with different results, so I use two of them. All three operate in what I'll call "safe" mode. They report only what they determine is safe to delete and therefore may not report all instances. All three have the option to "backup" before deleting and I would suggest doing that, especially if you've never used the product before. I've never had to restore after cleaning, but better safe than sorry right? Both Bleachbit and CCleaner claim nadware, spyware, malware, browser toolbars, or "value-added software. Auslogics will try and install it's Boostspeed, but you can uncheck that option.  If you go this route, run the program(s) then try your searches again and see what you come up with.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020