4: /codebuild/output/tmp/script.sh: pip: not found - Node.js and CodeStar

AWSCodeBuildCodeStarErrorsnode.jsPythonSAMServerlessUncategorizedWeb Development

Hi everyone,

I ran into the following CodeBuild error after upgrading my build environment from the default nodejs8.10 to nodejs10.14:

4: /codebuild/output/tmp/script.sh: pip: not found

This one was a little confusing, but thankfully fairly easy to fix. In your buildspec.yml file update the pip steps to reference pip3 instead of pip:

// Original
commands:
      # Install dependencies needed for running tests
      - npm install

      # Upgrade AWS CLI to the latest version
      - pip install --upgrade awscli
// Modified
commands:
      # Install dependencies needed for running tests
      - npm install

      # Upgrade AWS CLI to the latest version
      - pip3 install --upgrade awscli

1 comment

Comments from the original blog are preserved here. New comments are closed.

  1. Fixed a Strange Error ‘script.sh: 4: Login: not found’ in AWS CodeBuild | Jian Huang

    […] https://whatibroke.com/2018/12/30/4-codebuild-output-tmp-script-sh-pip-not-found-node-js-and-codesta… […]