0

I installed Python 3.10 today but when I try to run pip or pip3, the command prompt gives me an error. I tried following the instructions that the top answer in this question said. My complete path to the python interpreter is this:

C:\Users\User\AppData\Local\Microsoft\WindowsApps\python3.exe

In the WindowsApps directory, I'm supposed to have a Scripts folder. Strangely enough, I don't. Can someone please help me?

Matthew Schell
  • 599
  • 1
  • 6
  • 19
  • did you select add to path during installation? – mirodil Jan 16 '22 at 04:48
  • I don't remember. is there a way I could change that option now? Or would i have to reinstall the interpreter? – Matthew Schell Jan 16 '22 at 04:50
  • 1
    pip3 should be installed when you install python. if you didn't select the add to path, then you can find where the pip3 located and add it to path manually or you can reinstall. – mirodil Jan 16 '22 at 04:52
  • That's the thing, I don't see pip or pip3 anywhere on the system when running 'where pip' or 'where pip3'. I guess my best option is to reinstall? – Matthew Schell Jan 16 '22 at 04:53
  • running this command won't return anything if you haven't configured pip, you have to manually find it in the installation directory of python and configure it, check this ticket out it could be helpful https://stackoverflow.com/questions/22278138/where-is-pip-installed-to-when-using-get-pip-py – Rama Salahat Jan 16 '22 at 04:57
  • check if there is Scripts folder in this path `C:\Users\User\AppData\Local\Microsoft\WindowsApps\` – mirodil Jan 16 '22 at 05:00
  • @RamaSalahat `py -m pip` did the trick. now the question is how do I execute pip without typing `py -m`? – Matthew Schell Jan 16 '22 at 05:08
  • just type something like `pip list` or `pip install XXX` in the console to make sure it's working properly – Rama Salahat Jan 16 '22 at 05:13

3 Answers3

2

Check if pip3 is already installed

pip3 -v

if it is installed the output should be like that


C:\Python38\python.exe -m pip <command> [options]

Commands:

  install      Install packages.

  download                    Download packages.

  uninstall                   Uninstall packages.

  freeze                      Output installed packages in requirements format.

  list                        List installed packages.

  show                        Show information about installed packages.

  ...

  ...

Pip3 Upgrade

python -m pip3 install --upgrade pip

Pip3 Downgrade

python -m pip3 install pip==19.0
  • You led me to the right path. Thank you. After upgrading pip, it said that it wasn't in the path. Also thanks @mirodil for mentioning that too – Matthew Schell Jan 17 '22 at 02:18
1

Take a look at the following post

How can I install pip on Windows?

py -3 -m ensurepip

Alik.Koldobsky
  • 334
  • 1
  • 10
0

You can try python -m pip to use pip if it is installed.

If pip is not installed, you can always use python -m ensurepip --upgrade to install pip for your python installation.