MacOS
$ brew install pyenv
$ brew install pyenv-virtualenv
CentOS
$ sudo su - user
$ curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash
Add the following to ~ / .bash_profile
~ or a message will appear, so if necessary
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
$ cd path/to/repo
$ pyenv install 3.5.2 #You can also select from the list by doing pyenv install whence
$ pyenv virtualenv 3.5.2 virtualenv-name # virtualenv-name is arbitrary
$ pyenv local virtualenv-name
$ cd path/to/repo
$ pip install pip-package #Individual installation
$ pip install -r requirements.txt #Bulk installation
$ cd path/to/repo
$ pip freeze > requirements.txt
Recommended Posts