Index
brew uninstall ansible --force
・ Pyenv You can install and switch between multiple versions of Python ・ Pyenv-virtualenv A pyenv plugin that allows you to switch between multiple environments with the same version of Python
brew install pyenv-virtualenv
pyenv versions
xcode-select --install #Command Line Tools installation
pyenv install 2.7.10 #Python2 in pyenv.7.10 Create environment
pyenv versions #* 1 output
pyenv virtualenv 2.7.10 ansible2 #2 in virtualenv.7.Create ansible2 based on 10
pyenv versions #* 2 output
pyenv global ansible2
pyenv versions #* 3 output
python --version => 2.7.10
echo eval "$(pyenv init -)" >> ~/.zshrc
source ~/.zshrc
pip install ansible
ansible --version => 2.x series
=>What to do if an error occurs=>Error handling 1
※1,※2, ※3
> ※1
system (set by /Users/hoge/.pyenv/version)
2.7.10
>※2
* system (set by /Users/oge/.pyenv/version)
2.7.10
2.7.10/envs/ansible2
ansible2
>※3
system
2.7.10
* ansible2 (set by /Users/hoge/.pyenv/version)
> ※4
>>Error
Confirmed because it is said that there is no gmp
# brew install gmp
=>Get angry if it's already installed
※1 error contents
src/_fastmath.c:36:11: fatal error: 'gmp.h' file not found # include <gmp.h> ^ 1 error generated. error: command 'clang' failed with exit status 1
I get an error saying there is no gmp
brew install gmp =>Reinstall because it gets angry if it is already
brew uninstall gmp
brew install gmp #Done
Recommended Posts