I dont know much about python: How can i specify which version to use? Which version should I set? I thought pyenv would handle this but it seems broken?
| => sudo pyenv global dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib Referenced from: /usr/local/bin/bash Reason: image not found Abort trap: 6 ________________________________________________________________________________ | ~ @ MacBookPro | => sudo pyenv versions dyld: Library not loaded: /usr/local/opt/readline/lib/libreadline.6.dylib Referenced from: /usr/local/bin/bash Reason: image not found Abort trap: 6 | => which pip pip is /Library/Frameworks/Python.framework/Versions/3.6/bin/pip pip is /usr/local/bin/pip pip is /usr/local/bin/pip pip is /usr/local/bin/pip ________________________________________________________________________________ | ~ @ MacBookPro | => which pip2 pip2 is /usr/local/bin/pip2 pip2 is /usr/local/bin/pip2 pip2 is /usr/local/bin/pip2 ________________________________________________________________________________ | ~ @ MacBookPro | => which python python is /usr/bin/python ________________________________________________________________________________ | ~ @ MacBookPro | => which python2 python2 is /usr/local/bin/python2 python2 is /usr/local/bin/python2 python2 is /usr/local/bin/python2 ________________________________________________________________________________ | ~ @ MacBookPro | => python --version Python 2.7.10 ________________________________________________________________________________ | ~ @ MacBookPro | => pip --version pip 10.0.1 from /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip (python 3.6) On Tuesday, May 15, 2018 at 3:35:00 PM UTC-7, Michael Pechner wrote: > > You are confusing python3, pip3, and python2, pip. Plus of usng brew, you > have 2 versioons of python2 on your system. /usr/bin/python and > /usr/local/bin/python. > > Make sure you have setup your paths and chosen the version and instance of > python you prefer to use. > > michaels-MacBook-Pro:~ mpechner$ which pip > > /usr/local/bin/pip > > michaels-MacBook-Pro:~ mpechner$ which pip2 > > /usr/local/bin/pip2 > > michaels-MacBook-Pro:~ mpechner$ which python > > /usr/bin/python > > michaels-MacBook-Pro:~ mpechner$ which python2 > > /usr/local/bin/python2 > > michaels-MacBook-Pro:~ mpechner$ python --version > > Python 2.7.10 > > michaels-MacBook-Pro:~ mpechner$ pip --version > > pip 9.0.3 from /Library/Python/2.7/site-packages (python 2.7) > > > On Tue, May 15, 2018 at 6:18 PM, <[email protected] <javascript:>> > wrote: > >> I am trying to create and ec2 instance from my Mac OSX machine. I >> highlighted the failure in Yellow. I have installed boto and boto3 via pip >> and there were no error messages on install. >> >> | => pip3 list >> Package Version >> --------------- ------- >> boto 2.48.0 >> boto3 1.7.21 >> >> | => pip list |grep boto *RETURNS NOTHING* >> >> | => pip install boto >> Collecting boto >> Using cached >> https://files.pythonhosted.org/packages/bd/b7/a88a67002b1185ed9a8e8a6ef15266728c2361fcb4f1d02ea331e4c7741d/boto-2.48.0-py2.py3-none-any.whl >> matplotlib 1.3.1 requires tornado, which is not installed. >> Installing collected packages: boto >> Could not install packages due to an EnvironmentError: [Errno 13] >> Permission denied: '/Library/Python/2.7/site-packages/boto' >> Consider using the `--user` option or check the permissions. >> >> | => sudo pip install boto >> The directory '/Users/jim/Library/Caches/pip/http' or its parent >> directory is not owned by the current user and the cache has been disabled. >> Please check the permissions and owner of that directory. If executing pip >> with sudo, you may want sudo's -H flag. >> The directory '/Users/jim/Library/Caches/pip' or its parent directory is >> not owned by the current user and caching wheels has been disabled. check >> the permissions and owner of that directory. If executing pip with sudo, >> you may want sudo's -H flag. >> Requirement already satisfied: boto in >> /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages >> >> (2.48.0) >> >> I have ansible installed: >> | => ansible --version >> ansible 2.4.2.0 >> config file = None >> configured module search path = >> [u'/Users/jim/.ansible/plugins/modules', >> u'/usr/share/ansible/plugins/modules'] >> ansible python module location = >> /usr/local/Cellar/ansible/2.4.2.0_1/libexec/lib/python2.7/site-packages/ansible >> executable location = /usr/local/bin/ansible >> python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 >> Compatible Apple LLVM 9.0.0 (clang-900.0.37)] >> >> | ~/vagrant/Projects/ansible-test/share-ansible @ MacBookPro (jim) >> *(my credentails file is not in the current directory ) * >> | => ls -la ../../../../.aws/ >> total 8 >> drwxr-xr-x 4 jim staff 128 Oct 20 2017 . >> drwxr-xr-x+ 70 jim staff 2240 May 15 14:38 .. >> -rw------- 1 jim staff 29 May 11 16:29 config >> -rw------- 1 jim staff 116 May 6 19:27 credentials >> >> | => *ansible-playbook -i ./hosts ec2.key.yml * >> >> PLAY [local] >> *************************************************************************************** >> >> TASK [Create a new EC2 key] >> ************************************************************************ >> fatal: [localhost]: FAILED! => {"changed": false, "msg": "boto required >> for this module"} >> to retry, use: --limit >> @/Users/jim/vagrant/Projects/ansible-test/share-ansible/ec2.key.retry >> >> PLAY RECAP >> ***************************************************************************************** >> localhost : ok=0 changed=0 unreachable=0 >> failed=1 >> >> >> ________________________________________________________________________________ >> | ~/vagrant/Projects/ansible-test/share-ansible @ MacBookPro (jim) >> >> | ~/vagrant/Projects/ansible-test/share-ansible @ MacBookPro (jim) >> | => cat hosts >> >> [local] >> localhost >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ansible Project" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/ansible-project/36621df1-7acf-4c67-8c65-f2b878538ab9%40googlegroups.com >> >> <https://groups.google.com/d/msgid/ansible-project/36621df1-7acf-4c67-8c65-f2b878538ab9%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Michael Pechner > NE6RD - Amateur Extra > [email protected] <javascript:> > -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/c9cefee4-6250-4d5d-abc3-73a473202786%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
