Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to Install aws-sam-cli in ubuntu 14?

I want to update aws-sam-cli on my ubuntu 14.04. I have sam 0.2.11 version. I want to update in 0.3.0. When I run

pip install --user aws-sam-cli

or

pip install --user --upgrade aws-sam-cli

I got

Downloading/unpacking aws-sam-cli Downloading aws-sam-cli-0.3.0.tar.gz (128kB): 128kB downloaded Running setup.py (path:/tmp/pip_build_amber/aws-sam-cli/setup.py) egg_info for package aws-sam-cli /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires' warnings.warn(msg) error in aws-sam-cli setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers Complete output from command python setup.py egg_info: /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'python_requires' warnings.warn(msg) error in aws-sam-cli setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers

Cleaning up... Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_amber/aws-sam-cli Storing debug log for failure in /home/amber/.pip/pip.log**

like image 653
amber gautam Avatar asked Jun 01 '18 06:06

amber gautam


People also ask

Does AWS CLI include Sam?

AWS SAM provides you with a command line tool, the AWS SAM CLI, that makes it easy for you to create and manage serverless applications. You need to install and configure a few things in order to use the AWS SAM CLI.

What is Sam CLI AWS?

The AWS SAM CLI is a command line tool that operates on an AWS SAM template and application code. With the AWS SAM CLI, you can invoke Lambda functions locally, create a deployment package for your serverless application, deploy your serverless application to the AWS Cloud, and so on.


2 Answers

I had the same issue and here's how I installed aws-sam-cli

Make sure you uninstall aws-sam-local if you have an older version with

npm uninstall -g aws-sam-local

Then run

pip install --user --upgrade setuptools
pip install ez_setup
pip install --user --upgrade aws-sam-cli
like image 71
Brinley Ang Avatar answered Sep 30 '22 03:09

Brinley Ang


Upgrade pip and setuptools:

pip install -U pip setuptools
like image 42
phd Avatar answered Sep 30 '22 01:09

phd