compose-x / ecs_composex

Manage, Configure and Deploy your services and AWS services and applications from your docker-compose definitions
https://docs.compose-x.io
Mozilla Public License 2.0
168 stars 17 forks source link

[BUG] Cannot install with extra 'ecrscan' #557

Closed wuxmax closed 2 years ago

wuxmax commented 2 years ago

Describe the bug If I try to install ComposeX via pip with the extra ecrscan, I get the following error: zsh: no matches found: ecs-composex[ecrscan] Also using an underscore instead of a hyphen does not work: zsh: no matches found: ecs_composex[ecrscan]

Installing ecs_composex via pip works fine, but I get the following warning, when running ecs-compose-x:

.../lib/python3.8/site-packages/ecs_composex/ecs_composex.py:46: UserWarning: You must install ecs-composex[ecrscan] extra to use this functionality
  warnings.warn(

Expected behavior pip should find the package with the extra and install it, then the warning should not occur anymore.

Desktop (please complete the following information):

JohnPreston commented 2 years ago

Hi @wuxmax thanks for reporting this. I just tried on my mac as well, difference being the python version is 3.9 instead of 3.8. Installing with the following steps

python3.9 -m venv venv # just not to install all the things on the machine
source venv/bin/activate
pip install pip -U # always a good sanity thing to do
pip install ecs-composex
pip install ecs-composex[ecrscan]

completed succesfully for me, using bash

However, using ZSH I ended up with the same error as you. Only worked with the command

rm -rfv venv
python3.9 -m venv venv # just not to install all the things on the machine
source venv/bin/activate
pip install pip -U # always a good sanity thing to do
pip install ecs-composex\[ecrscan\]

So my guess is that ZSH is trying to interpret [ecrscan] and is not happy about the result.

Would you mind giving that a try ?

Thank you

wuxmax commented 2 years ago

Yes you are absolutely right! ZSH uses square brackets for globbing. Should have guessed that by the no matches found output... Thanks for the quick reply!

Following commands also work: pip install 'ecs-composex[ecrscan]' and noglob pip install ecs-composex[ecrscan]

Solution found here: https://stackoverflow.com/questions/30539798/zsh-no-matches-found-requestssecurity

JohnPreston commented 2 years ago

Thanks @wuxmax for confirming. Glad this worked. Feel free to join the Slack channel for questions or just to say hello :)