Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Fix pip environment resolution #798

Merged
merged 2 commits into from
Jan 22, 2024
Merged

Conversation

jakelishman
Copy link
Member

Summary

Calling pip install multiple times can (deeply unfortunately) allow an environment to become out-of-sync; pip doesn't "remember" the constraints of previous installation commands.

One of the largest effects here is that doing pip install -e . followed by pip install git+<qiskit>@main installs qiskit-terra from the initial installation (via qiskit==0.45.2), then installs qiskit==1.0.0.dev0 from Git, which is an incompatible environment. Doing the whole environment resolution in a single pip install command fixes this, as the qiskit dependency is correctly resolved to be only the 1.0.0.dev0 version.

Details and comments

Calling `pip install` multiple times can (deeply unfortunately) allow an
environment to become out-of-sync; `pip` doesn't "remember" the
constraints of previous installation commands.

One of the largest effects here is that doing `pip install -e .`
_followed_ by `pip install git+<qiskit>@main` installs `qiskit-terra`
from the initial installation (via `qiskit==0.45.2`), then installs
`qiskit==1.0.0.dev0` from Git, which is an incompatible environment.
Doing the whole environment resolution in a single `pip install` command
fixes this, as the `qiskit` dependency is correctly resolved to be
_only_ the `1.0.0.dev0` version.
@coveralls
Copy link

coveralls commented Jan 22, 2024

Pull Request Test Coverage Report for Build 7615639355

Warning: This coverage report may be inaccurate.

We've detected an issue with your CI configuration that might affect the accuracy of this pull request's coverage report.
To ensure accuracy in future PRs, please see these guidelines.
A quick fix for this PR: rebase it; your next report should be accurate.

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 51.505%

Totals Coverage Status
Change from base Build 7614573878: 0.0%
Covered Lines: 3440
Relevant Lines: 6679

💛 - Coveralls

@kt474 kt474 merged commit fc0c4ae into Qiskit:main Jan 22, 2024
15 checks passed
@jakelishman jakelishman deleted the fix-pip-resolution branch January 22, 2024 19:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants