{"action":"created","issue":{"url":"https://api.github.com/repos/pypa/pip/issues/3165","labels_url":"https://api.github.com/repos/pypa/pip/issues/3165/labels{/name}","comments_url":"https://api.github.com/repos/pypa/pip/issues/3165/comments","events_url":"https://api.github.com/repos/pypa/pip/issues/3165/events","html_url":"https://github.com/pypa/pip/issues/3165","id":110005530,"number":3165,"title":"Six issue when installing package","user":{"login":"jtkinser","id":7031736,"avatar_url":"https://avatars.githubusercontent.com/u/7031736?v=3","gravatar_id":"","url":"https://api.github.com/users/jtkinser","html_url":"https://github.com/jtkinser","followers_url":"https://api.github.com/users/jtkinser/followers","following_url":"https://api.github.com/users/jtkinser/following{/other_user}","gists_url":"https://api.github.com/users/jtkinser/gists{/gist_id}","starred_url":"https://api.github.com/users/jtkinser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtkinser/subscriptions","organizations_url":"https://api.github.com/users/jtkinser/orgs","repos_url":"https://api.github.com/users/jtkinser/repos","events_url":"https://api.github.com/users/jtkinser/events{/privacy}","received_events_url":"https://api.github.com/users/jtkinser/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pypa/pip/labels/macosx","name":"macosx","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":24,"created_at":"2015-10-06T13:16:43Z","updated_at":"2015-11-14T10:00:54Z","closed_at":null,"body":"When trying to install `awscli` I get the following error. \r\n```\r\nadmins-MacBook-Pro-5:~ user$ pip install awscli\r\nCollecting awscli\r\n  Using cached awscli-1.8.9-py2.py3-none-any.whl\r\nCollecting botocore==1.2.7 (from awscli)\r\n  Using cached botocore-1.2.7-py2.py3-none-any.whl\r\nCollecting rsa<=3.3.0,>=3.1.2 (from awscli)\r\n  Using cached rsa-3.2-py2.py3-none-any.whl\r\nCollecting colorama<=0.3.3,>=0.2.5 (from awscli)\r\nCollecting docutils>=0.10 (from awscli)\r\nRequirement already satisfied (use --upgrade to upgrade): jmespath<1.0.0,>=0.7.1 in /Library/Python/2.7/site-packages (from botocore==1.2.7->awscli)\r\nCollecting python-dateutil<3.0.0,>=2.1 (from botocore==1.2.7->awscli)\r\n  Using cached python_dateutil-2.4.2-py2.py3-none-any.whl\r\nCollecting pyasn1>=0.1.3 (from rsa<=3.3.0,>=3.1.2->awscli)\r\n  Using cached pyasn1-0.1.9-py2.py3-none-any.whl\r\nCollecting six>=1.5 (from python-dateutil<3.0.0,>=2.1->botocore==1.2.7->awscli)\r\n  Using cached six-1.9.0-py2.py3-none-any.whl\r\nInstalling collected packages: six, python-dateutil, docutils, botocore, pyasn1, rsa, colorama, awscli\r\n  Found existing installation: six 1.4.1\r\n    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.\r\n    Uninstalling six-1.4.1:\r\nException:\r\nTraceback (most recent call last):\r\n  File \"/Library/Python/2.7/site-packages/pip/basecommand.py\", line 211, in main\r\n    status = self.run(options, args)\r\n  File \"/Library/Python/2.7/site-packages/pip/commands/install.py\", line 311, in run\r\n    root=options.root_path,\r\n  File \"/Library/Python/2.7/site-packages/pip/req/req_set.py\", line 640, in install\r\n    requirement.uninstall(auto_confirm=True)\r\n  File \"/Library/Python/2.7/site-packages/pip/req/req_install.py\", line 716, in uninstall\r\n    paths_to_remove.remove(auto_confirm)\r\n  File \"/Library/Python/2.7/site-packages/pip/req/req_uninstall.py\", line 125, in remove\r\n    renames(path, new_path)\r\n  File \"/Library/Python/2.7/site-packages/pip/utils/__init__.py\", line 315, in renames\r\n    shutil.move(old, new)\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py\", line 302, in move\r\n    copy2(src, real_dst)\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py\", line 131, in copy2\r\n    copystat(src, dst)\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py\", line 103, in copystat\r\n    os.chflags(dst, st.st_flags)\r\nOSError: [Errno 1] Operation not permitted: '/var/folders/6t/h404bjcd5tb_4q86tpv_251rv_0h0j/T/pip-sYsqDS-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'\r\n```\r\n\r\n\r\nOther user have mentioned the issue and point to `pip`:\r\n\r\nhttps://github.com/aws/aws-cli/issues/1522\r\n\r\nhttps://bitbucket.org/gutworth/six/issues/134/uninstall-error-operation-not-permitted"},"comment":{"url":"https://api.github.com/repos/pypa/pip/issues/comments/156679963","html_url":"https://github.com/pypa/pip/issues/3165#issuecomment-156679963","issue_url":"https://api.github.com/repos/pypa/pip/issues/3165","id":156679963,"user":{"login":"gavinliu","id":3281741,"avatar_url":"https://avatars.githubusercontent.com/u/3281741?v=3","gravatar_id":"","url":"https://api.github.com/users/gavinliu","html_url":"https://github.com/gavinliu","followers_url":"https://api.github.com/users/gavinliu/followers","following_url":"https://api.github.com/users/gavinliu/following{/other_user}","gists_url":"https://api.github.com/users/gavinliu/gists{/gist_id}","starred_url":"https://api.github.com/users/gavinliu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gavinliu/subscriptions","organizations_url":"https://api.github.com/users/gavinliu/orgs","repos_url":"https://api.github.com/users/gavinliu/repos","events_url":"https://api.github.com/users/gavinliu/events{/privacy}","received_events_url":"https://api.github.com/users/gavinliu/received_events","type":"User","site_admin":false},"created_at":"2015-11-14T10:00:54Z","updated_at":"2015-11-14T10:00:54Z","body":"``sudo pip install awscli --upgrade --ignore-installed six`` can be install six, but fail to run scrapy.\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"/usr/local/bin/scrapy\", line 7, in <module>\r\n    from scrapy.cmdline import execute\r\n  File \"/Library/Python/2.7/site-packages/scrapy/__init__.py\", line 48, in <module>\r\n    from scrapy.spiders import Spider\r\n  File \"/Library/Python/2.7/site-packages/scrapy/spiders/__init__.py\", line 10, in <module>\r\n    from scrapy.http import Request\r\n  File \"/Library/Python/2.7/site-packages/scrapy/http/__init__.py\", line 12, in <module>\r\n    from scrapy.http.request.rpc import XmlRpcRequest\r\n  File \"/Library/Python/2.7/site-packages/scrapy/http/request/rpc.py\", line 7, in <module>\r\n    from six.moves import xmlrpc_client as xmlrpclib\r\nImportError: cannot import name xmlrpc_client\r\n```\r\n\r\nso, I try uninstall six, oh... always fail\r\n\r\n```\r\nsudo pip uninstall six\r\nThe directory '/Users/Gavin/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.\r\nDEPRECATION: 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.\r\nUninstalling six-1.4.1:\r\n  /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info\r\nProceed (y/n)? y\r\nException:\r\nTraceback (most recent call last):\r\n  File \"/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/basecommand.py\", line 211, in main\r\n    status = self.run(options, args)\r\n  File \"/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/commands/uninstall.py\", line 76, in run\r\n    requirement_set.uninstall(auto_confirm=options.yes)\r\n  File \"/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_set.py\", line 305, in uninstall\r\n    req.uninstall(auto_confirm=auto_confirm)\r\n  File \"/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_install.py\", line 716, in uninstall\r\n    paths_to_remove.remove(auto_confirm)\r\n  File \"/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/req/req_uninstall.py\", line 125, in remove\r\n    renames(path, new_path)\r\n  File \"/Library/Python/2.7/site-packages/pip-7.1.2-py2.7.egg/pip/utils/__init__.py\", line 315, in renames\r\n    shutil.move(old, new)\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py\", line 302, in move\r\n    copy2(src, real_dst)\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py\", line 131, in copy2\r\n    copystat(src, dst)\r\n  File \"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py\", line 103, in copystat\r\n    os.chflags(dst, st.st_flags)\r\nOSError: [Errno 1] Operation not permitted: '/tmp/pip-WzeFqQ-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'\r\nThe directory '/Users/Gavin/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.\r\n```"}}