Amazon s3 如何检查是否安装了awscli和兼容的botocore软件包
我试图使用boto3学习aws的python,所以我试图执行这里给出的代码 我发现错误Amazon s3 如何检查是否安装了awscli和兼容的botocore软件包,amazon-s3,amazon-ec2,pip,botocore,Amazon S3,Amazon Ec2,Pip,Botocore,我试图使用boto3学习aws的python,所以我试图执行这里给出的代码 我发现错误模块bot3未找到 所以我根据这里的答案升级到boto3 提到使用pip3安装boto3 发出此命令将提供以下输出 C:\Users\DEEL>pip3 install boto3 Collecting boto3 Downloading https://files.pythonhosted.org/packages/c9/cd/d48602dc99ecb52876cf 741477f15c874b6
模块bot3未找到
所以我根据这里的答案升级到boto3 提到使用
pip3安装boto3
发出此命令将提供以下输出
C:\Users\DEEL>pip3 install boto3
Collecting boto3
Downloading https://files.pythonhosted.org/packages/c9/cd/d48602dc99ecb52876cf
741477f15c874b631e5776723f27092693a5b535/boto3-1.7.80-py2.py3-none-any.whl (128k
B)
100% |████████████████████████████████| 133kB 160kB/s
Collecting botocore<1.11.0,>=1.10.80 (from boto3)
Downloading https://files.pythonhosted.org/packages/5e/cf/b97f44993766af17bf64
aeddadf66f63b6ebf3d700565cc7ee7b13cd0067/botocore-1.10.80-py2.py3-none-any.whl (
4.5MB)
100% |████████████████████████████████| 4.5MB 1.3MB/s
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in e:\installation2\python
3\lib\site-packages (from boto3) (0.9.3)
Requirement already satisfied: s3transfer<0.2.0,>=0.1.10 in e:\installation2\pyt
hon3\lib\site-packages (from boto3) (0.1.13)
Requirement already satisfied: docutils>=0.10 in e:\installation2\python3\lib\si
te-packages (from botocore<1.11.0,>=1.10.80->boto3) (0.14)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1; python_version >= "2
.7" in e:\installation2\python3\lib\site-packages (from botocore<1.11.0,>=1.10.8
0->boto3) (2.7.3)
Requirement already satisfied: six>=1.5 in e:\installation2\python3\lib\site-pac
kages (from python-dateutil<3.0.0,>=2.1; python_version >= "2.7"->botocore<1.11.
0,>=1.10.80->boto3) (1.11.0)
awscli 1.15.80 has requirement botocore==1.10.79, but you'll have botocore 1.10.
80 which is incompatible.
Installing collected packages: botocore, boto3
Found existing installation: botocore 1.10.79
Uninstalling botocore-1.10.79:
Successfully uninstalled botocore-1.10.79
我的问题是我在安装boto3awscli 1.15.80时收到的不兼容消息是什么,要求botocore==1.10.79,但您将获得botocore 1.10。80不兼容。
如何检查awscli和botocore安装的兼容性,以及在我的机器上应该做些什么,以便在进一步的开发工作中不会遇到问题。
pip3列表显示以下内容
C:\Users\DEEL>pip3 list
Package Version
--------------- -------
awscli 1.15.81
boto3 1.7.80
botocore 1.10.80
colorama 0.3.9
docutils 0.14
jmespath 0.9.3
pip 18.0
pyasn1 0.4.4
python-dateutil 2.7.3
PyYAML 3.13
rsa 3.4.2
s3transfer 0.1.13
setuptools 39.0.1
six 1.11.0
我现在应该怎么做才能使awscli和botocore兼容
然而,我想提及的是,在完成所有这些工作之后,我尝试从中成功执行的代码。同样的问题以及我是如何解决的,如下所示 将aws cli升级至最新版本
$ pip3 install awscli --upgrade --user
卸载现有的以前版本的botocore和boto3
$ pip3 uninstall botocore
$ pip3 uninstall boto3
然后重新安装
$ pip3 install botocore
$ pip3 install boto3
结果日志
Package Version
--------------- -------
awscli 1.16.1
boto3 1.8.1
botocore 1.11.1
colorama 0.3.9
docutils 0.14
jmespath 0.9.3
pip 18.0
pyasn1 0.4.4
python-dateutil 2.7.3
PyYAML 3.13
rsa 3.4.2
s3transfer 0.1.13
setuptools 40.0.0
six 1.11.0
urllib3 1.23
virtualenv 16.0.0
wheel 0.31.1
其他答案强调升级版本,但在有人需要使用特定版本的情况下,这有一个问题。我必须使用需要botocore 1.18.18的第三方库,我需要相应的awscli兼容版本。为此,只需访问。搜索您的botocore版本并检查其发布日期。之后,访问相应的 并搜索在特定日期发布的awscli版本
Package Version
--------------- -------
awscli 1.16.1
boto3 1.8.1
botocore 1.11.1
colorama 0.3.9
docutils 0.14
jmespath 0.9.3
pip 18.0
pyasn1 0.4.4
python-dateutil 2.7.3
PyYAML 3.13
rsa 3.4.2
s3transfer 0.1.13
setuptools 40.0.0
six 1.11.0
urllib3 1.23
virtualenv 16.0.0
wheel 0.31.1