-1

running windows 10 and IDLE python 3.10.1

I was trying to install pygame with pip using the pip install pygame command but couldn't get it to work. I've been reading loads of articles trying to figure out what to do but I have no idea. When I opened up command prompt and typed in pip --version following this website it came up as running pip version 3.9. I deleted all python 3.9 off my computer in case python 3.10 trying to run pip 3.9 was the problem but now it says

'pip' is not recognized as an internal or external command,
operable program or batch file.

I've deleted and redownloaded python twice now but it still won't work. Does anyone know what to do? thanks

————————

Hi there just so you know, running python -m pip install pip isn’t working and when i type python —version it says that python was not found?

tonks179
  • 7
  • 3
  • 1
    `python -m pip install pip` should do the trick. – MattDMo Jan 09 '22 at 19:41
  • Also, is the `Scripts` subfolder of wherever you installed Python in your `PATH`? – MattDMo Jan 09 '22 at 19:42
  • Try adding pip to the path and then try the same command. Visit this [page](https://www.activestate.com/resources/quick-reads/how-to-install-pip-on-windows/) and read the section **Adding PIP To Windows Environment Variables** – Siddharth Bhattacharjee Jan 09 '22 at 19:49
  • 1
    @MattDMo You can't use `pip` to install `pip` from scratch; you can only *upgrade* `pip` with itself. `pip` is not part of the standard library. – chepner Jan 09 '22 at 20:43
  • @chepner I thought it was included with the standard Windows distribution nowadays, so you don't need to download `get-pip.py`? – MattDMo Jan 09 '22 at 21:03
  • @MattDMo Mm, apparently. I knew `venv` could/does install `pip` automatically in a new virtual environment, but I was under the impression it used `ensurepip` in some way to download it. I'm seeing `python3 -m pip` working with both the stock Python 3 and a HomeBrew-installed Python 3 on my Mac. – chepner Jan 09 '22 at 21:13
  • @MattDMo When I ran python -m pip install pip it said that python was not found? Also, I'm not sure what you mean by installing python into my path, I'm quite new to this sorry. :) – tonks179 Jan 10 '22 at 21:52
  • When you install Python, there should be an option (it may be under the "Customize" menu) to install Python globally and add it to your `PATH`. Make sure that option is checked. Also, just for fun, try running `py -m pip install pip`. – MattDMo Jan 11 '22 at 03:32

1 Answers1

0

I had the same problem with "pip" and than i used this method: Those are the commands listed for you:

  1. sudo apt install python3
  2. sudo apt install python3-pip

This worked for me.

TeachMeJava
  • 640
  • 1
  • 13
  • 35
Blendi
  • 1
  • 2
  • Hi, I tried typing these into idle and command prompt, both gave me an error code. Happy to hear any other ideas. :) – tonks179 Jan 10 '22 at 21:35