I installed Anaconda, one of the Python distributions, and summarized the simple operations.
MacOS Sierra 10.12.1
Anaconda is preferred in the field of data science because it comes pre-loaded with useful packages.
Use your own package management called conda (pip is also available).
Download and install the installer from the Official Site. Choose Python 3.6 or 2.7 depending on your intended use. If the capacity is tight, you can install only the packages you need, not all.
** From here on terminal operation. **
| command | Use |
|---|---|
python |
Start the interpreter and check the version. exit()Get out with. |
pip list |
pipGet a list of packages using. |
conda list |
condaGet a list of packages using.(pipRecommended over) |
Switching environment that can be done with pyenv.
| command | Use |
|---|---|
conda create --name hoge flask |
Environment name:hogeCreate a new environment for. hogeAfter that, be sure to specify one package you want(In this exampleflask). |
conda create --name hoge27 python=2.7 flask |
Environment name by specifying the Python version:hoge27Create a new environment for. |
source activate hoge |
hogeMove to the environment. |
source deactivate hoge |
hogeLeave the environment. |
conda env list |
Get a list of available environments. *Environments where those marked with are currently enabled. |
conda remove --name hoge --all |
environmenthogeDelete. |
After installing Anaconda, you can start it by typing jupyter notebook on terminal.
Recommended Posts