douglasnaphas / aws-sam-cli

CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM
https://aws.amazon.com/serverless/sam/
Apache License 2.0
0 stars 0 forks source link

Problem with Bash following aws-sam-cli install #2

Closed douglasnaphas closed 4 years ago

douglasnaphas commented 4 years ago
| ~ @ Dougs-MacBook-Pro (dougnaphas) [13:20:06]                                                                                                                                                                                       [42/255]
| 6003 => brew install aws-sam-cli
==> Installing aws-sam-cli from aws/tap
==> Installing dependencies for aws/tap/aws-sam-cli: python
==> Installing aws/tap/aws-sam-cli dependency: python
==> Downloading https://homebrew.bintray.com/bottles/python-3.7.6_1.catalina.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/38/3871ef8b53270576c46489ae397f245b84772c405085238790cf5faa1853b33a?__gda__=exp=1580581939~hmac=1b658f31fcbbf3dc5915c95516f6962836de28b5867a1ae057fd7c76be6513ae&response-content-disposition=
######################################################################## 100.0%
==> Pouring python-3.7.6_1.catalina.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink Frameworks/Python.framework/Headers
Target /usr/local/Frameworks/Python.framework/Headers
is a symlink belonging to python@2. You can unlink it:
  brew unlink python@2

To force the link and overwrite all conflicting files:
  brew link --overwrite python

To list all files that would be deleted:
  brew link --overwrite --dry-run python

Possible conflicting files are:
/usr/local/Frameworks/Python.framework/Headers -> /usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Headers
/usr/local/Frameworks/Python.framework/Python -> /usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Python
/usr/local/Frameworks/Python.framework/Resources -> /usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Resources
/usr/local/Frameworks/Python.framework/Versions/Current -> /usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Versions/Current
==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.6_1/bin --install-lib=/usr/local/lib/python3.7/site-packages --single-version-externally-m
==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.6_1/bin --install-lib=/usr/local/lib/python3.7/site-packages --single-version-externally-m
==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.6_1/bin --install-lib=/usr/local/lib/python3.7/site-packages --single-version-externally-m
==> Caveats
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python/libexec/bin

If you need Homebrew's Python 2.7 run
  brew install python@2

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /usr/local/Cellar/python/3.7.6_1: 3,977 files, 61MB
==> Installing aws/tap/aws-sam-cli
==> Downloading https://github.com/awslabs/aws-sam-cli/releases/download/v0.40.0//aws-sam-cli-0.40.0.sierra.bottle.tar.gz
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/92205085/17aa9e80-3233-11ea-923a-c426b99b155d?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20200201%2Fus-east-1%2Fs3%2Faws4_r
######################################################################## 100.0%
==> Pouring aws-sam-cli-0.40.0.sierra.bottle.tar.gz
🍺  /usr/local/Cellar/aws-sam-cli/0.40.0: 3,979 files, 63MB
==> Caveats
==> python
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python/libexec/bin

If you need Homebrew's Python 2.7 run
  brew install python@2

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python

Now new terminal windows print

python3: error: unable to find utility "python3", not a developer tool or in PATH
douglasnaphas commented 4 years ago

I ran brew unlink python@2, then brew link python, and the error message went away.