'pip' is not recognized as an internal or external command

前端 未结 30 2545
迷失自我
迷失自我 2020-11-21 05:41

I\'m running into a weird error when trying to install Django on my computer.

This is the sequence that I typed into my command line:



        
相关标签:
30条回答
  • 2020-11-21 06:15

    Small clarification: in "Windows 7 64 bit PC", after adding ...Python34\Scripts to the path variable, pip install pygame didn't work for me.

    So I checked the "...Python34\Scripts" folder, it didn't have pip, but it had pip3 and pip3.4. So I ran pip3.4 install pygame .... .whl. It worked.

    (Further open a command window in the same folder where you have the downloaded pygame...whl file.)

    0 讨论(0)
  • 2020-11-21 06:16

    For Windows, when you install a package, you type:

    python -m pip install [packagename]
    
    0 讨论(0)
  • 2020-11-21 06:16

    As per Python 3.6 Documentation

    It is possible that pip does not get installed by default. One potential fix is:

    python -m ensurepip --default-pip
    
    0 讨论(0)
  • 2020-11-21 06:16

    Most frequently it is:

    in cmd.exe write

    python -m pip install --user [name of your module here without brackets]
    
    0 讨论(0)
  • 2020-11-21 06:17

    In a Windows environment, just execute the below commands in a DOS shell.

    path=%path%;D:\Program Files\python3.6.4\Scripts; (new path=current path;path of the Python script folder)

    0 讨论(0)
  • 2020-11-21 06:19

    Also, the long method - it was a last resort after trying all previous answers:

    C:\python27\scripts\pip.exe install [package].whl
    

    This after cd in directory where the wheel is located.

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