How to run Pip commands from CMD

后端 未结 7 1239
醉酒成梦
醉酒成梦 2020-11-28 02:16

As I understand, Python 2.7.9 comes with Pip installed, however when I try to execute a Pip command from CMD (Windows) I get the following error:



        
7条回答
  •  心在旅途
    2020-11-28 02:50

    In my case I was trying to install Flask. I wanted to run pip install Flask command. But when I open command prompt it I goes to C:\Users[user]>. If you give here it will say pip is not recognized. I did below steps

    On your desktop right click Computer and select Properties

    Select Advanced Systems Settings

    In popup which you see select Advanced tab and then click Environment Variables

    In popup double click PATH and from popup copy variable value for variable name PATH and paste the variable value in notepad or so and look for an entry for Python.

    In my case it was C:\Users\[user]\AppData\Local\Programs\Python\Python36-32

    Now in my command prompt i moved to above location and gave pip install Flask

提交回复
热议问题