I have several two python on my mac, one is original, and another is downloaded on the website, when I open the python in terminal, how can I decide which I'm opening? Thanks for help.
3 Answers
Specify the full path to the binary.
$ some/path/to/python
...
>>>
Alternatively, create an alias to do so.
$ alias pythonx="some/path/to/python"
$ pythonx
...
>>>

- 776,304
- 153
- 1,341
- 1,358
-
so, there is no way to go to my downloaded version of python by just typing the python? – Yunfei Lu Sep 29 '15 at 21:44
-
You don't want to override the system Python if you don't know what you're doing. – Ignacio Vazquez-Abrams Sep 29 '15 at 21:45
I would recomend you to use virtual environments. Since you isolate your development environment, you are free of guilt of breaking something that is using the default Python version. Also, you can use whatever version of Python you want just by calling python
from the console, after activating the virtualenv for that project.
See http://docs.python-guide.org/en/latest/dev/virtualenvs/ in order to understand how to use it.
Here Use different Python version with virtualenv there is an explanation about how to change the Python's version for a specific environment.

- 1
- 1

- 1,654
- 3
- 16
- 30
Also, if you just need to know which installation of Python is the system using, the way to do it is typing which python
at the terminal.

- 413
- 1
- 4
- 15