SAM command failing with: ImportError: cannot import name AliasedEventEmitter The Next CEO of Stack OverflowWhat's the proper way to install pip, virtualenv, and distribute for Python?No module named pkg_resourcesImportError: Cannot import name XImportError: No module named pipImportError: No module named Image“pip install unroll”: “python setup.py egg_info” failed with error code 1Installing Python dependencies in AWS Codestar with LambdaCannot install aws-sam-cli using pip Python 2.7Cannot upgrade AWS SAM CLI from 0.2.8 to 0.6.1Is it possible/recommended to use `sam build` in AWS CodeBuild?
Why did the Drakh emissary look so blurred in S04:E11 "Lines of Communication"?
How can the PCs determine if an item is a phylactery?
The sum of any ten consecutive numbers from a fibonacci sequence is divisible by 11
Is a linearly independent set whose span is dense a Schauder basis?
Why can't we say "I have been having a dog"?
pgfplots: How to draw a tangent graph below two others?
Salesforce opportunity stages
Create custom note boxes
Does int main() need a declaration on C++?
Is it possible to make a 9x9 table fit within the default margins?
Could you use a laser beam as a modulated carrier wave for radio signal?
Why did early computer designers eschew integers?
How do I keep Mac Emacs from trapping M-`?
Is it reasonable to ask other researchers to send me their previous grant applications?
That's an odd coin - I wonder why
What is the difference between 'contrib' and 'non-free' packages repositories?
Gauss' Posthumous Publications?
What day is it again?
Mathematica command that allows it to read my intentions
My boss doesn't want me to have a side project
Could a dragon use its wings to swim?
Planeswalker Ability and Death Timing
Incomplete cube
Read/write a pipe-delimited file line by line with some simple text manipulation
SAM command failing with: ImportError: cannot import name AliasedEventEmitter
The Next CEO of Stack OverflowWhat's the proper way to install pip, virtualenv, and distribute for Python?No module named pkg_resourcesImportError: Cannot import name XImportError: No module named pipImportError: No module named Image“pip install unroll”: “python setup.py egg_info” failed with error code 1Installing Python dependencies in AWS Codestar with LambdaCannot install aws-sam-cli using pip Python 2.7Cannot upgrade AWS SAM CLI from 0.2.8 to 0.6.1Is it possible/recommended to use `sam build` in AWS CodeBuild?
I am running a SAM template through AWS CodeBuild using a buildspec.yml file
I believe that this issue is caused by pip installing a default python 2.7 version of the aws-sam-cli package. I'm not that familiar with how to pip install the python3 version of a package. Here is a snippet of my buildspec.yml:
phases:
pre_build:
commands:
- echo "Pre-Build Phase started - SAM Deployment"
- alias python=python3
- pip install --upgrade pip
- pip install aws-sam-cli # install the sam cli
- USER_BASE_PATH=$(python -m site --user-base) # save the path to the user's local packages folder to a variable (as opposed to the global packages folder)
- export PATH=$PATH:$USER_BASE_PATH/bin # add the user's local packages folder to PATH
- sam --version # verify "sam" can now be called
build:
commands:
- sam package --runtime python3 --template-file $INPUT_FILE --output-template-file $OUTPUT_FILE --s3-bucket $S3_BUCKET # package the template to an S3 bucket
...
Has anyone ever run into this issue?
python amazon-web-services aws-codebuild aws-serverless serverless-application-model
add a comment |
I am running a SAM template through AWS CodeBuild using a buildspec.yml file
I believe that this issue is caused by pip installing a default python 2.7 version of the aws-sam-cli package. I'm not that familiar with how to pip install the python3 version of a package. Here is a snippet of my buildspec.yml:
phases:
pre_build:
commands:
- echo "Pre-Build Phase started - SAM Deployment"
- alias python=python3
- pip install --upgrade pip
- pip install aws-sam-cli # install the sam cli
- USER_BASE_PATH=$(python -m site --user-base) # save the path to the user's local packages folder to a variable (as opposed to the global packages folder)
- export PATH=$PATH:$USER_BASE_PATH/bin # add the user's local packages folder to PATH
- sam --version # verify "sam" can now be called
build:
commands:
- sam package --runtime python3 --template-file $INPUT_FILE --output-template-file $OUTPUT_FILE --s3-bucket $S3_BUCKET # package the template to an S3 bucket
...
Has anyone ever run into this issue?
python amazon-web-services aws-codebuild aws-serverless serverless-application-model
add a comment |
I am running a SAM template through AWS CodeBuild using a buildspec.yml file
I believe that this issue is caused by pip installing a default python 2.7 version of the aws-sam-cli package. I'm not that familiar with how to pip install the python3 version of a package. Here is a snippet of my buildspec.yml:
phases:
pre_build:
commands:
- echo "Pre-Build Phase started - SAM Deployment"
- alias python=python3
- pip install --upgrade pip
- pip install aws-sam-cli # install the sam cli
- USER_BASE_PATH=$(python -m site --user-base) # save the path to the user's local packages folder to a variable (as opposed to the global packages folder)
- export PATH=$PATH:$USER_BASE_PATH/bin # add the user's local packages folder to PATH
- sam --version # verify "sam" can now be called
build:
commands:
- sam package --runtime python3 --template-file $INPUT_FILE --output-template-file $OUTPUT_FILE --s3-bucket $S3_BUCKET # package the template to an S3 bucket
...
Has anyone ever run into this issue?
python amazon-web-services aws-codebuild aws-serverless serverless-application-model
I am running a SAM template through AWS CodeBuild using a buildspec.yml file
I believe that this issue is caused by pip installing a default python 2.7 version of the aws-sam-cli package. I'm not that familiar with how to pip install the python3 version of a package. Here is a snippet of my buildspec.yml:
phases:
pre_build:
commands:
- echo "Pre-Build Phase started - SAM Deployment"
- alias python=python3
- pip install --upgrade pip
- pip install aws-sam-cli # install the sam cli
- USER_BASE_PATH=$(python -m site --user-base) # save the path to the user's local packages folder to a variable (as opposed to the global packages folder)
- export PATH=$PATH:$USER_BASE_PATH/bin # add the user's local packages folder to PATH
- sam --version # verify "sam" can now be called
build:
commands:
- sam package --runtime python3 --template-file $INPUT_FILE --output-template-file $OUTPUT_FILE --s3-bucket $S3_BUCKET # package the template to an S3 bucket
...
Has anyone ever run into this issue?
python amazon-web-services aws-codebuild aws-serverless serverless-application-model
python amazon-web-services aws-codebuild aws-serverless serverless-application-model
asked Mar 7 at 19:33
Andrew A.Andrew A.
440714
440714
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
For anyone revisiting this question I figured it out. Below is my revised buildspec.yml snippet. I had to install the awscli package with pip3.
phases:
pre_build:
commands:
- echo "Pre-Build Phase started - SAM Deployment"
- ls -ltr # list directory contents from oldest to new
- sudo apt-get update
- sudo apt-get -y install python3-pip
- sudo pip3 install --upgrade awscli
- apt-get update > /dev/null # get list of package updates from
repositories
- apt-get install jq -y > /dev/null # install 32-bit JSON processor
- jq --version # check JSON processor installed / which version
- wget -q https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 # get 64-bit JSON processor
- chmod +x jq-linux64 # make executable
- mv jq-linux64 $(which jq) # make "jq" alias point to 64-bit jq
- jq --version # verify jq points to new version
- alias python=python3
- pip install aws-sam-cli # install the sam cli
- USER_BASE_PATH=$(python -m site --user-base) # save the path to the user's local packages folder to a variable (as opposed to the global packages folder)
- export PATH=$PATH:$USER_BASE_PATH/bin # add the user's local packages folder to PATH
- sam --version # verify "sam" can now be called
build:
commands:
- sam package --template-file $INPUT_FILE --output-template-file $OUTPUT_FILE --s3-bucket $S3_BUCKET # package the template to an S3 bucket
add a comment |
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55051510%2fsam-command-failing-with-importerror-cannot-import-name-aliasedeventemitter%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
For anyone revisiting this question I figured it out. Below is my revised buildspec.yml snippet. I had to install the awscli package with pip3.
phases:
pre_build:
commands:
- echo "Pre-Build Phase started - SAM Deployment"
- ls -ltr # list directory contents from oldest to new
- sudo apt-get update
- sudo apt-get -y install python3-pip
- sudo pip3 install --upgrade awscli
- apt-get update > /dev/null # get list of package updates from
repositories
- apt-get install jq -y > /dev/null # install 32-bit JSON processor
- jq --version # check JSON processor installed / which version
- wget -q https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 # get 64-bit JSON processor
- chmod +x jq-linux64 # make executable
- mv jq-linux64 $(which jq) # make "jq" alias point to 64-bit jq
- jq --version # verify jq points to new version
- alias python=python3
- pip install aws-sam-cli # install the sam cli
- USER_BASE_PATH=$(python -m site --user-base) # save the path to the user's local packages folder to a variable (as opposed to the global packages folder)
- export PATH=$PATH:$USER_BASE_PATH/bin # add the user's local packages folder to PATH
- sam --version # verify "sam" can now be called
build:
commands:
- sam package --template-file $INPUT_FILE --output-template-file $OUTPUT_FILE --s3-bucket $S3_BUCKET # package the template to an S3 bucket
add a comment |
For anyone revisiting this question I figured it out. Below is my revised buildspec.yml snippet. I had to install the awscli package with pip3.
phases:
pre_build:
commands:
- echo "Pre-Build Phase started - SAM Deployment"
- ls -ltr # list directory contents from oldest to new
- sudo apt-get update
- sudo apt-get -y install python3-pip
- sudo pip3 install --upgrade awscli
- apt-get update > /dev/null # get list of package updates from
repositories
- apt-get install jq -y > /dev/null # install 32-bit JSON processor
- jq --version # check JSON processor installed / which version
- wget -q https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 # get 64-bit JSON processor
- chmod +x jq-linux64 # make executable
- mv jq-linux64 $(which jq) # make "jq" alias point to 64-bit jq
- jq --version # verify jq points to new version
- alias python=python3
- pip install aws-sam-cli # install the sam cli
- USER_BASE_PATH=$(python -m site --user-base) # save the path to the user's local packages folder to a variable (as opposed to the global packages folder)
- export PATH=$PATH:$USER_BASE_PATH/bin # add the user's local packages folder to PATH
- sam --version # verify "sam" can now be called
build:
commands:
- sam package --template-file $INPUT_FILE --output-template-file $OUTPUT_FILE --s3-bucket $S3_BUCKET # package the template to an S3 bucket
add a comment |
For anyone revisiting this question I figured it out. Below is my revised buildspec.yml snippet. I had to install the awscli package with pip3.
phases:
pre_build:
commands:
- echo "Pre-Build Phase started - SAM Deployment"
- ls -ltr # list directory contents from oldest to new
- sudo apt-get update
- sudo apt-get -y install python3-pip
- sudo pip3 install --upgrade awscli
- apt-get update > /dev/null # get list of package updates from
repositories
- apt-get install jq -y > /dev/null # install 32-bit JSON processor
- jq --version # check JSON processor installed / which version
- wget -q https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 # get 64-bit JSON processor
- chmod +x jq-linux64 # make executable
- mv jq-linux64 $(which jq) # make "jq" alias point to 64-bit jq
- jq --version # verify jq points to new version
- alias python=python3
- pip install aws-sam-cli # install the sam cli
- USER_BASE_PATH=$(python -m site --user-base) # save the path to the user's local packages folder to a variable (as opposed to the global packages folder)
- export PATH=$PATH:$USER_BASE_PATH/bin # add the user's local packages folder to PATH
- sam --version # verify "sam" can now be called
build:
commands:
- sam package --template-file $INPUT_FILE --output-template-file $OUTPUT_FILE --s3-bucket $S3_BUCKET # package the template to an S3 bucket
For anyone revisiting this question I figured it out. Below is my revised buildspec.yml snippet. I had to install the awscli package with pip3.
phases:
pre_build:
commands:
- echo "Pre-Build Phase started - SAM Deployment"
- ls -ltr # list directory contents from oldest to new
- sudo apt-get update
- sudo apt-get -y install python3-pip
- sudo pip3 install --upgrade awscli
- apt-get update > /dev/null # get list of package updates from
repositories
- apt-get install jq -y > /dev/null # install 32-bit JSON processor
- jq --version # check JSON processor installed / which version
- wget -q https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 # get 64-bit JSON processor
- chmod +x jq-linux64 # make executable
- mv jq-linux64 $(which jq) # make "jq" alias point to 64-bit jq
- jq --version # verify jq points to new version
- alias python=python3
- pip install aws-sam-cli # install the sam cli
- USER_BASE_PATH=$(python -m site --user-base) # save the path to the user's local packages folder to a variable (as opposed to the global packages folder)
- export PATH=$PATH:$USER_BASE_PATH/bin # add the user's local packages folder to PATH
- sam --version # verify "sam" can now be called
build:
commands:
- sam package --template-file $INPUT_FILE --output-template-file $OUTPUT_FILE --s3-bucket $S3_BUCKET # package the template to an S3 bucket
answered Mar 12 at 16:28
Andrew A.Andrew A.
440714
440714
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55051510%2fsam-command-failing-with-importerror-cannot-import-name-aliasedeventemitter%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
