pip install silently consenting to install wrong version
See original GitHub issueEnvironment
- pip version: 10.0.1
- Python version: 2.7.15rc1
- OS: Ubuntu 18.04
- Package:
django-wiki
, a Python 3+ release (0.4+), previously supporting Python 2.7+
Description
Dear great maintainers, I think I have found a small issue:
pip install wiki --pre # results in 0.3.1 - THIS IS OKAY
pip install wiki --upgrade --pre # results in 0.3.1 - THIS IS OKAY
pip install wiki==0.4a4 # results in 0.3.1 - THIS IS PROBLEMATIC
pip install wiki==0.4a5 # results in 0.4a4 - THIS IS REALLY WEIRD
Expected behavior
Hard failure when installing a py3-only release on py2.
Never to somehow end up with 0.4a4, which is also py3-only!
How to Reproduce
Use above commands
Output
Installing ==0.4a4
, gives 0.3.1
➜ wikitest pip uninstall wiki
Uninstalling wiki-0.3.1:
Would remove:
/home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages/wiki-0.3.1.dist-info/*
/home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages/wiki/*
Proceed (y/n)? y
Successfully uninstalled wiki-0.3.1
➜ wikitest pip install wiki==0.4a4
Collecting wiki==0.4a4
Requirement already satisfied: sorl-thumbnail<13,>=12 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a4) (12.4.1)
Requirement already satisfied: django-mptt<0.10,>=0.9 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a4) (0.9.0)
Requirement already satisfied: django-nyt<1.2,>=1.1b1 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a4) (1.1b2)
Requirement already satisfied: Django<2.1,>=1.11 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a4) (1.11.14)
Requirement already satisfied: django-sekizai>=0.10 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a4) (0.10.0)
Collecting bleach<2,>=1.5 (from wiki==0.4a4)
Using cached https://files.pythonhosted.org/packages/33/70/86c5fec937ea4964184d4d6c4f0b9551564f821e1c3575907639036d9b90/bleach-1.5.0-py2.py3-none-any.whl
Requirement already satisfied: Pillow in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a4) (5.2.0)
Requirement already satisfied: Markdown<2.7,>=2.6 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a4) (2.6.11)
Requirement already satisfied: django-js-asset in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from django-mptt<0.10,>=0.9->wiki==0.4a4) (1.1.0)
Requirement already satisfied: pytz in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from Django<2.1,>=1.11->wiki==0.4a4) (2018.5)
Requirement already satisfied: django-classy-tags>=0.3.1 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from django-sekizai>=0.10->wiki==0.4a4) (0.8.0)
Requirement already satisfied: six in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from bleach<2,>=1.5->wiki==0.4a4) (1.11.0)
Collecting html5lib!=0.9999,!=0.99999,<0.99999999,>=0.999 (from bleach<2,>=1.5->wiki==0.4a4)
Installing collected packages: html5lib, bleach, wiki
Found existing installation: html5lib 1.0.1
Uninstalling html5lib-1.0.1:
Successfully uninstalled html5lib-1.0.1
Found existing installation: bleach 2.1.3
Uninstalling bleach-2.1.3:
Successfully uninstalled bleach-2.1.3
Successfully installed bleach-1.5.0 html5lib-0.9999999 wiki-0.3.1
Installing ==0.4a5
, gives 0.4a4
➜ wikitest pip install wiki==0.4a5
Collecting wiki==0.4a5
Requirement already satisfied: sorl-thumbnail<13,>=12 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a5) (12.4.1)
Requirement already satisfied: django-mptt<0.10,>=0.9 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a5) (0.9.0)
Requirement already satisfied: django-nyt<1.2,>=1.1b1 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a5) (1.1b2)
Requirement already satisfied: Django<2.1,>=1.11 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a5) (1.11.14)
Requirement already satisfied: django-sekizai>=0.10 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a5) (0.10.0)
Collecting bleach<2.2,>=2.1 (from wiki==0.4a5)
Using cached https://files.pythonhosted.org/packages/30/b6/a8cffbb9ab4b62b557c22703163735210e9cd857d533740c64e1467d228e/bleach-2.1.3-py2.py3-none-any.whl
Requirement already satisfied: Pillow in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a5) (5.2.0)
Requirement already satisfied: Markdown<2.7,>=2.6 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from wiki==0.4a5) (2.6.11)
Requirement already satisfied: django-js-asset in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from django-mptt<0.10,>=0.9->wiki==0.4a5) (1.1.0)
Requirement already satisfied: pytz in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from Django<2.1,>=1.11->wiki==0.4a5) (2018.5)
Requirement already satisfied: django-classy-tags>=0.3.1 in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from django-sekizai>=0.10->wiki==0.4a5) (0.8.0)
Requirement already satisfied: six in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from bleach<2.2,>=2.1->wiki==0.4a5) (1.11.0)
Collecting html5lib!=1.0b1,!=1.0b2,!=1.0b3,!=1.0b4,!=1.0b5,!=1.0b6,!=1.0b7,!=1.0b8,>=0.99999999pre (from bleach<2.2,>=2.1->wiki==0.4a5)
Using cached https://files.pythonhosted.org/packages/a5/62/bbd2be0e7943ec8504b517e62bab011b4946e1258842bc159e5dfde15b96/html5lib-1.0.1-py2.py3-none-any.whl
Requirement already satisfied: webencodings in /home/user/.virtualenvs/django-wiki-test3/lib/python2.7/site-packages (from html5lib!=1.0b1,!=1.0b2,!=1.0b3,!=1.0b4,!=1.0b5,!=1.0b6,!=1.0b7,!=1.0b8,>=0.99999999pre->bleach<2.2,>=2.1->wiki==0.4a5) (0.5.1)
Installing collected packages: html5lib, bleach, wiki
Found existing installation: html5lib 0.9999999
Uninstalling html5lib-0.9999999:
Successfully uninstalled html5lib-0.9999999
Found existing installation: bleach 1.5.0
Uninstalling bleach-1.5.0:
Successfully uninstalled bleach-1.5.0
Found existing installation: wiki 0.3.1
Uninstalling wiki-0.3.1:
Successfully uninstalled wiki-0.3.1
Successfully installed bleach-2.1.3 html5lib-1.0.1 wiki-0.4a4
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
Pip upgrade to 22.3 windows10 - Discussions on Python.org
Hi all, I'm trying to upgrade my pip version. I'm running in cmd promtp as admin and my error is this When I...
Read more >Says package "installed successfully", but doesn't actually install
I'm trying to get the LiveWires package to install in PyCharm setup, which appears to temporarily "install" but only if I add...
Read more >Issue creating Python code-env on a machine with no internet ...
Hi, Code envs will use "pip install -r requirements.txt" with a requirements.txt made of the packages you requested.
Read more >PyPI packages in the Package Registry - GitLab Docs
image: python:latest run: script: - pip install build twine - python -m build ... If you attempt to publish the same package more...
Read more >Install cx_Oracle on Windows Without pip - TechDocs
Run the installer and follow the prompts. If the following error is displayed “Python version 2.x required, which was not found in the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@xavfernandez thanks for trying to reproduce and reminding me about this issue!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.