[PYTHON] Anaconda: Beginners Guide

I installed Anaconda, one of the Python distributions, and summarized the simple operations.

Author's environment

MacOS Sierra 10.12.1

Feature

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).

Installation

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. **

Check version, get package list

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)

Environmental setting

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.

About Jupyter Notebook

After installing Anaconda, you can start it by typing jupyter notebook on terminal.

Recommended Posts

Anaconda: Beginners Guide
Python Beginner's Guide (Functions)
Python Dictionary Beginner's Guide
Python Beginner's Guide (Introduction)
anaconda
Python Beginner's Guide (Variables / Arrays)
Introduced anaconda
Anaconda 2.5 Release
Download Anaconda
For beginners to build an Anaconda environment. (Memo)
[For beginners] What to do after installing Anaconda