aws / aws-elastic-beanstalk-cli-setup

Simplified EB CLI installation mechanism.
Apache License 2.0
518 stars 227 forks source link

Compatibility with Python 3.12, ModuleNotFoundError: No module named 'imp' #153

Open dom0 opened 1 year ago

dom0 commented 1 year ago

eb tool broken after upgrade to python 3.12 due to imp module remotion (https://github.com/python/cpython/issues/98040)

Stacktrace:

Traceback (most recent call last):
  File "/home/dmt/.ebcli-virtual-env/bin/eb", line 5, in <module>
    from ebcli.core.ebcore import main
  File "/home/dmt/.ebcli-virtual-env/lib/python3.12/site-packages/ebcli/core/ebcore.py", line 16, in <module>
    from cement.core import foundation, handler, hook
  File "/home/dmt/.ebcli-virtual-env/lib/python3.12/site-packages/cement/core/foundation.py", line 11, in <module>
    from ..core import output, extension, arg, controller, meta, cache, mail
  File "/home/dmt/.ebcli-virtual-env/lib/python3.12/site-packages/cement/core/extension.py", line 8, in <module>
    from imp import reload  # pragma: no cover
    ^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'imp'
wgoma101 commented 1 year ago

I'm encountering this issue as well. I tried to run "eb version" and was prompted this error

javis commented 1 year ago

Got this error on the last version of Fedora

josegreyes commented 1 year ago

Just posting so I can be alerted when a fix for this issue is posted.

benmj87 commented 12 months ago

Same issue here πŸ‘‹

TheSecMaven commented 11 months ago

same.

gasmarshal commented 11 months ago

already solved!, just downgrade your python with version Python 3.11.7 and Pip version pip 23.2.1

BobDankert commented 9 months ago

Same. Downgrading Python to 3.11 to fix this, but would be nice if this was addressed in the repo

hdformat commented 7 months ago

if you are using windows 11 and python 3.12, i found that this works for me, hoping it helps someone else

check py.exe on your system

~\dev  on β›… (Seoul)
PS > get-command py

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     py.exe                                             3.12.2150… C:\Users\hdformat\AppData\Local\Programs…

check pythons on your system

~\dev  on β›… (Seoul)
PS > py --list

 -V:3.12 *        Python 3.12 (64-bit)

install python 3.11 from dowloading a installer on python official site

https://www.python.org/downloads/release/python-3117/

check pythons again after

~\dev  on β›… (Seoul)
PS > py --list
 -V:3.12 *        Python 3.12 (64-bit)
 -V:3.11          Python 3.11 (64-bit)

run eb-cli installer using python 3.11

~\dev  on β›… (Seoul) took 3s
PS > py -3.11 .\aws-elastic-beanstalk-cli-setup\scripts\ebcli_installer.py

***********************************
1. Locating virtualenv installation
***********************************
...
***************
6. Finishing up
***************
Success!

EBCLI has been installed.

run eb cli

~\dev  on β›… (Seoul) took 10s
PS > eb --help
usage: eb (sub-commands ...) [options ...] {arguments ...}

Welcome to the Elastic Beanstalk Command Line Interface (EB CLI).
For more information on a specific command, type "eb {cmd} --help".

commands:
  abort        Cancels an environment update or deployment.
  appversion   Listing and managing application versions
  clone        Clones an environment.
  codesource   Configures the code source for the EB CLI to use by default.
  config       Modify an environment's configuration. Use subcommands to manage saved configurations.
  console      Opens the environment in the AWS Elastic Beanstalk Management Console.
  create       Creates a new environment.
  deploy       Deploys your source code to the environment.
  events       Gets recent events.
  health       Shows detailed environment health.
  init         Initializes your directory with the EB CLI. Creates the application.
  labs         Extra experimental commands.
  list         Lists all environments.
  local        Runs commands on your local machine.
  logs         Gets recent logs.
  open         Opens the application URL in a browser.
  platform     Commands for managing platforms.
  printenv     Shows the environment variables.
  restore      Restores a terminated environment.
  scale        Changes the number of running instances.
  setenv       Sets environment variables.
  ssh          Opens the SSH client to connect to an instance.
  status       Gets environment information and status.
  swap         Swaps two environment CNAMEs with each other.
  tags         Allows adding, deleting, updating, and listing of environment tags.
  terminate    Terminates the environment.
  upgrade      Updates the environment to the most recent platform version.
  use          Sets default environment.

options:
  -h, --help            show this help message and exit
  --debug               toggle debug output
  --quiet               suppress all output
  -v, --verbose         toggle verbose output
  --profile PROFILE     use a specific profile from your credential file
  -r REGION, --region REGION
                        use a specific region
  --no-verify-ssl       don't verify AWS SSL certificates
  --version             show application/version info

To get started type "eb init". Then type "eb create" and "eb open"
scottw-finao commented 6 months ago

I don't get this - i thought the whole point of using python virtual environments is that you could specify a version of python to use. Why is it necessary to downgrade python when your installer is using a virtual environment to begin with? I can't deploy my website right now because the person who set it up, created the deploy script using this ebcli tool and the tool won't work on a newly upgraded machine because of this 'imp' package. I see a thread on the tool's repository that it was already addressed and fixed back in February. So is this installer installing an older version of ebcli than the current one? I wish someone at AWS would address this as it's very difficult to rely on amazon tools such as elastic beanstalk when the primary tool many developers are using in conjunction with it is broken and the only suggested fix is 'change your php version back to something already out-of-date' And this ticket is already 8 months old, and it's still broken? wth aws??

scottw-finao commented 6 months ago

aaaaaaaaaaaaaaaaaaaand installing with python 3.11 doesn't work. I #$%#$^ hate python

Building wheels for collected packages: awsebcli, cement, termcolor
  Building wheel for awsebcli (setup.py) ... error
  error: subprocess-exited-with-error

  Γ— python setup.py bdist_wheel did not run successfully.
  β”‚ exit code: 1
  ╰─> [277 lines of output]
      /tmp/pip-install-7fa_t2lx/awsebcli_b16c7f40284d4b5e977f760b441993bd/setup.py:16: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
        from pkg_resources import parse_requirements
      Warning: 'classifiers' should be a list, got type 'tuple'
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib
      creating build/lib/ebcli
      copying ebcli/__init__.py -> build/lib/ebcli
      creating build/lib/bin
      copying bin/__init__.py -> build/lib/bin
      creating build/lib/ebcli/objects
      copying ebcli/objects/environment.py -> build/lib/ebcli/objects
      copying ebcli/objects/buildconfiguration.py -> build/lib/ebcli/objects
      copying ebcli/objects/platform.py -> build/lib/ebcli/objects
      copying ebcli/objects/conversionconfiguration.py -> build/lib/ebcli/objects
      copying ebcli/objects/sourcecontrol.py -> build/lib/ebcli/objects
      copying ebcli/objects/environmentsettings.py -> build/lib/ebcli/objects
      copying ebcli/objects/tier.py -> build/lib/ebcli/objects
      copying ebcli/objects/__init__.py -> build/lib/ebcli/objects
      copying ebcli/objects/exceptions.py -> build/lib/ebcli/objects
      copying ebcli/objects/lifecycleconfiguration.py -> build/lib/ebcli/objects
      copying ebcli/objects/api_filters.py -> build/lib/ebcli/objects
      copying ebcli/objects/region.py -> build/lib/ebcli/objects
      copying ebcli/objects/solutionstack.py -> build/lib/ebcli/objects
      copying ebcli/objects/log_stream.py -> build/lib/ebcli/objects
      copying ebcli/objects/requests.py -> build/lib/ebcli/objects
      copying ebcli/objects/cfn_stack.py -> build/lib/ebcli/objects
      copying ebcli/objects/application.py -> build/lib/ebcli/objects
      copying ebcli/objects/event.py -> build/lib/ebcli/objects
      creating build/lib/ebcli/operations
      copying ebcli/operations/platform_version_ops.py -> build/lib/ebcli/operations
      copying ebcli/operations/sshops.py -> build/lib/ebcli/operations
      copying ebcli/operations/saved_configs.py -> build/lib/ebcli/operations
      copying ebcli/operations/localops.py -> build/lib/ebcli/operations
      copying ebcli/operations/platformops.py -> build/lib/ebcli/operations
      copying ebcli/operations/useops.py -> build/lib/ebcli/operations
      copying ebcli/operations/healthops.py -> build/lib/ebcli/operations
      copying ebcli/operations/initializeops.py -> build/lib/ebcli/operations
      copying ebcli/operations/platform_branch_ops.py -> build/lib/ebcli/operations
      copying ebcli/operations/eventsops.py -> build/lib/ebcli/operations
      copying ebcli/operations/upgradeops.py -> build/lib/ebcli/operations
      copying ebcli/operations/commonops.py -> build/lib/ebcli/operations
      copying ebcli/operations/consoleops.py -> build/lib/ebcli/operations
      copying ebcli/operations/__init__.py -> build/lib/ebcli/operations
      copying ebcli/operations/restoreops.py -> build/lib/ebcli/operations
      copying ebcli/operations/appversionops.py -> build/lib/ebcli/operations
      copying ebcli/operations/logsops.py -> build/lib/ebcli/operations
      copying ebcli/operations/envvarops.py -> build/lib/ebcli/operations
      copying ebcli/operations/spotops.py -> build/lib/ebcli/operations
      copying ebcli/operations/buildspecops.py -> build/lib/ebcli/operations
      copying ebcli/operations/statusops.py -> build/lib/ebcli/operations
      copying ebcli/operations/shared_lb_ops.py -> build/lib/ebcli/operations
      copying ebcli/operations/createops.py -> build/lib/ebcli/operations
      copying ebcli/operations/scaleops.py -> build/lib/ebcli/operations
      copying ebcli/operations/abortops.py -> build/lib/ebcli/operations
      copying ebcli/operations/terminateops.py -> build/lib/ebcli/operations
      copying ebcli/operations/swapops.py -> build/lib/ebcli/operations
      copying ebcli/operations/configops.py -> build/lib/ebcli/operations
      copying ebcli/operations/deployops.py -> build/lib/ebcli/operations
      copying ebcli/operations/listops.py -> build/lib/ebcli/operations
      copying ebcli/operations/solution_stack_ops.py -> build/lib/ebcli/operations
      copying ebcli/operations/composeops.py -> build/lib/ebcli/operations
      copying ebcli/operations/cloneops.py -> build/lib/ebcli/operations
      copying ebcli/operations/gitops.py -> build/lib/ebcli/operations
      copying ebcli/operations/openops.py -> build/lib/ebcli/operations
      copying ebcli/operations/lifecycleops.py -> build/lib/ebcli/operations
      creating build/lib/ebcli/core
      copying ebcli/core/ebrun.py -> build/lib/ebcli/core
      copying ebcli/core/hooks.py -> build/lib/ebcli/core
      copying ebcli/core/ebpcore.py -> build/lib/ebcli/core
      copying ebcli/core/abstractcontroller.py -> build/lib/ebcli/core
      copying ebcli/core/__init__.py -> build/lib/ebcli/core
      copying ebcli/core/io.py -> build/lib/ebcli/core
      copying ebcli/core/ebcore.py -> build/lib/ebcli/core
      copying ebcli/core/ebglobals.py -> build/lib/ebcli/core
      copying ebcli/core/base.py -> build/lib/ebcli/core
      copying ebcli/core/fileoperations.py -> build/lib/ebcli/core
      creating build/lib/ebcli/display
      copying ebcli/display/specialtables.py -> build/lib/ebcli/display
      copying ebcli/display/environments.py -> build/lib/ebcli/display
      copying ebcli/display/term.py -> build/lib/ebcli/display
      copying ebcli/display/__init__.py -> build/lib/ebcli/display
      copying ebcli/display/screen.py -> build/lib/ebcli/display
      copying ebcli/display/traditional.py -> build/lib/ebcli/display
      copying ebcli/display/help.py -> build/lib/ebcli/display
      copying ebcli/display/appversion.py -> build/lib/ebcli/display
      copying ebcli/display/table.py -> build/lib/ebcli/display
      copying ebcli/display/data_poller.py -> build/lib/ebcli/display
      creating build/lib/ebcli/lib
      copying ebcli/lib/sns.py -> build/lib/ebcli/lib
      copying ebcli/lib/codebuild.py -> build/lib/ebcli/lib
      copying ebcli/lib/codecommit.py -> build/lib/ebcli/lib
      copying ebcli/lib/ec2.py -> build/lib/ebcli/lib
      copying ebcli/lib/kms.py -> build/lib/ebcli/lib
      copying ebcli/lib/elasticbeanstalk.py -> build/lib/ebcli/lib
      copying ebcli/lib/s3.py -> build/lib/ebcli/lib
      copying ebcli/lib/__init__.py -> build/lib/ebcli/lib
      copying ebcli/lib/utils.py -> build/lib/ebcli/lib
      copying ebcli/lib/botopatch.py -> build/lib/ebcli/lib
      copying ebcli/lib/elbv2.py -> build/lib/ebcli/lib
      copying ebcli/lib/elb.py -> build/lib/ebcli/lib
      copying ebcli/lib/aws.py -> build/lib/ebcli/lib
      copying ebcli/lib/cloudformation.py -> build/lib/ebcli/lib
      copying ebcli/lib/cloudwatch.py -> build/lib/ebcli/lib
      copying ebcli/lib/iam.py -> build/lib/ebcli/lib
      copying ebcli/lib/heuristics.py -> build/lib/ebcli/lib
      creating build/lib/ebcli/resources
      copying ebcli/resources/statics.py -> build/lib/ebcli/resources
      copying ebcli/resources/regex.py -> build/lib/ebcli/resources
      copying ebcli/resources/__init__.py -> build/lib/ebcli/resources
      copying ebcli/resources/strings.py -> build/lib/ebcli/resources
      creating build/lib/ebcli/containers
      copying ebcli/containers/envvarcollector.py -> build/lib/ebcli/containers
      copying ebcli/containers/fshandler.py -> build/lib/ebcli/containers
      copying ebcli/containers/dockerrun.py -> build/lib/ebcli/containers
      copying ebcli/containers/generic_container.py -> build/lib/ebcli/containers
      copying ebcli/containers/pathconfig.py -> build/lib/ebcli/containers
      copying ebcli/containers/factory.py -> build/lib/ebcli/containers
      copying ebcli/containers/container_viewmodel.py -> build/lib/ebcli/containers
      copying ebcli/containers/abstractcontainer.py -> build/lib/ebcli/containers
      copying ebcli/containers/__init__.py -> build/lib/ebcli/containers
      copying ebcli/containers/log.py -> build/lib/ebcli/containers
      copying ebcli/containers/utils.py -> build/lib/ebcli/containers
      copying ebcli/containers/preconfigured_container.py -> build/lib/ebcli/containers
      copying ebcli/containers/commands.py -> build/lib/ebcli/containers
      copying ebcli/containers/multicontainer.py -> build/lib/ebcli/containers
      copying ebcli/containers/containerops.py -> build/lib/ebcli/containers
      copying ebcli/containers/compat.py -> build/lib/ebcli/containers
      copying ebcli/containers/compose.py -> build/lib/ebcli/containers
      creating build/lib/ebcli/bundled
      copying ebcli/bundled/__init__.py -> build/lib/ebcli/bundled
      creating build/lib/ebcli/labs
      copying ebcli/labs/cleanupversions.py -> build/lib/ebcli/labs
      copying ebcli/labs/setupssl.py -> build/lib/ebcli/labs
      copying ebcli/labs/__init__.py -> build/lib/ebcli/labs
      copying ebcli/labs/download.py -> build/lib/ebcli/labs
      copying ebcli/labs/controller.py -> build/lib/ebcli/labs
      copying ebcli/labs/quicklink.py -> build/lib/ebcli/labs
      copying ebcli/labs/convertdockerrun.py -> build/lib/ebcli/labs
      copying ebcli/labs/cloudwatchsetup.py -> build/lib/ebcli/labs
      creating build/lib/ebcli/controllers
      copying ebcli/controllers/terminate.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/codesource.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/tags.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/abort.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/health.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/upgrade.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/scale.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/printenv.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/events.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/config.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/deploy.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/swap.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/setenv.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/__init__.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/list.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/use.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/create.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/ssh.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/open.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/lifecycle.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/logs.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/status.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/appversion.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/local.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/restore.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/initialize.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/console.py -> build/lib/ebcli/controllers
      copying ebcli/controllers/clone.py -> build/lib/ebcli/controllers
      creating build/lib/ebcli/operations/tagops
      copying ebcli/operations/tagops/tagops.py -> build/lib/ebcli/operations/tagops
      copying ebcli/operations/tagops/taglist.py -> build/lib/ebcli/operations/tagops
      copying ebcli/operations/tagops/__init__.py -> build/lib/ebcli/operations/tagops
      creating build/lib/ebcli/bundled/asciimatics
      copying ebcli/bundled/asciimatics/utilities.py -> build/lib/ebcli/bundled/asciimatics
      copying ebcli/bundled/asciimatics/__init__.py -> build/lib/ebcli/bundled/asciimatics
      copying ebcli/bundled/asciimatics/exceptions.py -> build/lib/ebcli/bundled/asciimatics
      copying ebcli/bundled/asciimatics/overrides.py -> build/lib/ebcli/bundled/asciimatics
      copying ebcli/bundled/asciimatics/screen.py -> build/lib/ebcli/bundled/asciimatics
      copying ebcli/bundled/asciimatics/event.py -> build/lib/ebcli/bundled/asciimatics
      creating build/lib/ebcli/controllers/platform
      copying ebcli/controllers/platform/events.py -> build/lib/ebcli/controllers/platform
      copying ebcli/controllers/platform/__init__.py -> build/lib/ebcli/controllers/platform
      copying ebcli/controllers/platform/list.py -> build/lib/ebcli/controllers/platform
      copying ebcli/controllers/platform/use.py -> build/lib/ebcli/controllers/platform
      copying ebcli/controllers/platform/create.py -> build/lib/ebcli/controllers/platform
      copying ebcli/controllers/platform/logs.py -> build/lib/ebcli/controllers/platform
      copying ebcli/controllers/platform/status.py -> build/lib/ebcli/controllers/platform
      copying ebcli/controllers/platform/initialize.py -> build/lib/ebcli/controllers/platform
      copying ebcli/controllers/platform/delete.py -> build/lib/ebcli/controllers/platform
      creating build/lib/ebcli/lib/botocoredata
      creating build/lib/ebcli/lib/botocoredata/elasticbeanstalk
      creating build/lib/ebcli/lib/botocoredata/elasticbeanstalk/2010-12-01
      copying ebcli/lib/botocoredata/elasticbeanstalk/2010-12-01/paginators-1.json -> build/lib/ebcli/lib/botocoredata/elasticbeanstalk/2010-12-01
      copying ebcli/lib/botocoredata/elasticbeanstalk/2010-12-01/service-2.json -> build/lib/ebcli/lib/botocoredata/elasticbeanstalk/2010-12-01
      creating build/lib/ebcli/containers/containerfiles
      copying ebcli/containers/containerfiles/python3-runtime -> build/lib/ebcli/containers/containerfiles
      copying ebcli/containers/containerfiles/golang-runtime-1.3 -> build/lib/ebcli/containers/containerfiles
      copying ebcli/containers/containerfiles/glassfish-runtime-5.0-al -> build/lib/ebcli/containers/containerfiles
      copying ebcli/containers/containerfiles/golang-runtime-1.4 -> build/lib/ebcli/containers/containerfiles
      copying ebcli/containers/containerfiles/glassfish-runtime-4.1-jdk8 -> build/lib/ebcli/containers/containerfiles
      copying ebcli/containers/containerfiles/container_config.json -> build/lib/ebcli/containers/containerfiles
      copying ebcli/containers/containerfiles/glassfish-runtime-4.0-jdk7 -> build/lib/ebcli/containers/containerfiles
      creating build/lib/ebcli/labs/cloudwatchfiles
      copying ebcli/labs/cloudwatchfiles/eb-logs-v1.config -> build/lib/ebcli/labs/cloudwatchfiles
      copying ebcli/labs/cloudwatchfiles/cwl-setup-v1.config -> build/lib/ebcli/labs/cloudwatchfiles
      copying ebcli/labs/cloudwatchfiles/cwl-activity-logs-v1.config -> build/lib/ebcli/labs/cloudwatchfiles
      running build_scripts
      creating build/scripts-3.11
      copying and adjusting bin/eb -> build/scripts-3.11
      changing mode of build/scripts-3.11/eb from 664 to 775
      /home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
      !!

              ********************************************************************************
              Please avoid running ``setup.py`` directly.
              Instead, use pypa/build, pypa/installer or other
              standards-based tools.

              See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
              ********************************************************************************

      !!
        self.initialize_options()
      installing to build/bdist.linux-x86_64/wheel
      running install
      running install_lib
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-7fa_t2lx/awsebcli_b16c7f40284d4b5e977f760b441993bd/setup.py", line 96, in <module>
          setup(**setup_options)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 403, in run
          self.run_command("install")
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/command/install.py", line 78, in run
          return orig.install.run(self)
                 ^^^^^^^^^^^^^^^^^^^^^^
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 708, in run
          self.run_command(cmd_name)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.ensure_finalized()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
          self.finalize_options()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/command/install_lib.py", line 17, in finalize_options
          self.set_undefined_options('install',('install_layout','install_layout'))
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 296, in set_undefined_options
          setattr(self, dst_option, getattr(src_cmd_obj, src_option))
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: install_layout. Did you mean: 'install_platlib'?
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for awsebcli
  Running setup.py clean for awsebcli
  Building wheel for cement (setup.py) ... error
  error: subprocess-exited-with-error

  Γ— python setup.py bdist_wheel did not run successfully.
  β”‚ exit code: 1
  ╰─> [130 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib
      creating build/lib/cement
      copying cement/__init__.py -> build/lib/cement
      creating build/lib/examples
      copying examples/__init__.py -> build/lib/examples
      creating build/lib/cement/core
      copying cement/core/hook.py -> build/lib/cement/core
      copying cement/core/foundation.py -> build/lib/cement/core
      copying cement/core/config.py -> build/lib/cement/core
      copying cement/core/output.py -> build/lib/cement/core
      copying cement/core/__init__.py -> build/lib/cement/core
      copying cement/core/extension.py -> build/lib/cement/core
      copying cement/core/arg.py -> build/lib/cement/core
      copying cement/core/log.py -> build/lib/cement/core
      copying cement/core/interface.py -> build/lib/cement/core
      copying cement/core/mail.py -> build/lib/cement/core
      copying cement/core/plugin.py -> build/lib/cement/core
      copying cement/core/handler.py -> build/lib/cement/core
      copying cement/core/cache.py -> build/lib/cement/core
      copying cement/core/controller.py -> build/lib/cement/core
      copying cement/core/exc.py -> build/lib/cement/core
      copying cement/core/backend.py -> build/lib/cement/core
      copying cement/core/meta.py -> build/lib/cement/core
      creating build/lib/cement/utils
      copying cement/utils/test.py -> build/lib/cement/utils
      copying cement/utils/shell.py -> build/lib/cement/utils
      copying cement/utils/__init__.py -> build/lib/cement/utils
      copying cement/utils/misc.py -> build/lib/cement/utils
      copying cement/utils/version.py -> build/lib/cement/utils
      copying cement/utils/fs.py -> build/lib/cement/utils
      creating build/lib/cement/ext
      copying cement/ext/ext_argparse.py -> build/lib/cement/ext
      copying cement/ext/ext_mustache.py -> build/lib/cement/ext
      copying cement/ext/ext_dummy.py -> build/lib/cement/ext
      copying cement/ext/ext_json_configobj.py -> build/lib/cement/ext
      copying cement/ext/ext_configobj.py -> build/lib/cement/ext
      copying cement/ext/ext_genshi.py -> build/lib/cement/ext
      copying cement/ext/ext_plugin.py -> build/lib/cement/ext
      copying cement/ext/ext_configparser.py -> build/lib/cement/ext
      copying cement/ext/ext_alarm.py -> build/lib/cement/ext
      copying cement/ext/ext_memcached.py -> build/lib/cement/ext
      copying cement/ext/__init__.py -> build/lib/cement/ext
      copying cement/ext/ext_json.py -> build/lib/cement/ext
      copying cement/ext/ext_daemon.py -> build/lib/cement/ext
      copying cement/ext/ext_tabulate.py -> build/lib/cement/ext
      copying cement/ext/ext_smtp.py -> build/lib/cement/ext
      copying cement/ext/ext_reload_config.py -> build/lib/cement/ext
      copying cement/ext/ext_yaml_configobj.py -> build/lib/cement/ext
      copying cement/ext/ext_logging.py -> build/lib/cement/ext
      copying cement/ext/ext_yaml.py -> build/lib/cement/ext
      copying cement/ext/ext_colorlog.py -> build/lib/cement/ext
      copying cement/ext/ext_argcomplete.py -> build/lib/cement/ext
      running egg_info
      creating cement.egg-info
      writing cement.egg-info/PKG-INFO
      writing dependency_links to cement.egg-info/dependency_links.txt
      writing namespace_packages to cement.egg-info/namespace_packages.txt
      writing top-level names to cement.egg-info/top_level.txt
      writing manifest file 'cement.egg-info/SOURCES.txt'
      reading manifest file 'cement.egg-info/SOURCES.txt'
      adding license file 'LICENSE'
      writing manifest file 'cement.egg-info/SOURCES.txt'
      /home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
      !!

              ********************************************************************************
              Please avoid running ``setup.py`` directly.
              Instead, use pypa/build, pypa/installer or other
              standards-based tools.

              See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
              ********************************************************************************

      !!
        self.initialize_options()
      installing to build/bdist.linux-x86_64/wheel
      running install
      running install_lib
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-7fa_t2lx/cement_dd4b4e1b0a6c4faa9b78d9c256d44e2a/setup.py", line 33, in <module>
          setup(name='cement',
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 403, in run
          self.run_command("install")
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/command/install.py", line 78, in run
          return orig.install.run(self)
                 ^^^^^^^^^^^^^^^^^^^^^^
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 708, in run
          self.run_command(cmd_name)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.ensure_finalized()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
          self.finalize_options()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/command/install_lib.py", line 17, in finalize_options
          self.set_undefined_options('install',('install_layout','install_layout'))
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 296, in set_undefined_options
          setattr(self, dst_option, getattr(src_cmd_obj, src_option))
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: install_layout. Did you mean: 'install_platlib'?
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for cement
  Running setup.py clean for cement
  Building wheel for termcolor (setup.py) ... error
  error: subprocess-exited-with-error

  Γ— python setup.py bdist_wheel did not run successfully.
  β”‚ exit code: 1
  ╰─> [58 lines of output]
      /home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
      !!

              ********************************************************************************
              Please avoid running ``setup.py`` directly.
              Instead, use pypa/build, pypa/installer or other
              standards-based tools.

              See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
              ********************************************************************************

      !!
        self.initialize_options()
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-7fa_t2lx/termcolor_e9d597e7b6b543a2a830d242d640627f/setup.py", line 37, in <module>
          setup(name='termcolor',
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
          dist.run_commands()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 403, in run
          self.run_command("install")
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command
          cmd_obj.run()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/command/install.py", line 78, in run
          return orig.install.run(self)
                 ^^^^^^^^^^^^^^^^^^^^^^
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 708, in run
          self.run_command(cmd_name)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/dist.py", line 1233, in run_command
          super().run_command(command)
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
          cmd_obj.ensure_finalized()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
          self.finalize_options()
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/command/install_lib.py", line 17, in finalize_options
          self.set_undefined_options('install',('install_layout','install_layout'))
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 296, in set_undefined_options
          setattr(self, dst_option, getattr(src_cmd_obj, src_option))
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/scottw/.ebcli-virtual-env/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 107, in __getattr__
          raise AttributeError(attr)
      AttributeError: install_layout. Did you mean: 'install_platlib'?
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for termcolor
  Running setup.py clean for termcolor
Failed to build awsebcli cement termcolor
ERROR: Could not build wheels for awsebcli, cement, termcolor, which is required to install pyproject.toml-based projects
j-krl commented 5 months ago

Just ran into this myself -- can't believe this has been open for this long. Switched from having in installed in my python project's venv to this because of the dependency issues with botocore. Kind of hilarious that this is the official way to install the tool and it doesn't work either. I also really don't understand why I have to mess around with installing virtualenv... Why not just run it with a regular venv which is native to python and cut out that extra step?

leskapaul commented 4 months ago

At the very least this repo's readme needs to be updated to clarify that python 3.12+ should NOT be used. This shouldn't take too long...

SznDevOps commented 4 months ago

Hi! I have the same problem on Python 3.12.4. The AWS documentation shows version 3.11 or later . https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install-advanced.html Let's put the reactions of those who are facing the same problem on python 3.12.4.

whitesoundcl commented 4 months ago

Running python --version returned 3.12.x for me, so i had to downgrade.

These are the steps I followed to get it working on macOS:

  1. Deactivate any active virtual environment:
    • pyenv deactivate
  2. Install Python 3.11.x:
    • pyenv install 3.11
  3. Install virtualenv for Python 3.11:
    • pip install virtualenv
  4. Run the installation script again:
    • python ./aws-elastic-beanstalk-cli-setup/scripts/ebcli_installer.py
lloricode commented 3 months ago

up up up

ayotomiwaa commented 3 months ago

This is still a problem.

7kn commented 2 months ago

would be nice to get this fixed

mercmobily commented 2 months ago

Just ran into this. Devs., please update things so that it works on Python 3.12. The latest Ubuntu installs Python 3.12

ThibDums commented 2 months ago

It would be nice to get a fix for this.

shaicoleman commented 2 months ago

This is fixed now. EB CLI >= 3.21.0 works with Python 3.12