更新时间:2023-01-14 22:10:31
由于从版本2.7.13_1
开始对python2的Homebrew公式进行了最新更改,因此Homebrew不再为python
创建到Homebrew版本的符号链接.
Due to a recent change in the Homebrew formula for python2 starting with version 2.7.13_1
, Homebrew no longer creates a symlink for python
to the Homebrew version.
相反,它仅安装和符号链接python2
.您需要采取其他步骤才能使用它,而不是Python的系统版本.
Instead, it only installs and symlinks python2
. You will need to take an additional step to use it instead of the system version of Python.
请参阅此软件包信息中的注意事项"部分.下面是一个示例,但请注意,实际导出的PATH已生成,并且在您的计算机上可能有所不同.
See the "Caveats" section in this package's info. Below is an example, but note that the actual PATH to export is generated and may be different on your machine.
$ brew info python2
... snip ...
=> 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="<... some path ...>:$PATH"
... snip ...
Homebrew talked more about this change in their recent release notes.