Aws-cli: aws cli has pinned colorama 0.3.7 which is not the latest

Created on 17 May 2017  ·  18Comments  ·  Source: aws/aws-cli

My scripting updates all pip packages which gets me colorama 0.3.9, but then the awscli install/update downgrades it to 0.3.7 each time.

Installing collected packages: colorama Found existing installation: colorama 0.3.9 Uninstalling colorama-0.3.9: Successfully uninstalled colorama-0.3.9 Successfully installed colorama-0.3.7

closing-soon guidance third-party

Most helpful comment

Colorama has a history of breaking us. What do you need in colorama >=0.3.7?

The problem is other packages depending on colorama >=0.3.7: for instance docker-compose pins the version of colorama to 0.3.8 meaning that awscli and docker-compose cannot be installed in the same Python environment which is not ideal. Would it be possible to upgrade maximal supported version to 0.3.8 at least (the latest being 0.3.9) ?

Edit: more precisely, for docker-compose it seems to be the case for windows..

All 18 comments

Colorama has a history of breaking us. What do you need in colorama >=0.3.7?

We don't need anything in colorama - it's just our automation scripting updates all pip packages and then aws cli downgrades colorama, and this upgrade/downgrade happens every time we run the automation scripts. But various software does need to pin versions sometimes, so we'll have to work out something on our end or just ignore this version oscillation.

Colorama has a history of breaking us. What do you need in colorama >=0.3.7?

The problem is other packages depending on colorama >=0.3.7: for instance docker-compose pins the version of colorama to 0.3.8 meaning that awscli and docker-compose cannot be installed in the same Python environment which is not ideal. Would it be possible to upgrade maximal supported version to 0.3.8 at least (the latest being 0.3.9) ?

Edit: more precisely, for docker-compose it seems to be the case for windows..

This is still an issue and conflicting with other packages now that require >= 0.3.9, any chance to modify the requirement?

We are having the same issue: below is the error description

C:\Windows\System32>eb --version
Traceback (most recent call last):
File "c:\users\dharmraj.mangukiya\appdata\local\programs\python\python36\lib\site-packages\pkg_resources__init__.py", line 570, in _build_master
ws.require(__requires__)
File "c:\users\dharmraj.mangukiya\appdata\local\programs\python\python36\lib\site-packages\pkg_resources__init__.py", line 888, in require
needed = self.resolve(parse_requirements(requirements))
File "c:\users\dharmraj.mangukiya\appdata\local\programs\python\python36\lib\site-packages\pkg_resources__init__.py", line 779, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (colorama 0.3.7 (c:\users\dharmraj.mangukiya\appdata\roaming\python\python36\site-packages), Requirement.parse('colorama<0.4,>=0.3.9; sys_platform == "win32"'), {'docker-compose'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Dharmraj.Mangukiya\AppData\Roaming\Python\Python36\Scripts\eb-script.py", line 6, in
from pkg_resources import load_entry_point
File "c:\users\dharmraj.mangukiya\appdata\local\programs\python\python36\lib\site-packages\pkg_resources__init__.py", line 3095, in
@_call_aside
File "c:\users\dharmraj.mangukiya\appdata\local\programs\python\python36\lib\site-packages\pkg_resources__init__.py", line 3079, in _call_aside
f(args, *kwargs)
File "c:\users\dharmraj.mangukiya\appdata\local\programs\python\python36\lib\site-packages\pkg_resources__init__.py", line 3108, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "c:\users\dharmraj.mangukiya\appdata\local\programs\python\python36\lib\site-packages\pkg_resources__init__.py", line 572, in _build_master
return cls._build_from_requirements(__requires__)
File "c:\users\dharmraj.mangukiya\appdata\local\programs\python\python36\lib\site-packages\pkg_resources__init__.py", line 585, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "c:\users\dharmraj.mangukiya\appdata\local\programs\python\python36\lib\site-packages\pkg_resources__init__.py", line 779, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (colorama 0.3.7 (c:\users\dharmraj.mangukiya\appdata\roaming\python\python36\site-packages), Requirement.parse('colorama<0.4,>=0.3.9; sys_platform == "win32"'), {'docker-compose'})

Is there any possible solutions?

pip install git+git://github.com/aws/aws-cli

There was a recent release on PyPi: https://pypi.org/project/awscli/#history so I don't think that installing the dev version will help...

well I must say that I ended here because I was searching for a similar issue (mine was about awsebcli and I solved it by instaling the previous version), maybe I replied too fast without reading well everything (if this is the case: I'm sorry about it), but I see a confict with cororama (colorama<0.4,>=0.3.9), the version I linked have different dependencies (as you can check them here: https://github.com/aws/aws-cli/blob/develop/requirements.txt): colorama>=0.2.5,<=0.3.9

1、
Copy USER\AppData\Local\Programs\Python\Python36\Lib\site-packages\colorama-0.3.9.dist-info to USER\AppData\Roaming\Python\Python36\site-packages\

And delete USER\AppData\Roaming\Python\Python36\site-packages\colorama-0.3.7.dist-info

2、
USER\AppData\Roaming\Python\Python36\site-packages\awsebcli-3.14.0-py3.6.egg-info
Overwrite the version.
colorama==0.3.7 → colorama==0.3.9

3、
Try again.

@Naotamon ,
this solution is not working for me, I uninstalled everything including AWS cli, EB cli, PIP, Python, deleted all the directories, and re install all and not it works for me.

I am getting Colorama version conflict when I run 'eb --version'. Anyone got a solution to this.
image

@Naotamon
Thank you. I have same problem. but fixed.

Hello.

I know this issue is repeating itself, version after version. But colorama is causing incompatibilities on Windows OS machines with other packages, namely docker-compose. The latter requires 'colorama >= 0.4, < 0.5'; :sys_platform == "win32" while the former requires 'colorama>=0.2.5,<=0.3.9' (has seen below):

https://github.com/aws/aws-cli/blob/d7b8ca9dbc3932a189363ea77b5df5647b63fbc6/setup.py#L27

Will this be addressed soon?

Thank you.

Having just manually updated our dependencies again, I was reminded of this today. It would be great to let this float and keep more current with new colorama versions.

Also, this seems related: https://github.com/pypa/pip/issues/988

Yes, it's still pretty much an issue when you try to install something that uses more recent versions of colorama.

Why is this issue closed? It's still an issue as of 2019-08-21

Doing regular pip updates on my machine, awscli is always an issue.

ERROR: awscli 1.16.224 has requirement colorama<=0.3.9,>=0.2.5, but you'll have colorama 0.4.1 which is incompatible.
ERROR: awscli 1.16.224 has requirement rsa<=3.5.0,>=3.1.2, but you'll have rsa 4.0 which is incompatible.

We don't need anything in colorama - it's just our automation scripting updates all pip packages and then aws cli downgrades colorama, and this upgrade/downgrade happens every time we run the automation scripts.

@edrozenberg Can you point us at the automation scripts you're talking about so that somebody can attempt a fix? I agree that this issue definitely isn't resolved and it's puzzling that it's closed.

Was this page helpful?
0 / 5 - 0 ratings