pipenv: Pipenv install parsing wrong package name
Issue description
After the latest patch for the incompatibility problem with pip 18.1, the pipenv parsing of the package name during installation no longer is working (it’s replacing .
in the package name for a -
and this leads to pip not finding the available versions).
This happens with pip 18.1 as well as 18.0.
Expected result
pipenv install zope.interface==4.5.0
should install from this package https://pypi.org/project/zope.interface/
Actual result
Instead it translates to zope-interface==4.5.0
and then it don’t find the package:
Could not find a version that satisfies the requirement zope-interface==4.5.0 (from versions: 4.4.0, 4.4.1, 4.4.2, 4.4.3)
No matching distribution found for zope-interface==4.5.0
Steps to replicate
create new virtualenv with latest pipenv version (2018.10.9) to see it break, and test it with the previews one (2018.7.1) where it’s still ok.
obs: I’m not sure if this is a bug in pip or pypi (not finding the correct version when replacing .
with -
), but since it started happening with the latest pipenv release then I believe it is actually related to pipenv.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 23
- Comments: 25 (11 by maintainers)
Commits related to this issue
- Fix package name canonicalization bug - Fixes #2951 - Fixes #2956 - Fixes #2963 Signed-off-by: Dan Ryan <dan@danryan.co> — committed to pypa/pipenv by techalchemy 6 years ago
- adding pipfile in order to promote installation with pipenv as requested from algolia/docsearch#449 waiting for pypa/pipenv#2956 — committed to algolia/docsearch-scraper by deleted user 6 years ago
- Pin pip and pipenv versions for now pipenv is broken by: https://github.com/pypa/pipenv/issues/2956 — committed to hroncok/naucse.python.cz by hroncok 6 years ago
- Pin pip and pipenv versions for now pipenv is broken by: https://github.com/pypa/pipenv/issues/2956 — committed to hroncok/naucse.python.cz by hroncok 6 years ago
- Pin pip and pipenv versions for now pipenv is broken by: https://github.com/pypa/pipenv/issues/2956 — committed to hroncok/naucse.python.cz by hroncok 6 years ago
- Pin pip and pipenv versions for now pipenv is broken by: https://github.com/pypa/pipenv/issues/2956 — committed to hroncok/naucse.python.cz by hroncok 6 years ago
- Pin pip and pipenv versions for now pipenv is broken by: https://github.com/pypa/pipenv/issues/2956 — committed to hroncok/naucse.python.cz by hroncok 6 years ago
- Pin pip and pipenv versions for now pipenv is broken by: https://github.com/pypa/pipenv/issues/2956 — committed to hroncok/naucse.python.cz by hroncok 6 years ago
- Pin pip and pipenv versions for now pipenv is broken by: https://github.com/pypa/pipenv/issues/2956 — committed to hroncok/naucse.python.cz by hroncok 6 years ago
- Pin pip and pipenv versions for now pipenv is broken by: https://github.com/pypa/pipenv/issues/2956 — committed to hroncok/naucse.python.cz by hroncok 6 years ago
- Pin pip and pipenv versions for now pipenv is broken by: https://github.com/pypa/pipenv/issues/2956 — committed to pyvec/naucse.python.cz by hroncok 6 years ago
- Pin pip and pipenv versions for now pipenv is broken by: https://github.com/pypa/pipenv/issues/2956 — committed to cvut/naucse.python.cz by hroncok 6 years ago
- adding pipfile in order to promote installation with pipenv as requested from algolia/docsearch#449 waiting for pypa/pipenv#2956 — committed to algolia/docsearch-scraper by deleted user 6 years ago
- adding pipfile in order to promote installation with pipenv as requested from algolia/docsearch#449 waiting for pypa/pipenv#2956 — committed to algolia/docsearch-scraper by deleted user 6 years ago
- adding pipfile in order to promote installation with pipenv as requested from algolia/docsearch#449 waiting for pypa/pipenv#2956 — committed to algolia/docsearch-scraper by deleted user 6 years ago
- adding pipfile in order to promote installation with pipenv as requested from algolia/docsearch#449 waiting for pypa/pipenv#2956 — committed to algolia/docsearch-scraper by deleted user 6 years ago
Another package is dogpile.cache (Related issue: https://github.com/pypa/pipenv/issues/2959)
This bug is actually adversely affecting me in a major way. I’ve had to update a ton of continuous integration jobs to reference the previous version to prevent this bug from failing all my deploys and deliveries. Please release a fix for this soon.
For anyone else tripping across this, I changed my Dockerfile to:
In order to pin pipenv itself.
@jakeczyz it was mentioned that downgrading pipenv to 2018.7.1 worked
pip bug: https://github.com/pypa/pip/issues/5870
One more affected package:
Is this issue fixed, I want to add dogpile.cache in my requirements.txt file but it not working, please help
@Jamim pipenv has to normalize names internally. You might have packages A depending on “zope.interface” and B depending on “zope-interface”, both being valid package names and installable separately. pipenv’s dependency resolution must normalize things, because otherwise you can end up with separate “zope-interface” and “zope.interface” dependencies in Pipfile.lock.
OK, that explains the difference we are seeing: The last released version doesn’t contain the relevant fix, I installed directly from github:
I am not sure if this is really fixed for all cases, see e.g. pypa/warehouse#2849. That issue is about
pipenv clean
, notpipenv install
. Should I open a new issue for that case or should the issue in this thread be re-opened?zc.lockfile is another example (putting here in case others google for it, specifically). Any workaround suggestions?
This looks related to PEP 503’s standardization name normalization. As this is gradually implemented across the ecosystem, things seem to break.