Python: 64/32 bit mismatch - how to get rid of it?

252 views Asked by At

Still in the learning phase, I first installed (via Windows installer) Python 64bit and wrote me a .cmd with all the "pip installs" I felt useable. While trying out WXpython and looking forward to use it as the main GUI part, I also wanted to try out COM interfacing and that poses a problem, because at that time I just found pilib32 to do it.

While still in beginning mode I thought to just deinstall P64, deleting the remnants of the install dir right after and install a p32 right at the same place where the 64bit was installed before. To my surprise, almost half of the libraries did not survive the install run of my cmd. I decided that WXpython is more important to me than pywin32, so I rolled back the whole process again, assuming the libraries under 64 will be intact afterwards. Heck, they aren't. The same half of libraries that I had after 32bit were then usable when reinstalling 64bit.

How do I get to a stage where I can install a fresh and clean 64-bit environment again?

I used the Windows installer just because of the option to be able to deinstall clean (like not only the directories, but also possible registry keys and so forth) but to no avail.

Later, after all this, I learned that there is a cache dir of the libraries in the users directory. Did/do I have to delete this as well beforehand?

Or to shorten it: How do I prepare my computer in a way so that any proper Python install is doable like a fresh, first-time install?

1

There are 1 answers

1
A. Urbaniak On

"pip install --no-cache-dir " does not solve the uninstallation problem of Diz.

At least i had to solve this problem by hand and made myself a manual. Now i'm using both versions on my machine.

  1. Go to all control panel items and click on program and features and uninstall the python version you want to.
  2. Select the Environment Variable in Windows System and select under the System Variable section, click on Path and then Locate the bin folder of Python. Copy that path for deleting. Then select that folder and click Delete to remove it from the path.
  3. Open the Explorer and move to copied directory an delete it.
  4. Open regedit and delete the python entries of your version

Another approach is the hint of Vlad here on stackoverflow:

Open CMD

To show all packages installed - pip list

To copy the packages name to a file - pip freeze > requirements.txt

To delete all packages - pip uninstall -r requirements.txt -y

Check all packages are removed - pip list

Uninstall pip and other remaining packages

Control panel > Uninstall > Python uninstall (from UI)

Keep in mind that in your Userprofilefolder will also be files of that python version especially when used by compiling projects.