Why are there 3 pythons installed on my computer?
When I try to see the version of python installed on my computer, I see the followings: 

(base) dhcp76:bin me$ python -V


Python 2.7.16 :: Anaconda, Inc.

(base) dhcp76:bin me$ python2 -V


Python 2.7.16

(base) dhcp76:bin me$ python3 -V


Python 3.7.3

Would this cause any issue? I have also installed anaconda3, but python3 doesn't point to that, and I don't know how to make it point to anaconda3.

So, my questions:


Would having 2 python versions both by brew and anaconda cause problems? If yes, should I remove one of them? (I prefer anaconda)
I installed pytorch using this link: http://deeplizard.com/learn/video/UWlFM0R_x6I, and now when I do import torch in all three version it works!! How is this possible if this links only installs using pip3?


Thanks!

Yes, having different version of Python can cause significant headache when you're installing python packages.

For example, if you install a package with Brew, your Anaconda installation might not be able to find it and vice-versa.

I had numerous consistency issues with maintaining all these different version of Python before I decided to completely uninstall all of them and only keep MacPorts as my general package manager.

When you use sudo pip install that could be using a different python than when you use python -m pip install which could be different from pip3 install ... etc.

There are lots of tradeoffs to each package manager.


Brew is good for people who want to get up to speed on a project quickly.
Anaconda has a great interface that allows you to minimize command line interface interactions and abstracts away some configuration stuff.
Macports has way more packages actively maintained than Brew, but requires more setup. For me, it was worth it because I've never had Python package dependency issues anymore. (Though that was also due to learning how to properly use virtualenvwrapper too.)


Most of the time, if you are fully aware of which pip/python you're calling, then you can avoid any issues and have all three.

However realistically, you may lose track of which Python versions are available with which packages in which system paths.

If things get bad, you might encounter situations where you try to pip install a package, and your system will say it already exists, but you may not be able to import &lt;package&gt; from python &lt;file&gt;.py or Terminal.
