自制程序的python公式是python3。为了避免破坏希望python命令运行python2的应用程序,brew install python不添加python命令,只添加python3。注意事项包括在brew info python中:
Python has been installed as
/usr/local/bin/python3
Unversioned symlinks python, python-config, pip etc. pointing to
python3, python3-config, pip3 etc., respectively, have been installed into
/usr/local/opt/python/libexec/bin
自制程序的
python
公式是python3。为了避免破坏希望python
命令运行python2的应用程序,brew install python
不添加python
命令,只添加python3
。注意事项包括在brew info python
中:仅使用自制程序时,通过在shell配置中添加如下行,很容易使
python
指向Python 3:因此,一种解决方案是将
^{pr2}$pyenv
链接到该目录:这将使
python
工作。但是,这意味着python3.6
将不工作,因为可执行文件又存在于$(brew cellar python)/3.6.5
中,因此它不是一个完整的解决方案。我还没有找到任何方法可以在不手动添加符号链接的情况下保留这两种行为。在相关问题 更多 >
编程相关推荐