Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Issue (Mac) #59

Closed
rossdakin opened this issue Dec 16, 2015 · 4 comments
Closed

Installation Issue (Mac) #59

rossdakin opened this issue Dec 16, 2015 · 4 comments

Comments

@rossdakin
Copy link

Forgive me if this is overly specific to my system, but I'm hoping for help with why installation is failing.

System info:

~/Desktop$ python --version
Python 2.7.10

~/Desktop$ pip --version   
pip 7.1.2 from /Library/Python/2.7/site-packages (python 2.7)

~$ xcodebuild -version 
Xcode 7.1.1
Build version 7B1005

~/Desktop$ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: OS X 10.11.2 (15C50)
      Kernel Version: Darwin 15.2.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: Elizabeth
      User Name: Ross Dakin (rossdakin)
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 20:12

Error (without sudo):

~/Desktop$ pip install aws-shell     
Collecting aws-shell
Collecting prompt-toolkit==0.52 (from aws-shell)
  Using cached prompt_toolkit-0.52-py2-none-any.whl
Collecting configobj>=5.0.6 (from aws-shell)
Collecting boto3>=1.2.1 (from aws-shell)
  Using cached boto3-1.2.2-py2.py3-none-any.whl
Collecting awscli<2.0.0,>=1.8.9 (from aws-shell)
  Using cached awscli-1.9.13-py2.py3-none-any.whl
Collecting six>=1.9.0 (from prompt-toolkit==0.52->aws-shell)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting pygments (from prompt-toolkit==0.52->aws-shell)
  Using cached Pygments-2.0.2-py2-none-any.whl
Collecting wcwidth (from prompt-toolkit==0.52->aws-shell)
  Using cached wcwidth-0.1.5-py2.py3-none-any.whl
Collecting jmespath<1.0.0,>=0.7.1 (from boto3>=1.2.1->aws-shell)
  Using cached jmespath-0.9.0-py2.py3-none-any.whl
Collecting futures==2.2.0 (from boto3>=1.2.1->aws-shell)
  Using cached futures-2.2.0-py2.py3-none-any.whl
Collecting botocore<1.4.0,>=1.3.0 (from boto3>=1.2.1->aws-shell)
  Using cached botocore-1.3.13-py2.py3-none-any.whl
Collecting rsa<=3.3.0,>=3.1.2 (from awscli<2.0.0,>=1.8.9->aws-shell)
  Using cached rsa-3.2.3-py2.py3-none-any.whl
Collecting colorama<=0.3.3,>=0.2.5 (from awscli<2.0.0,>=1.8.9->aws-shell)
Collecting docutils>=0.10 (from awscli<2.0.0,>=1.8.9->aws-shell)
Collecting python-dateutil<3.0.0,>=2.1 (from botocore<1.4.0,>=1.3.0->boto3>=1.2.1->aws-shell)
  Using cached python_dateutil-2.4.2-py2.py3-none-any.whl
Collecting pyasn1>=0.1.3 (from rsa<=3.3.0,>=3.1.2->awscli<2.0.0,>=1.8.9->aws-shell)
  Using cached pyasn1-0.1.9-py2.py3-none-any.whl
Installing collected packages: six, pygments, wcwidth, prompt-toolkit, configobj, jmespath, futures, python-dateutil, docutils, botocore, boto3, pyasn1, rsa, colorama, awscli, aws-shell
  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/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/ff/c957cg417pzf3lszspjvm_880000gp/T/pip-7hp43W-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'

Error (with sudo):

~/Desktop$ sudo pip install aws-shell
The directory '/Users/rossdakin/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.
The directory '/Users/rossdakin/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting aws-shell
Collecting prompt-toolkit==0.52 (from aws-shell)
  Downloading prompt_toolkit-0.52-py2-none-any.whl (188kB)
    100% |████████████████████████████████| 188kB 828kB/s 
Collecting configobj>=5.0.6 (from aws-shell)
Collecting boto3>=1.2.1 (from aws-shell)
  Downloading boto3-1.2.2-py2.py3-none-any.whl (106kB)
    100% |████████████████████████████████| 106kB 1.0MB/s 
Collecting awscli<2.0.0,>=1.8.9 (from aws-shell)
  Downloading awscli-1.9.13-py2.py3-none-any.whl (848kB)
    100% |████████████████████████████████| 851kB 591kB/s 
Collecting six>=1.9.0 (from prompt-toolkit==0.52->aws-shell)
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProtocolError('Connection aborted.', error(54, 'Connection reset by peer'))': /packages/py2.py3/s/six/six-1.10.0-py2.py3-none-any.whl
  Downloading six-1.10.0-py2.py3-none-any.whl
Collecting pygments (from prompt-toolkit==0.52->aws-shell)
  Downloading Pygments-2.0.2-py2-none-any.whl (672kB)
    100% |████████████████████████████████| 675kB 713kB/s 
Collecting wcwidth (from prompt-toolkit==0.52->aws-shell)
  Downloading wcwidth-0.1.5-py2.py3-none-any.whl
Collecting jmespath<1.0.0,>=0.7.1 (from boto3>=1.2.1->aws-shell)
  Downloading jmespath-0.9.0-py2.py3-none-any.whl
Collecting futures==2.2.0 (from boto3>=1.2.1->aws-shell)
  Downloading futures-2.2.0-py2.py3-none-any.whl
Collecting botocore<1.4.0,>=1.3.0 (from boto3>=1.2.1->aws-shell)
  Downloading botocore-1.3.13-py2.py3-none-any.whl (2.1MB)
    100% |████████████████████████████████| 2.1MB 241kB/s 
Collecting rsa<=3.3.0,>=3.1.2 (from awscli<2.0.0,>=1.8.9->aws-shell)
  Downloading rsa-3.2.3-py2.py3-none-any.whl (44kB)
    100% |████████████████████████████████| 45kB 4.0MB/s 
Collecting colorama<=0.3.3,>=0.2.5 (from awscli<2.0.0,>=1.8.9->aws-shell)
Collecting docutils>=0.10 (from awscli<2.0.0,>=1.8.9->aws-shell)
Collecting python-dateutil<3.0.0,>=2.1 (from botocore<1.4.0,>=1.3.0->boto3>=1.2.1->aws-shell)
  Downloading python_dateutil-2.4.2-py2.py3-none-any.whl (188kB)
    100% |████████████████████████████████| 192kB 2.1MB/s 
Collecting pyasn1>=0.1.3 (from rsa<=3.3.0,>=3.1.2->awscli<2.0.0,>=1.8.9->aws-shell)
  Downloading pyasn1-0.1.9-py2.py3-none-any.whl
Installing collected packages: six, pygments, wcwidth, prompt-toolkit, configobj, jmespath, futures, python-dateutil, docutils, botocore, boto3, pyasn1, rsa, colorama, awscli, aws-shell
  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/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: '/tmp/pip-r9lpB9-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
@shinzui
Copy link

shinzui commented Dec 16, 2015

I had the same problem and managed to install aws-shell after installing python through homebrew. Python packages have always been a huge pain on OS X.

@jamesls
Copy link
Member

jamesls commented Dec 17, 2015

@rossdakin Thanks for the detailed info, it's helpful.
I believe this is the same issue as aws/aws-cli#1522 which affects El Capitan users (tracking issue in pip: pypa/pip#3165, great explanation of the problem here).

The reported workaround is to run: sudo pip install aws-shell --upgrade --ignore-installed six, which will ignore apple's built in six module.

We're following the upstream pip issue to see what comes out of it, but for now, I think that's your best bet. I'll get our README install instructions updated in the meantime.

@jamesls
Copy link
Member

jamesls commented Dec 17, 2015

Oh I should also mention @shinzui's suggestion is a much better solution if you're willing to install homebrew and install python via homebrew.

@jamesls
Copy link
Member

jamesls commented Dec 17, 2015

README updated via #61. Let me know if you still run into issues.

@jamesls jamesls closed this as completed Dec 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants