aws cliをインストールする際、botocoreとs3transferのせいで失敗する人へ

<h1>aws cliをインストールする際、botocoreとs3transferのせいで失敗する人へ</h1>
<p>&nbsp;</p>
<h3>aws cliのインストール途中のエラー</h3>
<p>aws cliをインストールしたら以下のようなログが出た。</p>
<pre><code class='language-bash' lang='bash'>bombanira@KyosukesMBP964:~/tmp$ pip3 install awscli --upgrade --user

Collecting awscli
  Using cached awscli-1.18.31-py2.py3-none-any.whl (3.0 MB)
Requirement already satisfied, skipping upgrade: PyYAML&lt;5.4,&gt;=3.10; python_version != &quot;3.4&quot; in /Applications/anaconda3/lib/python3.7/site-packages (from awscli) (5.1.2)
Requirement already satisfied, skipping upgrade: rsa&lt;=3.5.0,&gt;=3.1.2 in /Applications/anaconda3/lib/python3.6/site-packages (from awscli) (3.4.2)
Requirement already satisfied, skipping upgrade: docutils&lt;0.16,&gt;=0.10 in /Applications/anaconda3/lib/python3.7/site-packages (from awscli) (0.15.2)
Requirement already satisfied, skipping upgrade: colorama&lt;0.4.4,&gt;=0.2.5; python_version != &quot;3.4&quot; in /Applications/anaconda3/lib/python3.6/site-packages (from awscli) (0.3.9)
Collecting s3transfer&lt;0.4.0,&gt;=0.3.0
  Using cached s3transfer-0.3.3-py2.py3-none-any.whl (69 kB)
Collecting botocore==1.15.31
  Using cached botocore-1.15.31-py2.py3-none-any.whl (6.0 MB)
Requirement already satisfied, skipping upgrade: pyasn1&gt;=0.1.3 in /Applications/anaconda3/lib/python3.7/site-packages (from rsa&lt;=3.5.0,&gt;=3.1.2-&gt;awscli) (0.4.8)
Requirement already satisfied, skipping upgrade: python-dateutil&lt;3.0.0,&gt;=2.1 in /Applications/anaconda3/lib/python3.7/site-packages (from botocore==1.15.31-&gt;awscli) (2.8.1)
Requirement already satisfied, skipping upgrade: urllib3&lt;1.26,&gt;=1.20; python_version != &quot;3.4&quot; in /Applications/anaconda3/lib/python3.7/site-packages (from botocore==1.15.31-&gt;awscli) (1.24.2)
Requirement already satisfied, skipping upgrade: jmespath&lt;1.0.0,&gt;=0.7.1 in /Applications/anaconda3/lib/python3.6/site-packages (from botocore==1.15.31-&gt;awscli) (0.9.4)
Requirement already satisfied, skipping upgrade: six&gt;=1.5 in /Applications/anaconda3/lib/python3.7/site-packages (from python-dateutil&lt;3.0.0,&gt;=2.1-&gt;botocore==1.15.31-&gt;awscli) (1.13.0)
ERROR: boto3 1.4.2 has requirement botocore&lt;1.5.0,&gt;=1.4.1, but you&#39;ll have botocore 1.15.31 which is incompatible.
ERROR: boto3 1.4.2 has requirement s3transfer&lt;0.2.0,&gt;=0.1.0, but you&#39;ll have s3transfer 0.3.3 which is incompatible.
Installing collected packages: botocore, s3transfer, awscli
Successfully installed awscli-1.18.31 botocore-1.15.31 s3transfer-0.3.3 
</code></pre>
<p>エラー文は以下の2つです。</p>
<pre><code class='language-bash' lang='bash'>ERROR: boto3 1.4.2 has requirement botocore&lt;1.5.0,&gt;=1.4.1, but you&#39;ll have botocore 1.15.31 which is incompatible.
ERROR: boto3 1.4.2 has requirement s3transfer&lt;0.2.0,&gt;=0.1.0, but you&#39;ll have s3transfer 0.3.3 which is incompatible.
</code></pre>
<p>&nbsp;</p>
<h3>試した方法</h3>
<p>&nbsp;</p>
<ol>
<li><p>問題のライブラリをアンインストール後、再度インストールする。</p>
<pre><code class='language-shell' lang='shell'>pip3 uninstall botocore
pip3 uninstall s3transfer
pip3 install awscli --upgrade --user
</code></pre>
</li>

</ol>
<ol start='2' >
<li><p>pythonをアップデートする。</p>
<pre><code class='language-shell' lang='shell'>conda update python
pip3 install awscli --upgrade --user
</code></pre>
</li>

</ol>
<p>&nbsp;</p>
<p>1では無理でした。しかし、2を行うと成功しました。(ちなみに上記の2はアナコンダでpythonを管理している人しかできません)</p>
<p>&nbsp;</p>
<h2>まとめ</h2>
<ol>
<li>aws cliインストール時にライブラリに関するエラーが起きた</li>
<li>python本体をアップデートしたら成功した。</li>

</ol>
<p>&nbsp;</p>
<p>** python アップデートしろ💢💢💢**</p>
<p>&nbsp;</p>