如何在Anaconda python发行版上安装AWSCLI

cod*_*nob 16 python anaconda aws-cli

我遵循以下说明:

https://bioconda.github.io/recipes/awscli/README.html#installation
Run Code Online (Sandbox Code Playgroud)

执行: conda install awscli

结果:

Fetching package metadata: ....

Solving package specifications: .

Error:  Package missing in current osx-64 channels: 

  - awscli

You can search for this package on anaconda.org with

    anaconda search -t conda awscli

You may need to install the anaconda-client command line client with

    conda install anaconda-client
Run Code Online (Sandbox Code Playgroud)

dan*_*frg 29

现在你可以从conda-forge获得它,这是一套社区维护的conda食谱.

conda install -c conda-forge awscli
Run Code Online (Sandbox Code Playgroud)

来源:Anaconda Cloud

  • 谢谢!这是我能够在命令行上运行aws的唯一方法.执行pip安装允许我从python中访问它,但不能作为独立的可执行文件访问它. (3认同)

Mau*_*man 4

安装Anaconda后,通过运行配置文件确保您的默认Python是Anaconda安装,例如,在bash中:

$source ~/.bash_profile
Run Code Online (Sandbox Code Playgroud)

然后,使用pip安装Aws CLI(不需要sudo):

$pip install awscli
Run Code Online (Sandbox Code Playgroud)

然后,您可以验证安装是否成功.例如,我遇到了同样的问题.我这样验证了它:

$ python
Python 2.7.12 |Anaconda 4.2.0 (x86_64)| (default, Jul  2 2016, 17:43:17)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import s3transfer
>>> quit()
Run Code Online (Sandbox Code Playgroud)