AWSにPandasライブラリを拡張できるライブラリ「awswrangler」のインストールについて解説しています。
「awswrangler(https://aws-sdk-pandas.readthedocs.io/en/stable/)」は、Pandasライブラリの機能をAWSに拡張できるライブラリです。
■Python
今回のPythonのバージョンは、「3.8.5」を使用しています。(Windows10)(pythonランチャーでの確認)
■awswranglerをインストールする
awswranglerをインストールを行いますが、今回はpipを経由してインストールを行うので、まずWindowsのコマンドプロンプトを起動します。
pip install awswrangler
起動後、上記のコマンドを入力し、Enterキーを押します。
なお、今回は、pythonランチャーを使用しており、Python Version 3.8.5にインストールを行うために、バージョンの切り替えを行います。
py -3.8 -m pip install awswrangler
切り替えるために、上記のコマンドを入力し、Enterキーを押します。
Defaulting to user installation because normal site-packages is not writeable Collecting awswrangler Downloading awswrangler-2.17.0-py3-none-any.whl (251 kB) ---------------------------------------- 251.6/251.6 kB 1.0 MB/s eta 0:00:00 Collecting boto3<2.0.0,>=1.24.11 Downloading boto3-1.26.5-py3-none-any.whl (132 kB) ---------------------------------------- 132.5/132.5 kB 1.5 MB/s eta 0:00:00 Collecting jsonpath-ng<2.0.0,>=1.5.3 Downloading jsonpath_ng-1.5.3-py3-none-any.whl (29 kB) Collecting pyarrow<8.1.0,>=2.0.0 Using cached pyarrow-8.0.0-cp38-cp38-win_amd64.whl (17.9 MB) Requirement already satisfied: pymysql<2.0.0,>=1.0.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from awswrangler) (1.0.2) Collecting gremlinpython<4.0.0,>=3.5.2 Downloading gremlinpython-3.6.1-py2.py3-none-any.whl (73 kB) ---------------------------------------- 73.3/73.3 kB 1.3 MB/s eta 0:00:00 Collecting opensearch-py<3,>=1 Downloading opensearch_py-2.0.0-py2.py3-none-any.whl (204 kB) ---------------------------------------- 204.6/204.6 kB 1.4 MB/s eta 0:00:00 Collecting pg8000<2.0.0,>=1.20.0 Downloading pg8000-1.29.3-py3-none-any.whl (51 kB) ---------------------------------------- 51.3/51.3 kB 2.6 MB/s eta 0:00:00 Collecting redshift-connector<2.1.0,>=2.0.889 Downloading redshift_connector-2.0.909-py3-none-any.whl (112 kB) ---------------------------------------- 112.1/112.1 kB 1.3 MB/s eta 0:00:00 Requirement already satisfied: openpyxl<3.1.0,>=3.0.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from awswrangler) (3.0.10) Collecting progressbar2<5.0.0,>=4.0.0 Downloading progressbar2-4.2.0-py2.py3-none-any.whl (27 kB) Collecting botocore<2.0.0,>=1.27.11 Downloading botocore-1.29.5-py3-none-any.whl (9.9 MB) ---------------------------------------- 9.9/9.9 MB 3.3 MB/s eta 0:00:00 Collecting pandas<2.0.0,>=1.2.0 Downloading pandas-1.5.1-cp38-cp38-win_amd64.whl (11.0 MB) ---------------------------------------- 11.0/11.0 MB 5.8 MB/s eta 0:00:00 Collecting requests-aws4auth<2.0.0,>=1.1.1 Downloading requests_aws4auth-1.1.2-py2.py3-none-any.whl (24 kB) Requirement already satisfied: numpy<2.0.0,>=1.21.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from awswrangler) (1.23.4) Collecting backoff<3.0.0,>=1.11.1 Downloading backoff-2.2.1-py3-none-any.whl (15 kB) Collecting s3transfer<0.7.0,>=0.6.0 Downloading s3transfer-0.6.0-py3-none-any.whl (79 kB) ---------------------------------------- 79.6/79.6 kB ? eta 0:00:00 Collecting jmespath<2.0.0,>=0.7.1 Using cached jmespath-1.0.1-py3-none-any.whl (20 kB) Requirement already satisfied: urllib3<1.27,>=1.25.4 in c:\users\user_\appdata\roaming\python\python38\site-packages (from botocore<2.0.0,>=1.27.11->awswrangler) (1.26.12) Collecting python-dateutil<3.0.0,>=2.1 Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB) Collecting nest-asyncio Downloading nest_asyncio-1.5.6-py3-none-any.whl (5.2 kB) Collecting aiohttp<=3.8.1,>=3.8.0 Using cached aiohttp-3.8.1-cp38-cp38-win_amd64.whl (555 kB) Requirement already satisfied: isodate<1.0.0,>=0.6.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from gremlinpython<4.0.0,>=3.5.2->awswrangler) (0.6.1) Collecting aenum<4.0.0,>=1.4.5 Downloading aenum-3.1.11-py3-none-any.whl (131 kB) ---------------------------------------- 131.5/131.5 kB 3.9 MB/s eta 0:00:00 Requirement already satisfied: six in c:\users\user_\appdata\roaming\python\python38\site-packages (from jsonpath-ng<2.0.0,>=1.5.3->awswrangler) (1.16.0) Collecting ply Using cached ply-3.11-py2.py3-none-any.whl (49 kB) Collecting decorator Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB) Requirement already satisfied: et-xmlfile in c:\users\user_\appdata\roaming\python\python38\site-packages (from openpyxl<3.1.0,>=3.0.0->awswrangler) (1.1.0) Requirement already satisfied: requests<3.0.0,>=2.4.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from opensearch-py<3,>=1->awswrangler) (2.28.1) Requirement already satisfied: certifi in c:\users\user_\appdata\roaming\python\python38\site-packages (from opensearch-py<3,>=1->awswrangler) (2022.9.24) Requirement already satisfied: pytz>=2020.1 in c:\users\user_\appdata\roaming\python\python38\site-packages (from pandas<2.0.0,>=1.2.0->awswrangler) (2022.4) Collecting scramp>=1.4.3 Downloading scramp-1.4.4-py3-none-any.whl (13 kB) Collecting python-utils>=3.0.0 Downloading python_utils-3.4.5-py2.py3-none-any.whl (23 kB) Collecting beautifulsoup4<5.0.0,>=4.7.0 Using cached beautifulsoup4-4.11.1-py3-none-any.whl (128 kB) Collecting lxml>=4.6.5 Using cached lxml-4.9.1-cp38-cp38-win_amd64.whl (3.6 MB) Requirement already satisfied: setuptools in c:\users\user_\appdata\roaming\python\python38\site-packages (from redshift-connector<2.1.0,>=2.0.889->awswrangler) (59.8.0) Requirement already satisfied: packaging in c:\users\user_\appdata\roaming\python\python38\site-packages (from redshift-connector<2.1.0,>=2.0.889->awswrangler) (21.3) Requirement already satisfied: attrs>=17.3.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from aiohttp<=3.8.1,>=3.8.0->gremlinpython<4.0.0,>=3.5.2->awswrangler) (22.1.0) Collecting async-timeout<5.0,>=4.0.0a3 Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB) Collecting yarl<2.0,>=1.0 Downloading yarl-1.8.1-cp38-cp38-win_amd64.whl (56 kB) ---------------------------------------- 56.8/56.8 kB 2.9 MB/s eta 0:00:00 Collecting frozenlist>=1.1.1 Downloading frozenlist-1.3.3-cp38-cp38-win_amd64.whl (34 kB) Collecting multidict<7.0,>=4.5 Using cached multidict-6.0.2-cp38-cp38-win_amd64.whl (28 kB) Collecting aiosignal>=1.1.2 Downloading aiosignal-1.3.1-py3-none-any.whl (7.6 kB) Requirement already satisfied: charset-normalizer<3.0,>=2.0 in c:\users\user_\appdata\roaming\python\python38\site-packages (from aiohttp<=3.8.1,>=3.8.0->gremlinpython<4.0.0,>=3.5.2->awswrangler) (2.1.1) Collecting soupsieve>1.2 Using cached soupsieve-2.3.2.post1-py3-none-any.whl (37 kB) Requirement already satisfied: idna<4,>=2.5 in c:\users\user_\appdata\roaming\python\python38\site-packages (from requests<3.0.0,>=2.4.0->opensearch-py<3,>=1->awswrangler) (3.4) Collecting asn1crypto>=1.5.1 Downloading asn1crypto-1.5.1-py2.py3-none-any.whl (105 kB) ---------------------------------------- 105.0/105.0 kB 6.3 MB/s eta 0:00:00 Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in c:\users\user_\appdata\roaming\python\python38\site-packages (from packaging->redshift-connector<2.1.0,>=2.0.889->awswrangler) (3.0.9) Installing collected packages: ply, asn1crypto, aenum, soupsieve, scramp, python-utils, python-dateutil, pyarrow, nest-asyncio, multidict, lxml, jmespath, frozenlist, decorator, backoff, async-timeout, yarl, requests-aws4auth, progressbar2, pg8000, pandas, opensearch-py, jsonpath-ng, botocore, beautifulsoup4, aiosignal, s3transfer, aiohttp, gremlinpython, boto3, redshift-connector, awswrangler Successfully installed aenum-3.1.11 aiohttp-3.8.1 aiosignal-1.3.1 asn1crypto-1.5.1 async-timeout-4.0.2 awswrangler-2.17.0 backoff-2.2.1 beautifulsoup4-4.11.1 boto3-1.26.5 botocore-1.29.5 decorator-5.1.1 frozenlist-1.3.3 gremlinpython-3.6.1 jmespath-1.0.1 jsonpath-ng-1.5.3 lxml-4.9.1 multidict-6.0.2 nest-asyncio-1.5.6 opensearch-py-2.0.0 pandas-1.5.1 pg8000-1.29.3 ply-3.11 progressbar2-4.2.0 pyarrow-8.0.0 python-dateutil-2.8.2 python-utils-3.4.5 redshift-connector-2.0.909 requests-aws4auth-1.1.2 s3transfer-0.6.0 scramp-1.4.4 soupsieve-2.3.2.post1 yarl-1.8.1
Enterキーを押すと、インストールが開始され、上記のように「Successfully installed」と表示されます。これが表示されれば、awswranglerが正常にインストールされたことになります。
なお、今回はawswranglerのバージョン2.17.0をインストールしました。
コメント