Fail to install aws-cli via sudo pip install awscli
Problem
I'm on El Capitan OSX. Got following error: Installing collected packages: six, python-dateutil, docutils, botocore, pyasn1, rsa, 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/basecommand.py", line 211, in main status = self.run(options, args) File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 311, in run root=options.root_path, File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 640, in install requirement.uninstall(auto_confirm=True) File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 716, in uninstall paths_to_remove.remove(auto_confirm) File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 125, in remove renames(path, new_path) File "/Library/Python/2.7/site-packages/pip/utils/init.py", line 315, 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/Framewo
Error Output
error: Installing collected packages: six, python-dateutil, docutils, botocore, pyasn1, rsa, awscli
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: Fail to install aws-cli via sudo pip install awscli
This looks like something with how pip handles uninstalling libraries that it did not install in the first place, in this case looks like libraries installed with disutils. It might be worth looking around the pypa github org to see if there is any workarounds they suggest. One question that I have is are running this from a virtual environment created from virtualenv? It might be worth looking i
Trust Score
1 verification
- 1
This looks like something with how pip handles uninstalling libraries that it di
This looks like something with how pip handles uninstalling libraries that it did not install in the first place, in this case looks like libraries installed with disutils. It might be worth looking around the pypa github org to see if there is any workarounds they suggest.
- 2
One question that I have is are running this from a virtual environment created
One question that I have is are running this from a virtual environment created from virtualenv? It might be worth looking into that so you can avoid uninstalling dependencies that are installed system wide, and it will isolate all dependencies to that environment so you should be able to avoid such errors. Let me know if that helps.
Validation
Resolved in aws/aws-cli GitHub issue #1522. Community reactions: 0 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep