python 2.7: cannot pip on windows “bash: pip: command not found”

前端 未结 8 1359
南笙
南笙 2020-12-03 00:31

I am trying to install the SciPy stack located at https://scipy.org/stackspec.html [I am only allowed 2 links; trying to use them wisely]. I realize that there are much eas

相关标签:
8条回答
  • On windows 7, you have to use this command: python -m pip install xxx. All above don't work for me.

    0 讨论(0)
  • 2020-12-03 01:11

    I found this much simpler. Simply type this into the terminal:

    PATH=$PATH:C:\[pythondir]\scripts 
    
    0 讨论(0)
  • 2020-12-03 01:18

    On Windows, pip lives in C:\[pythondir]\scripts.

    So you'll need to add that to your system path in order to run it from the command prompt. You could alternatively cd into that directory each time, but that's a hassle.

    See the top answer here for info on how to do that: Adding Python Path on Windows 7

    Also, that is a terrifying way to install pip. Grab it from Christophe Gohlke. Grab everything else from there for that matter. http://www.lfd.uci.edu/~gohlke/pythonlibs/

    0 讨论(0)
  • The problem is that your Python version and the library you want to use are not same versionally (Python). Even if you install Python's latest version, your PATH might not change properly and automatically. Thus, you should change it manually.After matching their version, it will work.

    Ex: When I tried to install Django3, I got same error. I noticed that my PATH still seems C:\python27\Scripts though I already install Python3.8, so that I manually edited my PATH C:\python38\Scripts and reinstalled pip install Django and everything worked well.

    0 讨论(0)
  • 2020-12-03 01:21
    1. press [win] + Pause
    2. Advanced settings
    3. System variables
    4. Append ;C:\python27\Scripts to the end of Path variable
    5. Restart console
    0 讨论(0)
  • 2020-12-03 01:24

    If this is for Cygwin, it installs "pip" as "pip2". Just create a softlink to "pip2" in the same location where "pip2" is installed.

    0 讨论(0)
提交回复
热议问题