Getting “ImportError: cannot import name check_output” (git aws.push on EB CLI)

I’ve installed and configurated AWS Elastic Beanstalk Command Line Tool on my Mac.

That’s what I have installed:

  • Deploy AWS Elastic beanstalk to an environment in different region
  • Elastic Beanstalk “git aws.push” only commited difference?
  • $ python --version
    Python 2.7
    $ ruby --version
    ruby 2.0.0p195 (2013-05-14 revision 40734) [x86_64-darwin10.8.0]
    $ eb --version
    AWS Elastic Beanstalk Command Line Interface v2.6.3
    

    I have EB properly configured in order to use git with AWS

    When I try to push a commit to AWS I am getting this error:

    $ git aws.push
    Traceback (most recent call last):
      File ".git/AWSDevTools/aws.elasticbeanstalk.push", line 21, in <module>
        from aws.dev_tools import * 
      File "/Applications/MAMP/htdocs/innbativel/.git/AWSDevTools/aws/dev_tools.py", line 3, in <module>
        from subprocess import check_output
    ImportError: cannot import name check_output
    

    Does anyone have an idea why and how to fix it?

  • How do you revert with sourcetree?
  • Passing ssh options to git clone
  • How can I delete all local branches which would result in no changes if merged into master?
  • How to work simultaneously on several different versions of files with git?
  • Duplicated folders in github
  • What does the “.git” mean in a git URL?
  • One Solution collect form web for “Getting “ImportError: cannot import name check_output” (git aws.push on EB CLI)”

    I found that my OSX comes with python 2.6 (which doesn’t have check_output) and it was conflicting with python 2.7 that I’ve installed for EB CLI.

    To solve this, I just made .git/AWSDevTools/aws.elasticbeanstalk.push use python 2.7, in its first line:

    #!/usr/bin/env python2.7
    
    Git Baby is a git and github fan, let's start git clone.