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 |
pip Get a list of packages using. |
conda list |
conda Get a list of packages using.(pip Recommended over) |
Switching environment that can be done with pyenv.
command | Use |
---|---|
conda create --name hoge flask |
Environment name:hoge Create a new environment for. hoge After 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:hoge27 Create a new environment for. |
source activate hoge |
hoge Move to the environment. |
source deactivate hoge |
hoge Leave the environment. |
conda env list |
Get a list of available environments. * Environments where those marked with are currently enabled. |
conda remove --name hoge --all |
environmenthoge Delete. |
After installing Anaconda, you can start it by typing jupyter notebook
on terminal.
Recommended Posts