title: AWS EB: Invalid requirements.txt exit status 2
body: <p>I'm trying to create an environment in Amazon Elastic Beanstalk for deploying a Flask application. However, each time I run <code>eb create</code> I get the following error:</p>
  
  <blockquote>
    <p>Your requirements.txt is invalid. Snapshot your logs for details.</p>
  </blockquote>
  
  <p>I also get this error right about the previous one:</p>
  
  <blockquote>
    <p>[Instance: i-05fe3499c279c3ca9] Command failed on instance. Return code: 1 Output: (TRUNCATED)...) File "/usr/lib64/python2.7/subprocess.py", line 541, in check_call raise CalledProcessError(retcode, cmd) CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 2. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.</p>
  </blockquote>
  
  <p>My <code>requirements.txt</code> file:</p>
  
  <pre><code>click==6.7
  Flask==0.12.2
  itsdangerous==0.24
  Jinja2==2.9.6
  MarkupSafe==1.0
  Werkzeug==0.12.2
  </code></pre>
  
  <p>I've tried rebuilding the environment via the AWS Console, but still persist these same errors. Anybody have any solutions? Thanks!</p>
  
  <p><strong>EDIT</strong>: Appended some of the erroneous output from <code>activity.log</code>:</p>
  
  <pre><code>UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
  You are using pip version 7.1.2, however version 9.0.1 is available.
  You should consider upgrading via the 'pip install --upgrade pip' command.
  Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 2
  </code></pre>