Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python OSx pip安装awscli_Python_Macos_Aws Cli - Fatal编程技术网

Python OSx pip安装awscli

Python OSx pip安装awscli,python,macos,aws-cli,Python,Macos,Aws Cli,我正在学习AWS教程,需要在Mac上安装AWS CLI,结果如下: 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 aw

我正在学习AWS教程,需要在Mac上安装AWS CLI,结果如下:

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'
sisko$pip安装awscli
收集awscli
使用缓存的awscli-1.10.63-py2.py3-none-any.whl
已满足要求(使用--升级到升级):docutils>=0.10 in/Library/Python/2.7/site-packages(来自awscli)
已满足要求(使用--升级到升级):rsa=3.1.2 in/Library/Python/2.7/site-packages(来自awscli)
收集s3transfer=0.1.0(来自awscli)
使用缓存的s3transfer-0.1.3-py2.py3-none-any.whl
收集botocore==1.4.53(来自awscli)
使用缓存的botocore-1.4.53-py2.py3-none-any.whl
收集颜色A=0.2.5(来自awscli)
使用缓存的colorama-0.3.7-py2.py3-none-any.whl
已满足要求(使用--升级到升级):pyasn1>=0.1.3 in/Library/Python/2.7/site-packages(来自rsa=3.1.2->awscli)
已满足要求(使用--升级升级):futures=2.2.0;/Library/python/2.7/site-packages中的python_version==“2.6”或python_version==“2.7”(来自s3transfer=0.1.0->awscli)
正在收集python dateutil=2.1(来自botocore==1.4.53->awscli)
使用缓存的python_dateutil-2.5.3-py2.py3-none-any.whl
收集jmespath=0.7.1(从botocore==1.4.53->awscli)
使用缓存的jmespath-0.9.0-py2.py3-none-any.whl
收集六个>=1.5(来自python dateutil=2.1->botocore==1.4.53->awscli)
使用缓存的six-1.10.0-py2.py3-none-any.whl
安装收集的软件包:six、python dateutil、jmespath、botocore、s3transfer、colorama、awscli
找到现有安装:六个1.4.1
弃用:卸载distutils安装的项目(六个)已弃用,并将在未来版本中删除。这是因为卸载distutils项目只会部分卸载该项目。
卸载six-1.4.1:
例外情况:
回溯(最近一次呼叫最后一次):
文件“/Library/Python/2.7/site packages/pip-8.1.2-py2.7.egg/pip/basecommand.py”,第215行,在main中
status=self.run(选项、参数)
文件“/Library/Python/2.7/site packages/pip-8.1.2-py2.7.egg/pip/commands/install.py”,第317行,运行中
prefix=options.prefix\u路径,
文件“/Library/Python/2.7/site packages/pip-8.1.2-py2.7.egg/pip/req/req_set.py”,第736行,安装中
要求.卸载(自动确认=True)
文件“/Library/Python/2.7/site packages/pip-8.1.2-py2.7.egg/pip/req/req_install.py”,第742行,在卸载中
路径到移除。移除(自动确认)
文件“/Library/Python/2.7/site packages/pip-8.1.2-py2.7.egg/pip/req/req_uninstall.py”,删除中的第115行
重命名(路径,新路径)
重命名中的文件“/Library/Python/2.7/site packages/pip-8.1.2-py2.7.egg/pip/utils/_init___;.py”,第267行
shutil.移动(旧、新)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”,第302行,移动中
副本2(src、real_dst)
copy2中的文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”,第131行
copystat(src、dst)
copystat中的文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”,第103行
os.chflags(dst、圣圣彼得堡旗帜)
OSError:[Errno 1]不允许操作:'/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

时,我刚刚意识到有一个条款可以通过以下几点来防止该异常:

$ sudo pip install awscli --ignore-installed six

问题解决了。希望这对其他人有所帮助

我刚刚意识到,有一项规定可以通过以下几点来超越这一例外:

$ sudo pip install awscli --ignore-installed six

问题解决了。希望这对其他人有所帮助

我认为不建议将sudo与pip一起使用我认为不建议将sudo与pip一起使用