Hi All,
A Tkinter issue in WSL2 pushed me to try to develop my simple tool app in Windows 11. And that is when the trail came off the rails.
I had issues with libraries not seen, inability to install Pillow via pip, and phantom python versions showing up.
So I decided to clean it all up and backed up what I thought was relevant (listings of libraries in site-packages, etc) to zip files, deleted irrelevant entries in my environmental variables (path in both user and system), rebooted, then installed Python 3.12 using the installer for windows 11.
This seemed to clean up most of the erroneous behavior, but when I type py -0p
I still get a phantom python version 3.11 that does not exist. The actual PATH does not exist. I even checked the registry for it and it is not listed there either.
C:\Windows\System32>py -0p
-V:3.12 * C:\Program Files\Python312\python.exe
-V:3.11 C:\Users{user}\AppData\Local\Programs\Python\Python311\python.exe
…that second path does not exist.
C:\Windows\System32>dir C:\Users{user}\AppData\Local\Programs\Python
Volume in drive C is OS
Volume Serial Number is {HIDDEN}
Directory of C:\Users\hopwo\AppData\Local\Programs
File Not Found
C:\Windows\System32>
… Where is the Py launcher getting the info to list a second version of python from?
I still have my failed install of Pillow to address, but there is a lot of info about newer version updates and work-arounds I have not read or tried yet, so I will keep that for a separate thread if necessary.
If anyone can help, I would certainly appreciate it! Thank you for your valuable time!
Oh I agree, I just could not figure out how to list those packages without a connected pip or python version so I just zipped them so I would have a list to follow to reinstall them. Was there a better way?
If your python completely stopped working, then sure this is a bit tricky. But you could have e.g. just made a text file listing all folders in site-packages (or all folders that end in .dist-info), far less storage space than the useless zip folder.
I solved it and learned a few other things as well. Thanks!
Removing the Python (after exporting the change just in case) entry referencing Python 3.11 from the registry, the instance disappeared from the list that the Py Launcher provides. It was in Computer\HKEY_CURRENT_USER\Software from an older install that I did not tick the ALL USERS option with. I found pieces all over my registry of other versions… 3.7-3.11 linked to PythonSoftwareFoundation but apparently of no consequence since those installs were gone long ago.
I will have to remember to uninstall instead of just deleting a folder.
Thanks for the help!
EDIT (AFTERTHOUGHT): Also, silly of me not to think of highlighting all the subfolders in site-packages and then just selecting COPY AS PATH from the right-click context menu. Then just paste either in Excel or a new doc in notepad++. A quick replace/remove of a majority of the full path and I would have my list. Sometimes I miss the obvious. Thanks for the suggestion.