Where is pip installed to when using get-pip.py?

前端 未结 7 1717
既然无缘
既然无缘 2021-02-01 04:43

I just installed pip on OS X using the get-pip.py script provided by the developers. The script said it ran successfully, but I cannot execute pip from the command

相关标签:
7条回答
  • 2021-02-01 04:53

    here you can find where the pip packages are., In linux

    /usr/lib/python2.7/site-packages
    

    on mac

    /usr/local/lib/python2.7/site-packages/
    
    0 讨论(0)
  • 2021-02-01 04:59

    For me, it was in the directory below and I created an alias to just be able to run it with pip.

    alias pip='python /lnx510/home/<username>/.local/lib/python2.6/site-packages/pip'

    0 讨论(0)
  • 2021-02-01 05:01

    If you can't find the path to pip you can simply use python -m pip instead:

    python -m pip install awesome_package
    
    0 讨论(0)
  • 2021-02-01 05:04

    On linux you can use:

    which pip 
    

    To find the location of pip.

    0 讨论(0)
  • 2021-02-01 05:10

    Do you know your python path? If yes, then look under the Scripts directory.

    For me (Windows user), pip it is located in

    C:\Python27\Scripts\pip.exe

    Correspondingly for Linux, it should be inside

    /usr/lib/python2.7/dist-packages/pip

    Also, if you have Homebrew installed, pip installs with python:

    brew install python

    And, the fact that you have python & pip installed & cannot get pip but can get python from the command line (path), pip must have been misconfigured.

    If you still can't find it, you can use locate pip for Linux, or a corresponding search method for other OSs. Also, in your case, it already seems to be in

    /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages

    as per the output message.

    0 讨论(0)
  • 2021-02-01 05:12

    I've found the installation path. It is located here:

    /Library/Frameworks/Python.framework/Versions/3.3/bin/pip

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