Skip to content

Upgrade PIP during virtual environment creation #15732

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

Closed
wants to merge 1 commit into from

Conversation

MarcusNyne
Copy link
Contributor

The default version of PIP with Python 3.10 does not record installation metadata properly for requirements installed using an url, resulting in invalid lines when PIP FREEZE is called. For example, the packages clip and cstr are problematic. This makes it difficult to recreate a stable diffusion virtual environment. Upgrading PIP during virtual environment creation remedies this problem. I have found this is corrected in v24 of PIP.

Description

  • Upgrade PIP during virtual environment creation so that PIP FREEZE will report accurate information
  • Added PIP --upgrade command in batch file
  • To reproduce this issue, review installation of clip and cstr, which report incorrect information in PIP FREEZE

Screenshots/videos:

Checklist:

The default version of PIP with Python 3.10 does not record installation metadata properly for requirements installed using an url, resulting in invalid lines when PIP FREEZE is called.  For example, the packages clip and cstr are problematic.  This makes it difficult to recreate a stable diffusion virtual environment.  Upgrading PIP during virtual environment creation remedies this problem.  I have found this is corrected in v24 of PIP.
@MarcusNyne MarcusNyne requested a review from AUTOMATIC1111 as a code owner May 7, 2024 18:02
@w-e-w
Copy link
Collaborator

w-e-w commented May 8, 2024

I personally don't have an issue (I think) but some people won't like it

@strawberrymelonpanda
Copy link

strawberrymelonpanda commented May 8, 2024

Since it's only in a VENV I'd be ok with it, as the VENV's PIP "belongs" to the project, but behavior should be consistent between Linux/Mac/Windows IMO. (.bat, and .sh)

This seems to only affect Windows's .bat.

@MarcusNyne
Copy link
Contributor Author

Thanks for taking the time to review, @strawberrymelonpanda .. let me look at it .. I don't currently have a linux/mac installation. I'll see if I can find someone to assist.

@missionfloyd
Copy link
Collaborator

This will update pip every time it's started, not just when the venv is created.

@MarcusNyne
Copy link
Contributor Author

This will update pip every time it's started, not just when the venv is created.

@missionfloyd, that is a good catch! I'll correct the code and resubmit. Thanks for taking the time to review.

@MarcusNyne MarcusNyne closed this May 9, 2024
@missionfloyd
Copy link
Collaborator

You don't need to make a new PR. You can just push additional commits to this branch.

@MarcusNyne
Copy link
Contributor Author

You don't need to make a new PR. You can just push additional commits to this branch.

@missionfloyd Oops sorry I already created the other PR to keep things clean.
#15750

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants