1

Today, I was trying to install Python 3.10.1.

I was successful in this, but, then, as I was installing Flask, pip will tell me that it installed, then, when I run the script, it says nothing is installed.

After a while, I realized I was running my Python scripts in Python 3.10.1, but I was running pip in Python 3.7. I did as this post said and ran pip --version to discover this.

I ran pip show flask to see where the module is, and it's in the Python 3.7 folder.

However, when I tried to uninstall Python 3.7, I can't find it in my start menu or in Control Panel > Programs > Programs & Features. I believe I had uninstalled it a long time ago.

To counteract this, I did as some YouTube video said (I lost the link to it) and re-installed Python 3.10.1, checked the "Add to PATH" option, checked to install for all users, and checked on the pip install.

After doing this, I upgraded my pip version to the latest version, uninstalled Flask, and re-installed it.

It was still installed in the Python 3.7 folder.

Next, I decided I will just uninstall PIP.

I ran CMD as an Administrator and typed pip uninstall pip as instructed here.

However, when I did this, it says I'm missing access to the places it wants to modify.

I found that strange, so I checked if I'm actually running it Administrator, and, yes, I am.

Administrator: Command Prompt

I looked at the directories that it wants to modify and gave ADMINISTRATORS ownership of all of them.

Absolutely nothing changed and did it again.

I gave myself ownership of it and did it again.

Absolutely nothing changed.

Then, I decided to run pip uninstall pip again. It says pip is not installed. That's strange.

I typed pip, and the help command for pip shows up.

Then, I (probably stupidly) went to all the directories and files PIP listed that it wants to uninstall, and manually deleted them, then uninstalled Python 3.10.1, and made sure to install PIP from there.

And now we're back at Python 3.7, and pip still isn't installed somehow.

I don't know what's happening. I haven't coded anything in Python for 2 or 3 years, and I want to try again, but this is starting to confuse me. Could anyone help?


Edit: Based on the suggestion of one of the answerers, I tried to manually delete pip. I couldn't find it in %APPDATA%, but pip --version shows me the path.

I tried deleting pip from there, but it says I need permission from ADMINISTRATORS. I am an administrator on my computer -.-

Anyways, I tried to take ownership of the folder, but nothing ever came of that. security security

2 Answers2

0

Try to locate %APPDATA%\pip\pip by typing it into the file explorer. Pip will be located there, and you should be able to delete it.

0

I've managed to fix the issue.

I found that if I press this button in the start menu search for Python 3.7, it's possible to uninstall it from there (Control Panel said it uninstalled it when I used that, but it didn't).

enter image description here

I think I had installed Python from the Microsoft Store, which is why I couldn't find it in %APPDATA%.

Once I did that, I tried to uninstall Python 3.10 then re-install it. It kept saying it's installed, but it wouldn't show up in Command Prompt.

Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

I fixed this by installing Python 3.10 from the Microsoft Store instead.

This fixed the problem.

Output from pip --version: pip 21.2.4 from C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.496.0_x64__qbz5n2kfra8p0\lib\site-packages\pip (python 3.10)