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

前端 未结 30 2559
迷失自我
迷失自我 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:19

    I had this same issue. You just need to go to your

    C:\Python27\Scripts

    and add it to environment variables. After path setting just run pip.exe file on C:\Python27\Scripts and then try pip in cmd. But if nothing happens try running all pip applications like pip2.7 and pip2.exe. And pip will work like a charm.

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

    In latest version Python 3.6.2 and above, is available in

    C:\Program Files (x86)\Python36-32\Scripts

    You can add the path to our environment variable path as below

    Make sure you close your command prompt or Git after setting up your path. Also should you open your command prompt in administrator mode. This is example for Windows 10.

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

    In Windows, open cmd and find the location of PYTHON_HOME using where python. Now add this location to your environment variable PATH using:

    set PATH=%PATH%;<PYTHON_HOME>\Scripts
    

    Or refer to this.


    In Linux, open a terminal and find the location of PYTHON_HOME using which python. Now add the PYTHON_HOME/Scripts to the PATH variable using:

    PATH=$PATH:<PYTHON_HOME>\Scripts
    export PATH
    
    0 讨论(0)
  • 2020-11-21 06:23

    When installing SQL 2019 Python, there are known issues for PIP which require a fix (step 7) https://docs.microsoft.com/en-us/sql/advanced-analytics/known-issues-for-sql-server-machine-learning-services?view=sql-server-ver15

    pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

    Workaround
    Copy the following files:
    
    libssl-1_1-x64.dll
    libcrypto-1_1-x64.dll
    
    from the folder 
    C:\Program Files\Microsoft SQL Server\MSSSQL15.MSSQLSERVER\PYTHON_SERVICES\Library\bin
    to the folder 
    C:\Program Files\Microsoft SQL Server\MSSSQL15.MSSQLSERVER\PYTHON_SERVICES\DLLs
    
    Then open a new DOS command shell prompt.
    
    0 讨论(0)
  • 2020-11-21 06:23

    I continued to receive this error after correcting my PATH.

    If your codebase requires that you have an earlier version of Python (2.7 in my case), it may have been a version prior to the existence of pip.

    It's not very canonical, but installing a more recent version worked for me. (I used 2.7.13.)

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

    Go to control Panel >> Uninstall or change Program and double click on Python XXX to modify install. Make sure PIP component is checked and install.

    enter image description here

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