pyenv: python version control tool
$ brew install pyenv
$ pyenv --version
$ echo 'if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi' >> ~/.bash_profile
$ pyenv install -l
$ pyenv install [Installation ver]
$ pyenv versions
$ pyenv global [Ver you want to use]
$ pyenv rehash
$ pyenv version
$ python3 --version
$ pyenv local [Ver you want to use]
http://www.task-notes.com/entry/20141215/1418612400
virtualenv: for creating different environments with the same (python) version
$ pip install virtualenv
anaconda: A collection of packages (NumPy, SciPy, pandas, matplotlib, scikit-learn, etc.)
$ pyenv install -l
$ pyenv install [Anaconda ver]
$ pyenv global [Anaconda ver]
$ pyenv versions
$ conda create -n [Virtual environment name] python(=3.6) (anaconda)
$ conda info -e //Environment list
$ source activate [Virtual environment name] //Enter the virtual environment
$ source deactivate //Get out of the virtual environment
$ conda remove -n [Virtual environment name] --all //Delete virtual environment
http://creata.hatenablog.com/entry/2016/12/18/174533
$ cd [Working directory]
$ pyenv local [Anaconda ver]/envs/[Virtual environment name]
$ echo 'alias activate="source [User directory]/versions/anaconda3-4.4.0/bin/activate"' >> ~/.bash_profile
$ source ~/.bash_profile
$ activate //Enter the virtual environment
http://qiita.com/togoturns/items/b2ae361a669933c823f5 Solved the problem that terminal crashes: http://qiita.com/y__sama/items/f732bb7bec2bff355b69
$ activate [Virtual environment name]
$ python [file name].py
Recommended Posts