-
Notifications
You must be signed in to change notification settings - Fork 3k
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 freeze does not show version for in-place installs #8174
Comments
IIUC, the freeze format of Edit: I ran your example after cloning the git repo and commenting out the
Then when I unninstalled the
|
@danielpanteleit this change was introduced in #7612 as a solution for #609 . The goal is to have If you need to obtain the installed version, I'd recommend using That said I had forgotten myself about |
@deveshks the behaviour you observe when |
So then what happens in the presence of |
So IIUC, |
We use the following workflow in our CI pipeline: We install a package in-place inside a fresh virtualenv and call pip freeze. Then we run all tests and if everything works, we store the frozen requirements.txt separately. This way, we know that each stored requirements.txt worked and we can easily roll back to an older version if problems arise by using an older requirements.txt The alternative would be to first build the source package and install this package via pip, right? Though I would prefer to just use |
Would this work for you? $ pip wheel . --wheel-dir=builddir
$ pip install packagename --no-index --find-links=builddir |
@sbidoul If this is the intended way Thanks! |
I have filed #8176 for this. |
@danielpanteleit it's good if this solution works for you. I'll let you close the issue if you think all is resolved. |
softwarefactory-project tutorial [1] "Scenario 1" does not fail as it should for version 3.4, because the "git+https://..." dependency is printed as "demolib @ git+https://...", which is not listed as an installed package because it does not match version compare '==' Starting from pip 20.1, "freeze" command outputs requirements package using direct references [2], a Helper was introduced by [3] used in freeze by [4] This change adds the urlspec info extraction. Additional Info: - [5] requirements format PEP508 - [6] PEP610 referenced by [4] - [7] & [8] "pip freeze" vs "pip list --format=freeze" [1] https://www.softwarefactory-project.io/zuul-hands-on-part-6-cross-project-dependencies.html [2] https://www.python.org/dev/peps/pep-0440/#direct-references [3] pypa/pip@6f689f6 [4] pypa/pip@196706d [5] https://www.python.org/dev/peps/pep-0508/ [6] https://www.python.org/dev/peps/pep-0610/ [7] pypa/pip#8174 [8] pypa/pip#8176 Change-Id: Id038149201829862f9944dfd8d7ceeafac670f3d
Environment
Description
pip freeze does not list the version for in-place installs via "pip install ." Instead it shows a
@ file:///...
line which is usually used in editable installs.Expected behavior
Following the example from below, the output should be
How to Reproduce
Here is a minimal environment: https://github.com/danielpanteleit/pip_freeze_test
Output
The text was updated successfully, but these errors were encountered: