I haven't written anything more than an introductory article about other people.
Install pyenv with homebrew, The content is that I don't use anyenv.
I wanted to include awscli.
Understanding Shims | yyuu/pyenv Understanding Shims
pyenv works by inserting a directory of shims at the front of your PATH:
~/.pyenv/shims:/usr/local/bin:/usr/bin:/bin
That's why
Write the setting to pass the path to ~ / .pyenv / shims
in the file that is read when the shell starts.
The following settings initialize pyenv by adding the path only if ~ / .pyenv
exists.
# pyenv -----------------------------------------
if [ -d $HOME/.pyenv ]; then
export PATH="${HOME}/.pyenv/shims:$PATH"
eval "$(pyenv init -)"
fi
//Install pyenv using brew
$ brew install pyenv
//Install plugin to automate pyenv rehash
$ git clone https://github.com/yyuu/pyenv-pip-rehash.git ~/.pyenv/plugins/pyenv-pip-rehash
//Check the installable version
$ pyenv install -l
//Install by specifying the version of python
$ pyenv install 2.7.8
//python path check
$ which python
/Users/qurage/.pyenv/shims/python
//python version check
$ python --version
Python 2.7.8
// easy_install path check
$ which easy_install
/Users/qurage/.pyenv/shims/easy_install
// easy_install version check
$ easy_install --version
setuptools 5.7
//Check pip version and path
$ pip —version
pip 1.5.6 from /Users/qurage/.pyenv/versions/2.7.8/lib/python2.7/site-packages (python 2.7)
Recommended Posts