Cannot install PIP on Windows 10

2020-03-27 12:02发布

问题:

I ran the Python 3.5.1 installer from https://www.python.org/downloads/release/python-351/. However, on the command line, when I go to run pip, I see an error: 'pip' is not recognized as an internal or external command.

Is there something wrong?

回答1:

The solution is to get the latest pip installer script from: https://bootstrap.pypa.io/get-pip.py, and install it with python get-pip.py.

Then you can use commands like python -m pip ... to your heart's content.



回答2:

You must to add pip's path into Environment Variables. Pip is contained in python's script directory.

Example my case: C:\Python34\Scripts\pip.exe

To add path to environment variables.

  1. Hold Win and press Pause.
  2. Click Advanced System Settings.
  3. Click Environment Variables.
  4. Add C:\Python34\Scripts (Sorry I don't know name of python 3.5's directory) to the Path on System variables.
  5. Restart Command Prompt.

Edit

In another way, you can use pip-Win instead of pip. Read more here: https://sites.google.com/site/pydatalog/python/pip-for-windows



标签: python pip