aws-cloudformation / cloudformation-cli

The CloudFormation Provider Development Toolkit allows you to author your own resource providers and modules that can be used by CloudFormation.
Apache License 2.0
316 stars 157 forks source link

cfn init fails in cloudshell #1007

Closed jvepuri closed 9 months ago

jvepuri commented 1 year ago

[cloudshell-user@ip-10-81-160-185 ~]$ cfn init === Unhandled exception === Please report this issue to the team. Issue tracker: github.com/aws-cloudformation/cloudformation-cli/issues Please include this information: Traceback (most recent call last): File "/home/cloudshell-user/.local/lib/python3.7/site-packages/rpdk/core/cli.py", line 83, in main init_setup_subparser(subparsers, parents) File "/home/cloudshell-user/.local/lib/python3.7/site-packages/rpdk/core/init.py", line 171, in setup_subparser language_setup_subparser()(language_subparsers, [base_subparser]) File "/usr/lib/python3.7/site-packages/pkg_resources/init.py", line 2460, in load self.require(*args, **kwargs) File "/usr/lib/python3.7/site-packages/pkg_resources/init.py", line 2483, in require items = working_set.resolve(reqs, env, installer, extras=self.extras) File "/usr/lib/python3.7/site-packages/pkg_resources/init.py", line 790, in resolve raise VersionConflict(dist, req).with_context(dependent_req) pkg_resources.ContextualVersionConflict: (requests 2.25.1 (/usr/local/lib/python3.7/site-packages), Requirement.parse('requests>=2.26.0'), {'docker'}) [cloudshell-user@ip-10-81-160-185 ~]$

mmaeng commented 1 year ago

HI @jvepuri

From that log output it looks to be complaining about a couple of dependency versions. You will likely have to create a python3 virtual environment and reinstall the newest cloudformation-cli + plugin.

mircealam commented 9 months ago

python3.7 is EOL. Also please follow @mmaeng's recommandation around deps and virtual env or provide all the steps you are taking to install the tool. Closing this for now but feel free to reopen if you are still having troubles with it.