2016-09-09 217 views
0

我下面的教程到AWS,我需要得到下面的結果我的Mac上安裝AWS CLI:OSX PIP安裝awscli

sisko$ pip install awscli 
Collecting awscli 
    Using cached awscli-1.10.63-py2.py3-none-any.whl 
Requirement already satisfied (use --upgrade to upgrade): docutils>=0.10 in /Library/Python/2.7/site-packages (from awscli) 
Requirement already satisfied (use --upgrade to upgrade): rsa<=3.5.0,>=3.1.2 in /Library/Python/2.7/site-packages (from awscli) 
Collecting s3transfer<0.2.0,>=0.1.0 (from awscli) 
    Using cached s3transfer-0.1.3-py2.py3-none-any.whl 
Collecting botocore==1.4.53 (from awscli) 
    Using cached botocore-1.4.53-py2.py3-none-any.whl 
Collecting colorama<=0.3.7,>=0.2.5 (from awscli) 
    Using cached colorama-0.3.7-py2.py3-none-any.whl 
Requirement already satisfied (use --upgrade to upgrade): pyasn1>=0.1.3 in /Library/Python/2.7/site-packages (from rsa<=3.5.0,>=3.1.2->awscli) 
Requirement already satisfied (use --upgrade to upgrade): futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" in /Library/Python/2.7/site-packages (from s3transfer<0.2.0,>=0.1.0->awscli) 
Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.4.53->awscli) 
    Using cached python_dateutil-2.5.3-py2.py3-none-any.whl 
Collecting jmespath<1.0.0,>=0.7.1 (from botocore==1.4.53->awscli) 
    Using cached jmespath-0.9.0-py2.py3-none-any.whl 
Collecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore==1.4.53->awscli) 
    Using cached six-1.10.0-py2.py3-none-any.whl 
Installing collected packages: six, python-dateutil, jmespath, botocore, s3transfer, colorama, awscli 
    Found existing installation: six 1.4.1 
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project. 
    Uninstalling six-1.4.1: 
Exception: 
Traceback (most recent call last): 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/basecommand.py", line 215, in main 
    status = self.run(options, args) 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/commands/install.py", line 317, in run 
    prefix=options.prefix_path, 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py", line 736, in install 
    requirement.uninstall(auto_confirm=True) 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py", line 742, in uninstall 
    paths_to_remove.remove(auto_confirm) 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py", line 115, in remove 
    renames(path, new_path) 
    File "/Library/Python/2.7/site-packages/pip-8.1.2-py2.7.egg/pip/utils/__init__.py", line 267, in renames 
    shutil.move(old, new) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move 
    copy2(src, real_dst) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2 
    copystat(src, dst) 
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat 
    os.chflags(dst, st.st_flags) 
OSError: [Errno 1] Operation not permitted: '/var/folders/s4/snsk01z551qdj37bpj3dtzpm0000gn/T/pip-38wpB3-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info' 

輸出的最後一節抱怨一個異常,我不知道如何解決。

我下載並安裝Python的3.5.2,但是當我執行python --version我的命令行報告的Python 2.7.10

回答

2

我才意識到有條文surpress具有以下是例外:

$ sudo pip install awscli --ignore-installed six 

問題已解決。希望這可以幫助其他人

+1

我相信不建議使用sudo和pip –