Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing awsebcli #31

Open
BenGale opened this issue Jul 17, 2023 · 16 comments
Open

Error installing awsebcli #31

BenGale opened this issue Jul 17, 2023 · 16 comments
Assignees
Labels
bug Something isn't working

Comments

@BenGale
Copy link

BenGale commented Jul 17, 2023

Orb version:

2.0.1

What happened:

During 'Setting Up Elastic Beanstalk CLI' Step, receiving the following error:

Installing collected packages: click, userpath, packaging, argcomplete, pipx
Successfully installed argcomplete-3.1.1 click-8.1.5 packaging-23.1 pipx-1.2.0 userpath-1.8.0
WARNING: You are using pip version 20.3.4; however, version 23.2 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
creating virtual environment...
creating shared libraries...
upgrading shared libraries...
installing awsebcli...
Fatal error from pip prevented installation. Full pip output in file:
    /home/circleci/.local/pipx/logs/cmd_2023-07-17_17.58.20_pip_errors.log

pip seemed to fail to build package:
    PyYAML<5.5,>=5.3.1

Some possibly relevant errors from pip install:
    error: subprocess-exited-with-error
    AttributeError: cython_sources

Error installing awsebcli.

Exited with code exit status 1

Expected behavior:

It should install awsebcli correctly.

Additional Information:

Was working fine earlier today, this is pretty recent.

@BenGale BenGale added the bug Something isn't working label Jul 17, 2023
@NMPHalpern
Copy link

+1

@NMPHalpern
Copy link

This coincides with the release of Cython 3.0...

@NMPHalpern
Copy link

Orb version:

2.0.1

What happened:

During 'Setting Up Elastic Beanstalk CLI' Step, receiving the following error:

Installing collected packages: click, userpath, packaging, argcomplete, pipx
Successfully installed argcomplete-3.1.1 click-8.1.5 packaging-23.1 pipx-1.2.0 userpath-1.8.0
WARNING: You are using pip version 20.3.4; however, version 23.2 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
creating virtual environment...
creating shared libraries...
upgrading shared libraries...
installing awsebcli...
Fatal error from pip prevented installation. Full pip output in file:
    /home/circleci/.local/pipx/logs/cmd_2023-07-17_17.58.20_pip_errors.log

pip seemed to fail to build package:
    PyYAML<5.5,>=5.3.1

Some possibly relevant errors from pip install:
    error: subprocess-exited-with-error
    AttributeError: cython_sources

Error installing awsebcli.

Exited with code exit status 1

Expected behavior:

It should install awsebcli correctly.

Additional Information:

Was working fine earlier today, this is pretty recent.

as a workaround for the eb/setup, you can bypass the orb and configure the step as follows:

  • run: |
    sudo wget https://bootstrap.pypa.io/get-pip.py
    sudo python3 ./get-pip.py
    sudo pip install "pyyaml<5.4"
    sudo pip install --upgrade setuptools
    sudo pip install --upgrade pip awsebcli

@tubone24
Copy link

@NMPHalpern
Thank you for sharing the workaround! We had the same problem in our environment and were having trouble, but we will adopt this one.

@BenGale
Copy link
Author

BenGale commented Jul 18, 2023

@NMPHalpern Thanks for the workaround. Can confirm this is working for us.

I'll leave this open as the orb is still broken, but at least we're deploying again.

@AbdelrahmanManz
Copy link

Having the same issue...

@paulipotter
Copy link

paulipotter commented Jul 18, 2023

Having the same issue. Thanks for providing the workaround! Since I execute eb/setup once on every environment, I went ahead and made the workaround a reusable command to avoid copy pasting the same lines multiple times:

commands:
  setup-ebcli:
    steps:
      - run: 
          name: 'Install pip and awsebcli'
          command: |
            sudo wget https://bootstrap.pypa.io/get-pip.py
            sudo python3 ./get-pip.py
            sudo pip install "pyyaml<5.4"
            sudo pip install --upgrade setuptools
            sudo pip install --upgrade pip awsebcli

I just call that one command on any jobs that need it like this:

jobs:
  job-name-goes-here:
    steps:
      - checkout
      - setup-ebcli

hope that helps to anyone out there 🌐

@GhassenRjab
Copy link

Will there be a fix any time soon?

@brivu brivu self-assigned this Aug 8, 2023
@brivu
Copy link
Contributor

brivu commented Aug 8, 2023

Hey Everyone,

Thanks for opening this issue. I am taking a look at this now and will include this in the next release.

Thanks again for reporting!

Best,
Brian

@m-hollow
Copy link

m-hollow commented Aug 10, 2023

Hey Everyone,

Thanks for opening this issue. I am taking a look at this now and will include this in the next release.

Thanks again for reporting!

Best, Brian

Hi Brian, any ETA on fixing this? Attempts to run 'pip install awsebcli' fail every time, due to this pyaml issue. installing an older version of PyYAML is not an option for me as a workaround -- and per the aws cli thread on this same issue, PyYAML 6.0.1 has resolved the issue with cython, but awsebcli (note: EBcli, not regular cli) caps at PyYAML<5.5). I'm guessing your next update of awsebcli will make it compatiable with PyYAML 6.0.1 ?

I need to use the awsebcli on a new system I'm setting up, so this is a pressing issue for me, any updates would be greatly appreciated, thanks!

@brivu
Copy link
Contributor

brivu commented Aug 11, 2023

Hey @m-hollow,

I investigated this further and it seems like awsebcli will not work with the latest version of PyYAML. It definitely gets capped at 5.5 and it's on the maintainers to change that.

I took a look at the logs and it seems that the setuptools library, which is responsible for building and installing Python packages, encountered an issue during the setup of the PyYAML package. It's using a deprecated parameter in the setup.cfg file:

Collecting PyYAML<5.5,>=5.3.1 (from awsebcli)
  Downloading PyYAML-5.4.1.tar.gz (175 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 175.1/175.1 kB 2.1 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'

PIP STDERR
----------
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [62 lines of output]
      /tmp/pip-build-env-e3gev5v9/overlay/lib/python3.10/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!
      
              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.
      
              By 2023-Oct-30, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!

Having said that, I've determined that installing the awsebcli will not work with pipx, which enables users to install the awsebcli in an isolated environment to ensure they don't interfere with other tools running on Python.

It will install with pip but this can be problematic because the awsebcli can conflict with other installed packages, especially when dealing with different project requirements.

I've tried installing with virtualenv following the instructions from the awsebcli repository but am running into the same error.

@BenGale @NMPHalpern @tubone24 @AbdelrahmanManz @paulipotter @GhassenRjab

The work around above installs the cli with pip. Does this solution work for you all? Let me know and I'll get a fix out by Monday at the latest.

@AbdelrahmanManz
Copy link

@brivu Can confirm the workaround above still works for me.

@m-hollow
Copy link

@brivu Can confirm the workaround above still works for me.

Abdel, what version of PyYAML is installed when you use the workaround?

Based on the workaround instructions --

run: |
sudo wget https://bootstrap.pypa.io/get-pip.py
sudo python3 ./get-pip.py
sudo pip install "pyyaml<5.4"
sudo pip install --upgrade setuptools
sudo pip install --upgrade pip awsebcli

I'm assuming it's 5.3.x -- which I can't run, I've encountered issues in the Elastic Beanstalk configuration in AWS when using PyYAML 5.3.1, and it's also been mentioned (in the similar thread about awscli) that it has security issues as well.

But I may be misunderstanding something about the workaround. Could someone please explain how this workaround even works? I'm not getting what's going on --
• why the wget line to obtain get-pip.py ? why is this necessary if one already has pip installed?
• why 'upgrade setuptools' ? what does this achieve?
•(as already asked) what version of PyYAML gets installed?

thanks, I appreciate it!

@brivu
Copy link
Contributor

brivu commented Aug 11, 2023

Hey @m-hollow - You're right, it's 5.3.1. Can you send me some info about the security issue for the aws cli?

@m-hollow
Copy link

m-hollow commented Aug 11, 2023

Hey @m-hollow - You're right, it's 5.3.1. Can you send me some info about the security issue for the aws cli?

so there's a thread about this same issue as it pertains to awscli (vs awsebcli), with this:

"We do not recommend installing an older version of PyYAML as PyYAML version 5.3.1 is associated with CVE-2020-14343 that was fixed in version 5.4."

here's the thread:
aws/aws-cli#8036

Also, when I did an EB deployment with PyYAML 5.3.1 I wound up with configuration errors in EB -- however, I can't say absolutely they were caused by pyyaml, but the degradation to 5.3.1 (from previously a working 5.4) was the new variable, so to speak, in my deployments at the time.

As discussed in the other thread, PyYAML 6.0.1 resolved its issues cython. It seems the clear path forward here is aws getting the awsebcli updated & compatible with PyYAML 6.0.1 instead of capping at 5.5. Hoping they can get on this asap.

@brivu
Copy link
Contributor

brivu commented Aug 14, 2023

@m-hollow I added a comment to the same issue in their repository. If everyone here can also do the same, hopefully we can get some traction and have them fix it sooner rather than later.

aws/aws-elastic-beanstalk-cli-setup#148

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants