[AWS] Summary of CLI installation error countermeasures

References

-It is convenient to put pyenv if you are in trouble because Python of OS is old -SyntaxError with get-pip.py on Python2 -Install pip on Amazon Linux 2 -Install AWS CLI -Install pyenv and pyenv-virtualenv

error contents

$ pip install awscli

DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
The directory '/home/uorat/.cache/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 '/home/uorat/.cache/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 (use --upgrade to upgrade): awscli in /usr/lib/python2.6/site-packages
Requirement already satisfied (use --upgrade to upgrade): botocore==1.0.0b1 in /usr/lib/python2.6/site-packages (from awscli)
Requirement already satisfied (use --upgrade to upgrade): bcdoc<0.16.0,>=0.15.0 in /usr/lib/python2.6/site-packages (from awscli)
Requirement already satisfied (use --upgrade to upgrade): colorama<=0.3.3,>=0.2.5 in /usr/lib/python2.6/site-packages (from awscli)
Requirement already satisfied (use --upgrade to upgrade): docutils>=0.10 in /usr/lib/python2.6/site-packages (from awscli)
Requirement already satisfied (use --upgrade to upgrade): rsa<=3.1.4,>=3.1.2 in /usr/lib/python2.6/site-packages (from awscli)
Requirement already satisfied (use --upgrade to upgrade): argparse>=1.1 in /usr/lib/python2.6/site-packages (from awscli)
Requirement already satisfied (use --upgrade to upgrade): jmespath==0.7.1 in /usr/lib/python2.6/site-packages (from botocore==1.0.0b1->awscli)
Requirement already satisfied (use --upgrade to upgrade): python-dateutil<3.0.0,>=2.1 in /usr/lib/python2.6/site-packages (from botocore==1.0.0b1->awscli)
Requirement already satisfied (use --upgrade to upgrade): ordereddict==1.1 in /usr/lib/python2.6/site-packages (from botocore==1.0.0b1->awscli)
Requirement already satisfied (use --upgrade to upgrade): simplejson==3.3.0 in /usr/lib64/python2.6/site-packages (from botocore==1.0.0b1->awscli)
Requirement already satisfied (use --upgrade to upgrade): six<2.0.0,>=1.8.0 in /usr/lib/python2.6/site-packages (from bcdoc<0.16.0,>=0.15.0->awscli)
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.3 in /usr/lib/python2.6/site-packages (from rsa<=3.1.4,>=3.1.2->awscli)
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an in
correct TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/lib/python2.6/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more in
formation, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning

approach

◆ pyenv git clone

$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv

◆ Added to bash_profile

$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
$ source ~/.bash_profile

◆ pyenv version specification / installation

$ pyenv install -l
$ pyenv install 2.7.11

◆ Switching Python

$ pyenv version
$ pyenv global 2.7.11
$ python --version

aws-cli installation

$ pip install awscli

aws-cli extra edition ①

◆ Bulk installation of python-pip

$ yum -y install python-pip

◆ Installation confirmation

$ pip -V
pip 9.0.3 from /usr/lib/python2.7/site-packages (python 2.7)

◆ aws-cli installation

$ pip install awscli

aws-cli extra edition ②

◆ Install with get-pip.py

$ curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
$ sudo python get-pip.py

◆ aws-cli installation

$ pip install awscli

Recommended Posts

[AWS] Summary of CLI installation error countermeasures
AWS CLI installation procedure
[Error countermeasures] django-heroku installation error handling
OS X EI Capitan (10.11.6) AWS CLI installation error (python-dateutil)
Summary of Oracle Database XE installation procedure
Summary of how to write AWS Lambda
Jupyter installation error
Installation of Anaconda3
centOS 7 installation error
Installation of CentOS 8
Installation of Python3 and Flask [Environment construction summary]
Summary of studying Python to use AWS Lambda
Summary of error handling methods when installing TensorFlow (2)
[Python] Type Error: Summary of error causes and remedies for'None Type'
Numerical summary of data
Summary of Tensorflow / Keras
Installation of OpenMDAO (version 1.7.1)
Introduction of ferenOS 1 (installation)
Installation of Python 3.3 rc1
Summary of string operations
Reconfirmation of AWS EBS
Summary of Python arguments
Summary of logrotate software logrotate
Installation of matplotlib (Python 3.3.2)
Summary of test method
Installation of dlib, cv2
[AWS] [AmazonLinux] Error analysis of insufficient disk space with docker-compose
[End of 2020] A memo to start using AWS CLI (Version 2)