在使用brew安装python后,为什么它是"pip2"而不是"pip"?

heL*_*maN 5 python homebrew pip

我跑brew install python了我的mac 10.12.3,日志如下:

==> Summary
  /usr/local/Cellar/sqlite/3.20.1: 11 files, 3.0MB
==> Installing python
==> Downloading https://homebrew.bintray.com/bottles/python-2.7.13_1.sierra.bottle.tar.gz
######################################################################## 100.0%
==> Pouring python-2.7.13_1.sierra.bottle.tar.gz
==> /usr/local/Cellar/python/2.7.13_1/bin/python2 -s setup.py --no-user-cfg install --force --verbose --single-
==> /usr/local/Cellar/python/2.7.13_1/bin/python2 -s setup.py --no-user-cfg install --force --verbose --single-
==> /usr/local/Cellar/python/2.7.13_1/bin/python2 -s setup.py --no-user-cfg install --force --verbose --single-
==> Caveats
This formula installs a python2 executable to /usr/local/bin.
If you wish to have this formula's python executable in your PATH then add
the following to ~/.bash_profile:
  export PATH="/usr/local/opt/python/libexec/bin:$PATH"

Pip and setuptools have been installed. To update them
  pip2 install --upgrade pip setuptools

You can install Python packages with
  pip2 install <package>

They will install into the site-package directory
  /usr/local/lib/python2.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python.html
==> Summary
Run Code Online (Sandbox Code Playgroud)

```

正如日志所说,除了pip之外,我们还有pip2命令.这些应该怎么发生?

bfo*_*ine 6

因为这两个python2python3安装等可执行文件pippython,自制安装与任一后缀每个可执行23.

pip使用Python 2和pip3Python 3 安装的问题是人们倾向于依赖默认的非后缀版本.通过此更改,Homebrew允许您选择要使用的默认python/ pip使用例如别名或修改您的PATH.


phd*_*phd 1

由于您可以并排安装许多不同的 Python 版本(例如,我有 Python 2.7、3.4、3.5 和 3.6),许多工具通过附加版本号来区分自己。pip2pip3pip2.7pip3.4wheel对比wheel-3.6等等。