How can I use Homebrew to install both Python 2 an

2019-01-08 02:46发布

I need to be able to switch back and forth between Python 2 and 3. How do I do that using Homebrew as I don't want to mess with path and get into trouble. Right now I have 2.7 installed through Homebrew.

8条回答
霸刀☆藐视天下
2楼-- · 2019-01-08 03:27

Alternatively, you probably can just enter "python3" to run your most current version of python3.x and "python" or "python2" to run the latest installed 2.x version.

查看更多
Anthone
3楼-- · 2019-01-08 03:30

Okay, I was struggling with my brew installation of Python3, because I didn't have pip3

sudo pip3 command not found

and so I did

brew uninstall --force --ignore-dependencies python3

and installed the regular Python 3.6.2 from official distribution and then I had pip3 and all components were ok.

查看更多
登录 后发表回答