Python installation material. I have re-installed the Python environment on Mac OS X Mavericks, so I will summarize it.
There are tools such as pyenv and pythonz for inserting multiple versions of Python, but sometimes everyone loves Homebrew if it is good to use 2.7x series and 3.x series, which are the two major trends of Python. I'm wondering if there is.
brew install python
brew install python3
This will install the latest version of python 2.x series and 3.x series respectively. You can check which python is installed successfully.
[~] which python3
/usr/local/bin/python3 ← Path entered by homebrew
[~] which python
/usr/bin/python ← something different
Some people will do both well, while others will be like the above. In this case, python is not the 2.x installed by homebrew, but the one installed by default on the Mac.
The cause is that usr / bin is described before usr / local / bin in the PATH setting and has priority.
[~] vim /etc/paths
/usr/local/bin ←/usr/Described above bin
/usr/bin
/bin
/usr/sbin
/sbin
:
Let's modify the PATH directly and start the terminal.
[~] which python
/usr/local/bin/python
Now you can see that the python 2.x series also uses the one installed via homebrew.
Next time based on this Python Using multiple versions of Python on Mac OS X (2) Usage Now, let's create the environment actually used for development using virtualenv.
Recommended Posts