0

Assume the machine has an older pip version - example pip 10.0.0

To update pip I use: python -m pip install pip==20.1.1

Is it possible to create a text file with freezed pip version - example - pip == 20.1.1 and install it using pip install -r file.txt. Will all the packages in the file.txt then use the 20.1.1 pip? or will they still use the original pip 10.0.0?

1
  • Do you want to save all the packages frozen under this pip version? Commented Jun 1, 2020 at 7:02

1 Answer 1

2

Will all the packages in the file.txt then use the 20.1.1 pip?

No, they will use the original pip 10.0.0. The command pip install -r requirements.txt runs once under one pip. After the command starts the same Python and the same pip are running until the entire requirements.txt is processed.

So if you want to upgrade pip and immediately use it you need 2 (two) separate commands:

python -m pip install -U pip==20.1.1 pip install -r requirements.txt 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.