You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could not find a version that satisfies the requirement serverlessrepo==0.1.5 (from aws-sam-cli)
Steps to reproduce
Enter sudo pip3 install --user aws-sam-cli or sudo pip3 install --user --upgrade aws-sam-cli
Observed result
The directory '/home/israel/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/israel/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting aws-sam-cli
Downloading https://files.pythonhosted.org/packages/c3/7c/79463add5772a98f044fab3024c27db61550bb1d9bbd06a715e3c3dc6b2a/aws_sam_cli-0.10.0-py3-none-any.whl (423kB)
100% |ββββββββββββββββββββββββββββββββ| 430kB 1.6MB/s
Requirement already satisfied: Flask~=1.0.2 in /usr/local/lib/python3.5/dist-packages (from aws-sam-cli) (1.0.2)
Collecting dateparser~=0.7 (from aws-sam-cli)
Downloading https://files.pythonhosted.org/packages/ac/9e/1aa87c0c59f9731820bfd20a8b148d97b315530c2c92d1fb300328c8c42f/dateparser-0.7.0-py2.py3-none-any.whl (357kB)
100% |ββββββββββββββββββββββββββββββββ| 358kB 1.4MB/s
Collecting serverlessrepo==0.1.5 (from aws-sam-cli)
Could not find a version that satisfies the requirement serverlessrepo==0.1.5 (from aws-sam-cli) (from versions: 0.1.6)
No matching distribution found for serverlessrepo==0.1.5 (from aws-sam-cli)
Expected result
Successful Installation
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
SAM CLI supports Python2.7, 3.6, and 3.7. If you elect to install through pip instead of one of our installers (installers are preferred) then the python version you install into must be one of our supported versions.
Is there any reason you don't just want to use LinuxBrew to install? All this should be avoidable if you just use the installers instead of pip. Using pip will have these pitfalls where our installation is completely dependent on how you install python (among other things), which is something outside of installing our CLI.
I faced the same error on Python 3.5.2.
I switched to python 3.7 instead and the installation succeeded with the following command: python3.7 -m pip install aws-sam-cli
Reacted by acm, yashdattsawant, Myms and in9
Reacted by Juan Fernando Giraldo Cardona and Swaut Automation
I faced the same error on Python 3.5.2.
I switched to python 3.7 instead and the installation succeeded with the following command: python3.7 -m pip install aws-sam-cli
I'd tried it, but it didn't work for me, thank you anyway!
It seems that you have already solved in other ways.
Just for anyone who wants to solve the problem above, Please try again after installing python dev package. That works for me, I'm using python3.6, pip3.6
I faced the same error on Python 3.5.2.
I switched to python 3.7 instead and the installation succeeded with the following command: python3.7 -m pip install aws-sam-cli
Not sure if this is the right way to reopen this issue.
I followed the Installing the AWS SAM CLI on Linux steps with Homebrew for Linux (Ubuntu 20), but after a successfull installation, I got a command not founderror when tried: sam --version
So I did brew uninstall aws-sam-cli, and then tried:
git clone https://github.com/awslabs/aws-sam-cli.git
cd aws-sam-cli
sudo python3 ./setup.py build install
I have this Python:
$ python3 --version
Python 3.8.5
Everything seemed well until I got this:
Installed /usr/local/lib/python3.8/dist-packages/aws_sam_cli-1.15.0-py3.8.egg
Processing dependencies for aws-sam-cli==1.15.0
error: six 1.14.0 is installed but six~=1.15 is required by {'aws-sam-translator'}
(first two lines for context)
Then I tried this:
$ sam --version
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 584, in _build_master
ws.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 901, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 792, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (six 1.14.0 (/usr/lib/python3/dist-packages), Requirement.parse('six~=1.15'), {'aws-sam-translator'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/sam", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3254, in <module>
def _initialize_master_working_set():
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3237, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 3266, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 586, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 599, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 792, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (six 1.14.0 (/usr/lib/python3/dist-packages), Requirement.parse('six~=1.15'), {'aws-sam-translator'})
Could you please support me with this issue?
I'm trying to set up my environment properly, in order to run locally a lambda function written in TypeScript over Node.js
Activity
jfuss commentedon Jan 8, 2019
@IsraelGboluwaga What is the version of Python you are trying to install into?
IsraelGboluwaga commentedon Jan 8, 2019
Python 3.5.2
jfuss commentedon Jan 8, 2019
SAM CLI supports Python2.7, 3.6, and 3.7. If you elect to install through pip instead of one of our installers (installers are preferred) then the python version you install into must be one of our supported versions.
IsraelGboluwaga commentedon Jan 8, 2019
Thanks. I updated my python version and I've progressed past that point. I've got another error.
Output:
jfuss commentedon Jan 8, 2019
https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory
Looks like you are missing header files from the python language.
IsraelGboluwaga commentedon Jan 8, 2019
Thanks @jfuss
I have this now:
jfuss commentedon Jan 8, 2019
Is there any reason you don't just want to use LinuxBrew to install? All this should be avoidable if you just use the installers instead of pip. Using pip will have these pitfalls where our installation is completely dependent on how you install python (among other things), which is something outside of installing our CLI.
IsraelGboluwaga commentedon Jan 8, 2019
I'm simply following the steps from
https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.htmlI'll take a look at using LinuxBrew and give you feedback.
jfuss commentedon Jan 8, 2019
The Linux specific guide has details on LinuxBrew: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-linux.html. We are working on removing the pip details to customers can get started on the right foot and hopefully avoid some of the pain points you have run into.
IsraelGboluwaga commentedon Jan 8, 2019
Do I simply do
brew install aws-sam-cli??jfuss commentedon Jan 8, 2019
You can follow the docs under "Install the AWS SAM CLI Using Linuxbrew" in the link I have above. This describes the step need to install.
IsraelGboluwaga commentedon Jan 9, 2019
I ran
brew reinstall aws-sam-cliafter following the process and got a successful download.Output:
Afterwards, running
sam --version, I get this:IsraelGboluwaga commentedon Jan 9, 2019
Thank you @jfuss for all the help. It's successfully installed now. I should have used a virtual environment all along.
yort-feng commentedon Feb 28, 2019
@IsraelGboluwaga I'm facing a same problem, what do you mean by "virtual environment"?
kyuridenamida commentedon Mar 10, 2019
I faced the same error on Python 3.5.2.
I switched to python 3.7 instead and the installation succeeded with the following command:
python3.7 -m pip install aws-sam-cliyort-feng commentedon Mar 11, 2019
I'd tried it, but it didn't work for me, thank you anyway!
Scottbae37 commentedon Apr 26, 2019
#922 (comment)
It seems that you have already solved in other ways.
Just for anyone who wants to solve the problem above, Please try again after installing python dev package. That works for me, I'm using python3.6, pip3.6
$ sudo apt-get install python3.6-dev
$ sudo pip3.6 install aws-sam-cli
For the problem installing aws-sam-cli with pip3.6
yashdattsawant commentedon Apr 20, 2020
This worked for me as well. Thanks
pequetreques commentedon Jan 29, 2021
Not sure if this is the right way to reopen this issue.
I followed the Installing the AWS SAM CLI on Linux steps with Homebrew for Linux (Ubuntu 20), but after a successfull installation, I got a command not found error when tried:
sam --versionSo I did
brew uninstall aws-sam-cli, and then tried:I have this Python:
Everything seemed well until I got this:
(first two lines for context)
Then I tried this:
Could you please support me with this issue?
I'm trying to set up my environment properly, in order to run locally a lambda function written in TypeScript over Node.js
Thanks in advance!