I started Python because I wanted to easily analyze the data of the products I run. I was wondering whether to choose R or Python, but I chose Python for the following three reasons.
The environment is Mac OSX 10.10.5, and it is assumed that Xcode and homebrew are installed.
A tool that allows you to easily switch between Python versions. You can install multiple versions of Python and specify the version to use for each directory. There are 2 series and 3x series in Python. Version control tools are useful because they are not syntactically compatible, so you can't read code 2 in series 3 and vice versa.
Install pyenv from homebrew.
$ brew install pyenv
Set environment variables for your shell (if you're using bash).
$ echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
Confirm that the installation is complete.
$ pyenv version
Python is installed by default on Mac, but install the required version from pyenv. The version is OK if you install the latest version of 2 series and 3 series.
Use pyenv to see a list of installable versions.
$ pyenv install -l
Install python 3 series (3.5.2) from pyenv.
$ pyenv install 3.5.2
Next, install python 2 series (2.7.12) from pyenv.
$ pyenv install 2.7.12
Set the version to be used as a whole.
$ pyenv global 3.5.2
Confirm that the installation is complete.
$ pyenv versions
A package that allows you to create a virtual environment for Python. You can change the Python version for each project, or install and run the required packages separately.
Install virtualenv from homebrew.
$ brew install pyenv-virtualenv
Set environment variables for the shell.
$ export PYENV_ROOT=$HOME/.pyenv
$ export PATH=$PYENV_ROOT/bin:$PATH
$ eval "$(pyenv init -)"
I don't use anaconda. The reason is that by entrusting all library management to anaconda, trouble may occur when installing other packages with pip.
If you have any questions or mistakes, please comment. I hope that what my friends have taught me will help more people.