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

pip raises a pkg_resources.VersionConflict exception because colorama is 0.3.7 instead of 0.3.3 #2043

Closed
jeffsilverm opened this issue Jun 29, 2016 · 2 comments
Labels
bug This issue is a bug.

Comments

@jeffsilverm
Copy link

When I try to install awscli under Ubuntu 16.04 and python 3.5.1 (pip3) or python 2.7.11 (pip) I get the VersionConflict exception raised:

root@jeff-desktop:~# pip install awscli
Collecting awscli
  Downloading awscli-1.10.43-py2.py3-none-any.whl (969kB)
    100% |████████████████████████████████| 972kB 1.9MB/s 
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1006, in check_if_exists
    self.satisfied_by = pkg_resources.get_distribution(str(no_marker))
  File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 535, in get_distribution
    dist = get_provider(dist)
  File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 415, in get_provider
    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
  File "/usr/share/python-wheels/pkg_resources-0.0.0-py2.py3-none-any.whl/pkg_resources/__init__.py", line 695, in find
    raise VersionConflict(dist, req)
pkg_resources.VersionConflict: (colorama 0.3.7 (/usr/lib/python3/dist-packages), Requirement.parse('colorama<=0.3.3,>=0.2.5'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 328, in run
    wb.build(autobuilding=True)
  File "/usr/lib/python3/dist-packages/pip/wheel.py", line 748, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 360, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 448, in _prepare_file
    req_to_install, finder)
  File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 387, in _check_skip_installed
    req_to_install.check_if_exists()
  File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1011, in check_if_exists
    self.req.project_name
AttributeError: 'Requirement' object has no attribute 'project_name'
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@jeff-desktop:~# 

I looked at colorama, it's up to 0.3.7 and it's kinda frustrating that this should crash over such a minor feature. I got version 0.3.3 from https://pypi.python.org/pypi/colorama/0.3.3, untar'd it, ran
python setup.py install. Then I ran pip install awscli and that worked properly.

@JordonPhillips JordonPhillips added the bug This issue is a bug. label Jun 29, 2016
@JordonPhillips
Copy link
Member

Does downgrading via pip not work? You could also try installing via the bundled installer.

Either way, I think this means we need to either accept the breaking change from .3.3+ or find a way to fix the issue.

@jeffsilverm
Copy link
Author

Jordon,

I didn't think of downgrading via pip, so I don't know the answer. Is that
an important enough question that I should try the experiment?

My thinking at the moment is that however I downgraded colorama, that was
the work around to the problem. Yes, in retrospect I probably did do it
the hard way, but it's done now.

I don't have a lot of expertise in some of the finer things you can do with
pip. If you want me to, I can restore colorama to its original state,
verify that the problem returns, then use pip to downgrade, and verify that
that solves the issue. That does seem like a lot of work. But I defer to
your expertise - if you want me to do it, then I will do it.

Jeff

On Wed, Jun 29, 2016 at 10:00 AM, Jordon Phillips notifications@github.com
wrote:

Does downgrading via pip not work? You could also try installing via the
bundled installer.

Either way, I think this means we need to either accept the breaking
change from .3.3+ or find a way to fix the issue.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2043 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AAhhh2JLJU0DAfYlOp9pbeVMwk_7ORDkks5qQqS2gaJpZM4JAxNv
.

Jeff Silverman, linux sysadmin
nine two four twentieth avenue east
Seattle, WA, nine eight one one two -3507
(253) 459-2318
jeffsilverm@gmail.c0m (note the zero!)
http://www.commercialventvac.com
See my portfolio of writings and talks
http://www.commercialventvac.com/portfolio.html

JordonPhillips added a commit to JordonPhillips/aws-cli that referenced this issue Jul 12, 2016
This uses the `strip` argument to preserve the previous behavior
of colorizing when output is redirected.

Fixes aws#2043
Resolves aws#2037
Resolves aws#1742
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants