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.

cfn cli fails to install following the provided instructions

See original GitHub issue

While following the installation instructions detailed in the guide, cfn cli fails to install. Command used for installation:

source env/bin/activate
pip3 install cloudformation-cli cloudformation-cli-python-plugin
pip3 install --upgrade cloudformation-cli cloudformation-cli-python-plugin

Result when running cfn init

Traceback (most recent call last):
  File "/home/ec2-user/environment/CloudFormationCLI/env/bin/cfn", line 5, in <module>
    from rpdk.core.cli import main
  File "/home/ec2-user/environment/CloudFormationCLI/env/lib64/python3.7/site-packages/rpdk/core/cli.py", line 12, in <module>
    from .build_image import setup_subparser as build_image_setup_subparser
  File "/home/ec2-user/environment/CloudFormationCLI/env/lib64/python3.7/site-packages/rpdk/core/build_image.py", line 11, in <module>
    from .project import Project
  File "/home/ec2-user/environment/CloudFormationCLI/env/lib64/python3.7/site-packages/rpdk/core/project.py", line 12, in <module>
    from jinja2 import Environment, PackageLoader, select_autoescape
  File "/home/ec2-user/environment/CloudFormationCLI/env/lib64/python3.7/site-packages/jinja2/__init__.py", line 12, in <module>
    from .environment import Environment
  File "/home/ec2-user/environment/CloudFormationCLI/env/lib64/python3.7/site-packages/jinja2/environment.py", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "/home/ec2-user/environment/CloudFormationCLI/env/lib64/python3.7/site-packages/jinja2/defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "/home/ec2-user/environment/CloudFormationCLI/env/lib64/python3.7/site-packages/jinja2/filters.py", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/ec2-user/environment/CloudFormationCLI/env/lib64/python3.7/site-packages/markupsafe/__init__.py)

To clarify, markupsafe is already installed:

Requirement already satisfied: markupsafe in /home/ec2-user/environment/CloudFormationCLI/env/lib/python3.7/site-packages (2.1.0)``

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
benbridtscommented, Feb 22, 2022

@osdrv @beck3905 Can you try installing an older version of markupsafe as a workaround:

pip install markupsafe==2.0.1
0reactions
osdrvcommented, Feb 25, 2022

@ammokhov 's patch fixed my problem. Many thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the CloudFormation Command Line Interface (CFN ...
The CloudFormation CLI provides a consistent way to model and provision both AWS ... Use the following command to install all the language...
Read more >
Error while installing CFN-cli, Could not find a version that ...
I am trying to setup my dev environment for cloudformation and while installing cfn-cli (coudformation ClI) I am getting below error.
Read more >
AWS CloudFormation CLI
The CloudFormation Provider Development Toolkit allows you to author your own resource providers and modules that can be used by CloudFormation.
Read more >
awscfncli2
awscfncli uses a YAML config file to manage which stacks to deploy and how to deploy them. By default, it is cfn-cli.yml ....
Read more >
Troubleshoot AWS CloudFormation stack creation—ArcGIS for ...
If you see the message Error encountered during build of config: Failed to retrieve https:// .s3.amazonaws.com/ in cfn-init.log, ensure the deployment S3 bucket ......
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