2015-04-26 69 views
1

當跟隨Install the AWS CLI Using the Bundled Installer (Linux, OS X, or Unix)方向時,我收到由看起來不正確的文件路徑file:///Users/jspooner/Downloads/awscli-bundle/packages awscli-1.7.24.tar.gz造成的錯誤。我相信它應該是packages/awscli。有沒有python腳本或我錯過了什麼?使用捆綁安裝程序(Linux,OS X或Unix)安裝AWS CLI

➜ Downloads python --version 
Python 2.7.7 
➜ Downloads sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws 
Password: 
Running cmd: /usr/local/opt/python/bin/python2.7 virtualenv.py --python /usr/local/opt/python/bin/python2.7 /usr/local/aws 
Running cmd: /usr/local/aws/bin/pip install --no-index --find-links file:///Users/jspooner/Downloads/awscli-bundle/packages awscli-1.7.24.tar.gz 
Traceback (most recent call last): 
    File "./awscli-bundle/install", line 138, in <module> 
    main() 
    File "./awscli-bundle/install", line 129, in main 
    pip_install_packages(opts.install_dir) 
    File "./awscli-bundle/install", line 98, in pip_install_packages 
    pip_script, PACKAGES_DIR, cli_tarball)) 
    File "./awscli-bundle/install", line 44, in run 
    p.returncode, cmd, stdout + stderr)) 
__main__.BadRCError: Bad rc (1) for cmd '/usr/local/aws/bin/pip install --no-index --find-links file:///Users/jspooner/Downloads/awscli-bundle/packages awscli-1.7.24.tar.gz': Traceback (most recent call last): 
    File "/usr/local/aws/bin/pip", line 9, in <module> 
    load_entry_point('pip==1.4.1', 'console_scripts', 'pip')() 
    File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point 
    return get_distribution(dist).load_entry_point(group, name) 
    File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point 
    return ep.load() 
    File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load 
    entry = __import__(self.module_name, globals(),globals(), ['__name__']) 
    File "/usr/local/aws/lib/python2.7/site-packages/pip/__init__.py", line 10, in <module> 
    from pip.util import get_installed_distributions, get_prog 
    File "/usr/local/aws/lib/python2.7/site-packages/pip/util.py", line 17, in <module> 
    from pip.vendor.distlib import version 
    File "/usr/local/aws/lib/python2.7/site-packages/pip/vendor/distlib/version.py", line 13, in <module> 
    from .compat import string_types 
    File "/usr/local/aws/lib/python2.7/site-packages/pip/vendor/distlib/compat.py", line 31, in <module> 
    from urllib2 import (Request, urlopen, URLError, HTTPError, 
ImportError: cannot import name HTTPSHandler 

回答

-2

我會強烈建議從Homebrew包管理器安裝awscli如果你是在OS X上

+1

這是不推薦亞馬遜再道:「awscli包可能是倉庫的其他包管理器,如APT,百勝和自制軟件可用,但不保證是最新版本,以確保您。有最新版本,請使用這裏描述的安裝方法之一。「 http://docs.aws.amazon.com/cli/latest/userguide/installing.html – mttdbrd

7

嘗試運行亞馬遜的3個安裝命令,而不是從內部自己運行這些命令之前導航到/tmp目錄用戶文件夾。我不確定爲什麼這些額外的步驟對於某些OS X安裝是必需的。

cd /tmp 
curl -o awscli.zip https://s3.amazonaws.com/aws-cli/awscli-bundle.zip 
unzip awscli.zip 
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws 
+2

感謝您的建議。這工作完美無瑕。 – Andres