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

Unable to install aws-sam-cli using Linuxbrew on Ubuntu #25

Closed
pankajakhade opened this issue Apr 24, 2019 · 8 comments
Closed

Unable to install aws-sam-cli using Linuxbrew on Ubuntu #25

pankajakhade opened this issue Apr 24, 2019 · 8 comments

Comments

@pankajakhade
Copy link

Hello,

I am getting below error while installing aws-sam-cli using brew:

_==> Installing aws-sam-cli from aws/tap
==> Downloading https://files.pythonhosted.org/packages/92/df/3e8c8a65075d810f8f35157d60c06461061f51c3713c47ca3afaef2c5b89/aws-sam-cli-0.15.0.tar.gz
Already downloaded: /home/ubuntu/.cache/Homebrew/downloads/ff0d5369448d0410046d92b82f88c194df5ef137651c42e41a67b3dac4fd8f76--aws-sam-cli-0.15.0.tar.gz
==> Downloading https://files.pythonhosted.org/packages/37/db/89d6b043b22052109da35416abc3c397655e4bd3cff031446ba02b9654fa/virtualenv-16.4.3.tar.gz
Already downloaded: /home/ubuntu/.cache/Homebrew/downloads/5ef64a64cc03693fde53fa854689f38961d1645c648e8a47d4235e714a07e04d--virtualenv-16.4.3.tar.gz
==> python3 -c import setuptools... --no-user-cfg install --prefix=/tmp/aws-sam-cli--homebrew-virtualenv-20190424-18984-18mx1ju/target --install-scripts=/tmp/aws-sam-cli--homebrew-virtualenv-20190424-18984-18mx1ju/target/bin --single-ver
==> python3 -s /tmp/aws-sam-cli--homebrew-virtualenv-20190424-18984-18mx1ju/target/bin/virtualenv -p python3 /home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.15.0/libexec
==> /home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.15.0/libexec/bin/pip install -v --no-binary :all: --ignore-installed /tmp/aws-sam-cli-20190424-18984-1dct2pk/aws-sam-cli-0.15.0
Last 15 lines from /home/ubuntu/.cache/Homebrew/Logs/aws-sam-cli/03.pip:
Removed build tracker '/tmp/pip-req-tracker-h0274guc'
ERROR: Command "/home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.15.0/libexec/bin/python3.7 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-_xw3v7gl/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-gv7tz2zm/install-record.txt --single-version-externally-managed --compile --install-headers /home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.15.0/libexec/include/site/python3.7/regex" failed with error code 1 in /tmp/pip-install-_xw3v7gl/regex/
Exception information:
Traceback (most recent call last):
File "/home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.15.0/libexec/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 178, in main
status = self.run(options, args)
File "/home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.15.0/libexec/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 414, in run
use_user_site=options.use_user_site,
File "/home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.15.0/libexec/lib/python3.7/site-packages/pip/_internal/req/init.py", line 58, in install_given_reqs
**kwargs
File "/home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.15.0/libexec/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 953, in install
spinner=spinner,
File "/home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.15.0/libexec/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 776, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip._internal.exceptions.InstallationError: Command "/home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.15.0/libexec/bin/python3.7 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-_xw3v7gl/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-gv7tz2zm/install-record.txt --single-version-externally-managed --compile --install-headers /home/linuxbrew/.linuxbrew/Cellar/aws-sam-cli/0.15.0/libexec/include/site/python3.7/regex" failed with error code 1 in /tmp/pip-install-_xw3v7gl/regex/

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/aws/homebrew-tap/issues_

Can you please help?

@sriram-mv
Copy link
Contributor

where is your python 3 coming from? was it installed via brew?

@pankajakhade
Copy link
Author

Hello Sriram,

I have python 2.7

ubuntu@ip-172-31-26-208:~$ python --version
Python 2.7.15rc1

And It was not installed via brew. It was installed with below command:

sudo apt-get install python2.7

@pankajakhade
Copy link
Author

Can you please suggest the solution?

@iriekun
Copy link

iriekun commented Apr 28, 2019

I've also got the same issue. You should try with alternative by using pip: pip install aws-sam-cli. It worked for me.

@pankajakhade
Copy link
Author

Well It did not work for me.

@iriekun
Copy link

iriekun commented May 2, 2019

what error did you get? Do you use python2 or python3?

@bdhandap
Copy link

bdhandap commented May 8, 2019

try using pip3. It worked for me. aws/tap/aws-sam-cli brew script installed python3 as dependency but for some weird reason uses pip instead of pip3 to install aws-sam-cli

sudo pip3 install aws-sam-cli

@sriram-mv
Copy link
Contributor

We do not recommend pip as it does not give isolation to your installs. also we have bottles now, which are direct binaries, do try that as well.

brew tap aws/tap
brew install aws-sam-cli

Following is my output and was a fast install.

srirammv@localrainbow:14:54:02:~/Downloads$brew upgrade aws-sam-cli
==> Upgrading 1 outdated package:
aws/tap/aws-sam-cli 0.16.1 -> 0.17.0
==> Upgrading aws/tap/aws-sam-cli
==> Downloading https://github.com/awslabs/aws-sam-cli/releases/download/v0.17.0//aws-sam-cli-0.17.0.sierra.bottle.tar.gz
==> Downloading from https://github-production-release-asset-2e65be.s3.amazonaws.com/92205085/b8524200-86d7-11e9-9c9a-68c66ae6761c?X-Amz-Algorithm=AWS4
######################################################################## 100.0%
==> Pouring aws-sam-cli-0.17.0.sierra.bottle.tar.gz
🍺  /usr/local/Cellar/aws-sam-cli/0.17.0: 3,770 files, 56.2MB
Removing: /usr/local/Cellar/aws-sam-cli/0.16.1... (4,549 files, 61.6MB)
Removing: /Users/srirammv/Library/Caches/Homebrew/aws-sam-cli--0.16.1.sierra.bottle.tar.gz... (10.5MB)

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

4 participants