question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to install AWS-SAM-CLI on Ubuntu 18.04.4

See original GitHub issue

Description

I am failing to install AWS-SAM-CLI on my brand new Ubuntu 18.04-Laptop. I get an error when I call “sam --version”

Steps to reproduce

I followed https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install-linux.html I installed Python3.7 from source because libpython3.7m.so.1.0 was needed and was not installed by the package manager.

Observed result

The error is:

joern@joern-acer:~$ sam --version
Traceback (most recent call last):
  File "/home/linuxbrew/.linuxbrew/bin/sam", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3250, in <module>
    @_call_aside
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'aws-sam-cli==0.43.0' distribution was not found and is required by the application

Expected result

Here is a result from my old laptop with aws-sam-cli

joernkleinbub@joerns:~$ sam --version
SAM CLI, version 0.31.0

Additional environment details (Ex: Windows, Mac, Amazon Linux etc)

  1. OS: Ubuntu 18.04.4
  2. sam --version: should be 0.43.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jfusscommented, Jul 10, 2020

@kmeelu We had an issue with our 0.53.0 bottles that were not installing correctly after Homebrew updated python from 3.7 to 3.8. We were addressing that earlier today. Everything should be fixed now. If you are still running into problem, please cut a new issue.

0reactions
kmeelucommented, Jul 9, 2020

Hi @awood45 , is there a release ongoing? Our CircleCI pipeline (which uses aws-serverless/install), is failing on that step:

See: https://docs.brew.sh/Homebrew-and-Python
 
Traceback (most recent call last):
  File "/home/linuxbrew/.linuxbrew/bin/sam", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3250, in <module>
    @_call_aside
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
 
pkg_resources.DistributionNotFound: The 'aws-sam-cli==0.53.0' distribution was not found and is required by the application
 
Exited with code exit status 1 
CircleCI received exit code 1 

Looking at the releases, it seems like there was a pre-release candidate but no update since. Is that correct?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing or updating the latest version of the AWS CLI
This topic describes how to install or update the latest release of the AWS Command Line Interface (AWS CLI) on supported operating systems....
Read more >
AWS Cannot Be Found after installing AWSCLI using Pip on ...
AWS Cannot Be Found after installing AWSCLI using Pip on Ubuntu (18.04) so I do this quick fix to help my OS find...
Read more >
AWS-CLI installed but not working (Command 'aws' not found ...
AWS -CLI installed but not working (Command 'aws' not found) Ubuntu 18.04. How to solve it? · sudo apt update · sudo apt...
Read more >
How to install awscli on Ubuntu 18.04? - Unix Stack Exchange
Use following steps instead: sudo apt-get update sudo apt-get install awscli aws --version.
Read more >
Unable to install the Elastic Beanstalk CLI on Ubuntu
You can reinstall awsebcli with below command if you have issues after installing it: sudo pip3 install awsebcli --force-reinstall --upgrade.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found