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 is installing incompatible version despite error #11468

Closed
1 task done
Persedes opened this issue Sep 27, 2022 · 1 comment
Closed
1 task done

PIP is installing incompatible version despite error #11468

Persedes opened this issue Sep 27, 2022 · 1 comment
Labels
resolution: duplicate Duplicate of an existing issue/PR

Comments

@Persedes
Copy link

Description

If I tell pip to install an incompatible version of a package, it shows an error message, but still installs the incompatible dependency.

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
virtualenv 20.16.5 requires importlib-metadata>=4.8.3; python_version < "3.8", but you have importlib-metadata 1.7.0 which is incompatible.

Is this expected? See the example below for details.

Expected behavior

The incompatible package version should not be installed.

pip version

22.2.2

Python version

3.7.0.

OS

Debian GNU/Linux 9 (stretch)

How to Reproduce

$ docker run --rm -it python:3.7.0 bash

$ pip install pip --upgrade

# virtualenv depends on importlib_metadata>=4.8.3
$ pip install virtualenv

$ pip install importlib_metadata==1.7.0           

$ pip show importlib_metadata

Output

$ pip install importlib_metadata==1.7.0                                                                  
...
Attempting uninstall: importlib_metadata                                                                                              
Found existing installation: importlib-metadata 4.12.0                                                                               
Uninstalling importlib-metadata-4.12.0:                                                                                                
Successfully uninstalled importlib-metadata-4.12.0                                                                             
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.                                                                                            
virtualenv 20.16.5 requires importlib-metadata>=4.8.3; python_version < "3.8", but you have importlib-metadata 1.7.0 which is incompatible.                                                                                                                               
Successfully installed importlib_metadata-1.7.0       

$ pip show importlib_metadata                                                                            
Name: importlib-metadata                                                                                                             
Version: 1.7.0                                                                                                                       
Summary: Read metadata from Python packages                                                                                          
Home-page: http://importlib-metadata.readthedocs.io/                                                                                 
Author: Barry Warsaw                                                                                                                 
Author-email: barry@python.org                                                                                                       
License: Apache Software License                                                                                                     
Location: /usr/local/lib/python3.7/site-packages                                                                                     
Requires: zipp                                                                                                                       
Required-by: virtualenv                

Code of Conduct

@Persedes Persedes added S: needs triage Issues/PRs that need to be triaged type: bug A confirmed bug or unintended behavior labels Sep 27, 2022
@uranusjr
Copy link
Member

See #9094

@uranusjr uranusjr closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2022
@uranusjr uranusjr added resolution: duplicate Duplicate of an existing issue/PR and removed type: bug A confirmed bug or unintended behavior S: needs triage Issues/PRs that need to be triaged labels Sep 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
resolution: duplicate Duplicate of an existing issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants