Often when you start development, you can't get sudoer to put it in, but you need a library for development.
In such a case, manage with pyenv
pip install <package name> --user
This is ok
Note: If pyenv is not included, you will need sudo privileges to install it, so you have to ask the administrator to do it. (Should)
https://github.com/yyuu/pyenv#installation
mac
brew install pyenv-virtualenv
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
if which pyenv-virtualenv-init > /dev/null; then eval "$(pyenv virtualenv-init -)"; fi
3 Reread
source ~/.zshrc
ubuntu
Install pip (requires Sudo privileges)
sudo aptitude install python-pip
Install pyenv
pip install pyenv --egg
Fill in the .zshrc
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Reload .zshrc
source ~/.zshrc
pyenv install <version>
For example
pyenv install 3.5.1
pyenv global <version>
Recommended Posts