[AWS] Problem avoidance memo when installing awscli and boto3 in Python 2.7 environment

Introduction

The Python version of AWS Lambda is Python 2.7. This is a workaround memo when installing awscli and boto3 in Windows Anaconda environment and Python 2.7 environment. There are two problems to avoid.

  1. The awscli, boto3 package for win-64 cannot be found (occurs in Windows Anaconda environment)

    > conda install awscli
    PackageNotFoundError: Package not found: '' Package missing in current win-64 channels:
      - awscli
    
    > conda install boto3
    PackageNotFoundError: Package not found: '' Package missing in current win-64 channels:
      - boto3
    

  2. Unicode Warning (occurs in Python 2.7 environment) Command example

    > aws s3 ls s3://<bucket_name>
    

Unicode Warning that occurs in Anaconda2 environment

```
Anaconda2\lib\site-packages\dateutil\parser.py:605: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  elif res.tzname and res.tzname in time.tzname:
```

Unicode Warning that occurs in the environment where AWS CLI is installed by msi

```
C:\Program Files\Amazon\AWSCLI\.\dateutil\parser.py:601: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
```

Install awscli

For Windows environment, specify conda-forge.

> conda install -c conda-forge awscli

installation of boto3

For Windows environment, specify conda-forge.

> conda install -c conda-forge boto3

Check the installation status

Interim measures for Unicode Warnings that occur in the Python 2.7 environment

This is a temporary measure, but it suppresses ʻUnicode Warning`.

Recommended Posts

[AWS] Problem avoidance memo when installing awscli and boto3 in Python 2.7 environment
Install pip in Serverless Framework and AWS Lambda with Python environment
[Django] sqlite version error when running python manage.py in aws cloud9 environment
Recommended environment and usage when developing with Python
Solution when aws-cli cannot be executed on Mac virtual environment (after installing Python 3.8)
Precautions when installing packages in the conda environment
Try installing GeoSpark (Apache Sedona) in Python environment
A memo when creating a python environment with miniconda
Use pydantic when reading environment variables in Python
Causes and solutions when python sam build fails in a newly created Cloud9 environment
The simplest Python memo in Japan (classes and objects)
[Python] Retry process (Exponential Backoff) memo in AWS Lambda
AWS SDK for Python (Boto3) development in Visual Studio 2017
Use AWS SDK for Python (boto) under Proxy environment
My python environment memo
virtual environment in python
Development environment in Python
A memo when creating a directed graph using Graphviz in Python
How to develop in a virtual environment of Python [Memo]
Solve the Japanese problem when using the CSV module in Python.
Problems and solutions when asked for MySQL db in Python 3
[CLPEX memo] Run DO Python API in COS installed environment
Install CaboCha in Ubuntu environment and call it with Python.
Memo to switch between python2 series and 3 series in anaconda environment of mac (win is also added)
[Python] Scraping in AWS Lambda
Python and ruby slice memo
Handle environment variables in Python
Python environment construction and TensorFlow
Attention when os.mkdir in Python
Stack and Queue in Python
[MEMO] [Development environment construction] Python
Unittest and CI in Python
Error and solution when installing python3 with homebrew on mac (catalina 10.15)
[Python] Error and solution memo when using venv with pyenv + anaconda
Precautions when passing def to sorted and groupby functions in Python? ??
From installing Ansible to building a Python environment in Vagrant's virtual environment
Build and try an OpenCV & Python environment in minutes using Docker
How to deal with errors when installing Python and pip with choco
I compared Node.js and Python in creating thumbnails using AWS Lambda
When you run diff in python and want both returncode and output