Description:
The error message I got when I tried to install aws-sam-cli on my laptop.
$ pip install --user aws-sam-cli
Collecting aws-sam-cli
Downloading https://files.pythonhosted.org/packages/ed/0a/448016d5004d1353229b6081c7a05d84c38be5bc70db72d0ac366372fc78/aws-sam-cli-0.6.0.tar.gz (151kB)
100% |鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅鈻堚枅| 153kB 1.5MB/s
Complete output from command python setup.py egg_info:
/System/Library/Frameworks/Python.framework/Versions/2.7/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; Expected ',' or end-of-list in pathlib2~=2.3.2; python_version<"3.4" at ; python_version<"3.4"
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-install-YXg_6p/aws-sam-cli/
Steps to reproduce the issue:
1.
2.
3.
Observed result:
Expected result:
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
Mac
$ pip --version
pip 18.0 from /Library/Python/2.7/site-packages/pip (python 2.7)
Output of sam --version:
Optional Debug logs:
Add --debug flag to command you are running
I'm also having the same issue with the node:8.10 docker container with both python 2.7.9 and python 3.4.2 and pip 1.5.6 in both cases:
Downloading/unpacking aws-sam-cli
Downloading aws-sam-cli-0.6.0.tar.gz (151kB): 151kB downloaded
Running setup.py (path:/tmp/pip-build-87jhq37k/aws-sam-cli/setup.py) egg_info for package aws-sam-cli
/usr/lib/python3.4/distutils/dist.py:260: 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/python3.4/distutils/dist.py:260: 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-87jhq37k/aws-sam-cli
Storing debug log for failure in /root/.pip/pip.log
I think you are having an old version of setuptools package in your computer. Can you upgrade using pip install -U setuptools and try again?
Hi Sanath,
That seems to have fixed the issue for me.
Hi Sanath,
also works for me. thank you.
This solution did not work for me, but I installed it using brew https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-mac.html
brew upgrade
brew update
brew tap aws/tap
brew install aws-sam-cli
Hope that helps someone :)
Most helpful comment
I think you are having an old version of
setuptoolspackage in your computer. Can you upgrade usingpip install -U setuptoolsand try again?