之前,我有这个:
$ python # version 2.7.x
$ python3 # version 3.6.x
这个本来是正常工作的。我愚蠢地试图修复一些没有问题的东西,然后运行了以下命令:
brew install python@2
brew install python@3
我认为这样做可以实现以下目的:
$ python2 # version 2.7.x
$ python3 # version 3.6.x
但实际上它所做的是:
$ python2 # doesn't exist, damnit
$ python # version 3.6.x
我期望得到的最终结果:
$ python # version 2.7.x
$ python2 # version 2.7.x
$ python3 # version 3.6.x
实际上,如果可能的话,在版本2/3之间切换$python
会很好。我如何在MacOS上做到这一点?