Tutorial do pip de instalação do Mac

pip é uma ferramenta essencial de gerenciamento de pacotes no processo de desenvolvimento do python. No Mac, primeiro pensamos em brew ao instalar

brew install pip

Mas há um problema com esta instalação:

Error: No available formula with the name "pip" 
pip is part of the python formula:
  brew install python

ou um pouco mais detalhado, como este:

Error: No available formula with the name "pip"
Homebrew provides pip via: `brew install python`. However you will then
have two Pythons installed on your Mac, so alternatively you can install
pip via the instructions at:
  https://pip.readthedocs.org/en/stable/installing/#install-pip

Então instale-o com

sudo easy_install pip

Ou você pode usar as outras duas maneiras:

  • instalação do código fonte

    $ wget http://pypi.python.org/packages/source/p/pip/pip-0.7.2.tar.gz (替换为最新的包)
    $ tar xzf pip-0.7.2.tar.gz
    $ cd pip-0.7.2
    $ python setup.py install
    
  • instalação do script

    $ curl -0 https://raw.github.com/pypa/pip/master/contrib/get-pip.py
    $ sudo python get-pip.py
    

Todos os três são bons, mas o primeiro é mais comumente usado.

Acho que você gosta

Origin blog.csdn.net/quanqxj/article/details/89361600
Recomendado
Clasificación